How to find supertype in scala

ساخت وبلاگ

Vote count: 0

If A<:B, I understand that means A is a subtype and B a supertype, I thought I use A in place of B anywhere B is needed because it has inherited all of its properties from B. Now here is my problem

type One
type Two
type Three
type Four
type Five
type Six
type Seven
type Eight
type Fun1 = { val a: One } => { val b: Two }
type Fun2 = { val b: Two } => { val a: One }
type SuperType = {
??
}
type TypeOne = { def apply: { val func: Fun1 ; val c: Three } => { val b: Two ; val d: Four } val g: Seven
}
type TypeTwo = { def apply: { val func: Fun2 ; val e: Five } => { val b: Two ; val f: Six } val h: Eight
}

How can I make SuperType which is the supertype of TypeOne and TypeTwo. I could only come up with the keyword 'Any' nothing else works. I also tried

def apply: {val func: Fun1}=>{val b: Two}

because I don't see and relationship between all the other values

asked 1 min ago

back soft...
ما را در سایت back soft دنبال می کنید

برچسب : how to find pokemon in pokemon go,how to find pokemon,how to find slope,how to find standard deviation,how to find the area of a triangle,how to find the area of a circle,how to find density,how to find area,how to find percentage,how to find the domain of a function, نویسنده : استخدام کار backsoft بازدید : 500 تاريخ : يکشنبه 9 آبان 1395 ساعت: 22:32