Created
December 20, 2016 10:50
-
-
Save b-studios/f091c13cdf1abb1e1819220f1006118a to your computer and use it in GitHub Desktop.
Variance, Invariance, Nothing et al.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Finds a R in an T | |
trait Select[T, R] { | |
def apply(t: T): R | |
} | |
trait LowPrio { | |
def apply[T, R](f: T => R): Select[T, R] = new Select[T, R] { | |
def apply(t: T): R = f(t) | |
} | |
implicit def autoLeft[T, R, O]: Select[(R, O), R] = Select(_._1) | |
} | |
object Select extends LowPrio { | |
implicit def autoRight[T, R, O]: Select[(O, R), R] = Select(_._2) | |
} | |
object Test { | |
def select[T, R](t: T)(implicit sel: Select[T, R]): R = sel(t) | |
val x = (12, "hello") | |
val y: Int = select(x) | |
val z: String = select(x) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Finds a R in an T | |
trait Select[-T, +R] { | |
def apply(t: T): R | |
} | |
trait LowPrio { | |
def apply[T, R](f: T => R): Select[T, R] = new Select[T, R] { | |
def apply(t: T): R = f(t) | |
} | |
implicit def autoLeft[T, R, O]: Select[(R, O), R] = Select(_._1) | |
} | |
object Select extends LowPrio { | |
implicit def autoRight[T, R, O]: Select[(O, R), R] = Select(_._2) | |
} | |
object Test { | |
def select[T, R](t: T)(implicit sel: Select[T, R]): R = sel(t) | |
val x = (12, "hello") | |
val y: Int = select(x) | |
val z: String = select(x) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
217,218c217,219 | |
< | | | [adapt] [T, R, O]=> Select[(O, R),R] adapted to [T, R, O]=> Select[(O, R),R] based on pt Select[(Int, String),R] | |
< | | | solving for (R: ?R) | |
--- | |
> | | | [adapt] [T, R, O]=> Select[(O, R),R] adapted to [T, R, O]=> Select[(O, R),R] based on pt Select[(Int, String),Int] | |
> | | | solving for (T: ?T, R: ?R, O: ?O) | |
> | | | [adapt] [T, R, O]=> Select[(R, O),R] adapted to [T, R, O]=> Select[(R, O),R] based on pt Select[(Int, String),Int] | |
220,240c221 | |
< | | | | \-> <error> | |
< | | | |-- select(x) BYVALmode-EXPRmode (site: value y in Test) | |
< | | | | |-- select BYVALmode-EXPRmode-FUNmode-POLYmode (silent: value y in Test) | |
< | | | | | [adapt] [T, R](t: T)(implicit sel: Select[T,R])R adapted to [T, R](t: T)(implicit sel: Select[T,R])R | |
< | | | | | \-> (t: T)(implicit sel: Select[T,R])R | |
< | | | | |-- x BYVALmode-EXPRmode-POLYmode (site: value y in Test) | |
< | | | | | \-> (Int, String) | |
< | | | | solving for (T: ?T, R: ?R) | |
< | | | | solving for (R: ?R) | |
< | | | | solving for (T: ?T, R: ?R, O: ?O) | |
< | | | | [adapt] [T, R, O]=> Select[(O, R),R] adapted to [T, R, O]=> Select[(O, R),R] based on pt Select[(Int, String),R] | |
< | | | | solving for (R: ?R) | |
< | | | | |-- [T, R](t: T)(implicit sel: Select[T,R])R BYVALmode-EXPRmode (site: value y in Test) | |
< | | | | | \-> String | |
< | | | | [adapt] [T, R](t: T)(implicit sel: Select[T,R])R adapted to [T, R](t: T)(implicit sel: Select[T,R])R | |
< | | | | \-> String | |
< 0.test-2.scala:20: error: type mismatch; | |
< found : String | |
< required: Int | |
< val y: Int = select(x) | |
< ^ | |
--- | |
> | | | | \-> Int | |
242c223 | |
< | | | \-> <error> | |
--- | |
> | | | \-> Int | |
263,264c244,246 | |
< | | | [adapt] [T, R, O]=> Select[(O, R),R] adapted to [T, R, O]=> Select[(O, R),R] based on pt Select[(Int, String),R] | |
< | | | solving for (R: ?R) | |
--- | |
> | | | [adapt] [T, R, O]=> Select[(R, O),R] adapted to [T, R, O]=> Select[(R, O),R] based on pt Select[(Int, String),String] | |
> | | | solving for (T: ?T, R: ?R, O: ?O) | |
> | | | [adapt] [T, R, O]=> Select[(O, R),R] adapted to [T, R, O]=> Select[(O, R),R] based on pt Select[(Int, String),String] | |
276a259,316 | |
> |-- (_1: <?>, _2: <?>)(T1, T2) EXPRmode-FUNmode-POLYmode-TAPPmode (site: object Test) implicits disabled | |
> | |-- new (Int, String) EXPRmode-POLYmode-QUALmode (site: object Test) implicits disabled | |
> | | \-> (Int, String) | |
> | \-> (_1: Int, _2: String)(Int, String) | |
> |-- { @SerialVersionUID(0) final <synthetic> class $anonfun e... EXPRmode (site: method autoLeft in LowPrio) implicits disabled | |
> | |-- class $anonfun BYVALmode-EXPRmode (site: method autoLeft in LowPrio) implicits disabled | |
> | | |-- super EXPRmode-POLYmode-QUALmode (silent: <init> in $anonfun) implicits disabled | |
> | | | |-- this EXPRmode (silent: <init> in $anonfun) implicits disabled | |
> | | | | \-> scala.runtime.AbstractFunction1[(R, O),x$1._1.type forSome { val x$1: (R, O) }] with Serializable | |
> | | | \-> super.type (with underlying type scala.runtime.AbstractFunction1[(R, O),x$1._1.type forSome { val x$1: (R, O) }]) | |
> | | |-- def apply BYVALmode-EXPRmode (site: anonymous class $anonfun) implicits disabled | |
> | | | \-> [def apply] (x$1: (R, O))x$1._1.type forSome { val x$1: (R, O) } | |
> | | \-> [class $anonfun] scala.runtime.AbstractFunction1[(R, O),x$1._1.type forSome { val x$1: (R, O) }] with Serializable | |
> | |-- (new <$anon: ((R, O)) => x$1._1.type forSome { val x$1: (... EXPRmode (site: method autoLeft in LowPrio) implicits disabled | |
> | | |-- new <$anon: ((R, O)) => x$1._1.type forSome { val x$1: (R... : pt=((R, O)) => x$1._1.type forSome { val x$1: (R, O) } EXPRmode (site: method autoLeft in LowPrio) implicits disabled | |
> | | | |-- new <$anon: ((R, O)) => x$1._1.type forSome { val x$1: (R... BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method autoLeft in LowPrio) implicits disabled | |
> | | | | |-- new <$anon: ((R, O)) => x$1._1.type forSome { val x$1: (R... EXPRmode-POLYmode-QUALmode (silent: method autoLeft in LowPrio) implicits disabled | |
> | | | | | \-> scala.runtime.AbstractFunction1[(R, O),x$1._1.type forSome { val x$1: (R, O) }] with Serializable | |
> | | | | \-> ()scala.runtime.AbstractFunction1[(R, O),x$1._1.type forSome { val x$1: (R, O) }] with Serializable | |
> | | | \-> scala.runtime.AbstractFunction1[(R, O),x$1._1.type forSome { val x$1: (R, O) }] with Serializable | |
> | | \-> ((R, O)) => x$1._1.type forSome { val x$1: (R, O) } | |
> | \-> ((R, O)) => x$1._1.type forSome { val x$1: (R, O) } | |
> |-- { @SerialVersionUID(0) final <synthetic> class $anonfun e... EXPRmode (site: method autoRight in Select) implicits disabled | |
> | |-- class $anonfun BYVALmode-EXPRmode (site: method autoRight in Select) implicits disabled | |
> | | |-- super EXPRmode-POLYmode-QUALmode (silent: <init> in $anonfun) implicits disabled | |
> | | | |-- this EXPRmode (silent: <init> in $anonfun) implicits disabled | |
> | | | | \-> scala.runtime.AbstractFunction1[(O, R),x$2._2.type forSome { val x$2: (O, R) }] with Serializable | |
> | | | \-> super.type (with underlying type scala.runtime.AbstractFunction1[(O, R),x$2._2.type forSome { val x$2: (O, R) }]) | |
> | | |-- def apply BYVALmode-EXPRmode (site: anonymous class $anonfun) implicits disabled | |
> | | | \-> [def apply] (x$2: (O, R))x$2._2.type forSome { val x$2: (O, R) } | |
> | | \-> [class $anonfun] scala.runtime.AbstractFunction1[(O, R),x$2._2.type forSome { val x$2: (O, R) }] with Serializable | |
> | |-- (new <$anon: ((O, R)) => x$2._2.type forSome { val x$2: (... EXPRmode (site: method autoRight in Select) implicits disabled | |
> | | |-- new <$anon: ((O, R)) => x$2._2.type forSome { val x$2: (O... : pt=((O, R)) => x$2._2.type forSome { val x$2: (O, R) } EXPRmode (site: method autoRight in Select) implicits disabled | |
> | | | |-- new <$anon: ((O, R)) => x$2._2.type forSome { val x$2: (O... BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method autoRight in Select) implicits disabled | |
> | | | | |-- new <$anon: ((O, R)) => x$2._2.type forSome { val x$2: (O... EXPRmode-POLYmode-QUALmode (silent: method autoRight in Select) implicits disabled | |
> | | | | | \-> scala.runtime.AbstractFunction1[(O, R),x$2._2.type forSome { val x$2: (O, R) }] with Serializable | |
> | | | | \-> ()scala.runtime.AbstractFunction1[(O, R),x$2._2.type forSome { val x$2: (O, R) }] with Serializable | |
> | | | \-> scala.runtime.AbstractFunction1[(O, R),x$2._2.type forSome { val x$2: (O, R) }] with Serializable | |
> | | \-> ((O, R)) => x$2._2.type forSome { val x$2: (O, R) } | |
> | \-> ((O, R)) => x$2._2.type forSome { val x$2: (O, R) } | |
> |-- (v1: T1)R EXPRmode-FUNmode-POLYmode-TAPPmode (site: method apply in $anon) implicits disabled | |
> | \-> (v1: T)R | |
> |-- ()T1 EXPRmode-FUNmode-POLYmode-TAPPmode (site: method apply in $anonfun) implicits disabled | |
> | \-> ()R | |
> |-- ()T2 EXPRmode-FUNmode-POLYmode-TAPPmode (site: method apply in $anonfun) implicits disabled | |
> | \-> ()R | |
> |-- def LowPrio$$anon$$$outer EXPRmode (site: anonymous class $anon) implicits disabled | |
> | |-- LowPrio.this.type : pt=LowPrio.this.type EXPRmode (site: value LowPrio$$anon$$$outer in $anon) implicits disabled | |
> | | |-- Select[T,R]{val $outer(): LowPrio.this.type} EXPRmode-POLYmode-QUALmode (site: value LowPrio$$anon$$$outer in $anon) implicits disabled | |
> | | | \-> LowPrio.$anon.type (with underlying type Select[T,R]{val $outer(): LowPrio.this.type}) | |
> | | \-> this.$outer.type (with underlying type LowPrio) | |
> | \-> [def LowPrio$$anon$$$outer] ()LowPrio.this.type (with underlying type ()LowPrio.this.type) | |
> |-- def LowPrio$$anonfun$$$outer EXPRmode (site: anonymous class $anonfun) implicits disabled | |
> | |-- LowPrio.this.type : pt=LowPrio.this.type EXPRmode (site: value LowPrio$$anonfun$$$outer in $anonfun) implicits disabled | |
> | | |-- scala.runtime.AbstractFunction1[(R, O),x$1._1.type forSom... EXPRmode-POLYmode-QUALmode (site: value LowPrio$$anonfun$$$outer in $anonfun) implicits disabled | |
> | | | \-> LowPrio.$anonfun.type (with underlying type scala.runtime.AbstractFunction1[(R, O),x$1._1.type forSome { val x$1: (R, O) }] with Serializable{val $outer(): LowPrio.this.type}) | |
> | | \-> this.$outer.type (with underlying type LowPrio) | |
> | \-> [def LowPrio$$anonfun$$$outer] ()LowPrio.this.type (with underlying type ()LowPrio.this.type) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|-- <empty> EXPRmode-POLYmode-QUALmode (site: package <root>) | |
| \-> <empty>.type | |
|-- class Select[T, R] BYVALmode-EXPRmode (site: package <empty>) | |
| |-- def apply BYVALmode-EXPRmode (site: trait Select) | |
| | |-- R TYPEmode (site: method apply in Select) | |
| | | \-> R | |
| | |-- T TYPEmode (site: value t in Select) | |
| | | \-> T | |
| | \-> [def apply] (t: T)R | |
| \-> [trait Select] Select[T,R] | |
|-- class LowPrio BYVALmode-EXPRmode (site: package <empty>) | |
| |-- def $init$ BYVALmode-EXPRmode (site: trait LowPrio) | |
| | \-> [def $init$] ()Unit | |
| |-- def apply[T, R] BYVALmode-EXPRmode (site: trait LowPrio) | |
| | |-- Select[T, R] TYPEmode (site: method apply in LowPrio) | |
| | | |-- T TYPEmode (site: method apply in LowPrio) | |
| | | | \-> T | |
| | | |-- R TYPEmode (site: method apply in LowPrio) | |
| | | | \-> R | |
| | | \-> Select[T,R] | |
| | |-- _root_.scala.Function1[T, R] TYPEmode (site: value f in LowPrio) | |
| | | |-- T TYPEmode (site: value f in LowPrio) | |
| | | | \-> T | |
| | | |-- R TYPEmode (site: value f in LowPrio) | |
| | | | \-> R | |
| | | \-> T => R | |
| | |-- _root_.scala.Function1[T, R] TYPEmode (site: value f in LowPrio) | |
| | | \-> T => R | |
| | |-- Select[T,R] TYPEmode (site: method apply in LowPrio) | |
| | | \-> Select[T,R] | |
| | |-- { final class $anon extends Select[T, R] { def <init>() =... : pt=Select[T,R] EXPRmode (site: method apply in LowPrio) | |
| | | |-- Select FUNmode-TYPEmode (site: anonymous class $anon) | |
| | | | \-> Select | |
| | | |-- Select[T, R] TYPEmode (site: anonymous class $anon) | |
| | | | |-- T TYPEmode (site: anonymous class $anon) | |
| | | | | \-> T | |
| | | | |-- R TYPEmode (site: anonymous class $anon) | |
| | | | | \-> R | |
| | | | \-> Select[T,R] | |
| | | |-- R TYPEmode (site: method apply in $anon) | |
| | | | \-> R | |
| | | |-- T TYPEmode (site: value t in $anon) | |
| | | | \-> T | |
| | | |-- class $anon BYVALmode-EXPRmode (site: method apply in LowPrio) | |
| | | | |-- Select[T,R] TYPEmode (site: anonymous class $anon) | |
| | | | | \-> Select[T,R] | |
| | | | |-- super EXPRmode-POLYmode-QUALmode (silent: <init> in $anon) | |
| | | | | |-- this EXPRmode (silent: <init> in $anon) | |
| | | | | | \-> Select[T,R] | |
| | | | | \-> super.type (with underlying type AnyRef) | |
| | | | |-- def apply BYVALmode-EXPRmode (site: anonymous class $anon) | |
| | | | | |-- f(t) : pt=R EXPRmode (site: method apply in $anon) | |
| | | | | | |-- f BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method apply in $anon) | |
| | | | | | | |-- f.apply BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method apply in $anon) | |
| | | | | | | | \-> (v1: T)R | |
| | | | | | | [adapt] T => R adapted to (v1: T1)R | |
| | | | | | | \-> (v1: T)R | |
| | | | | | |-- t : pt=T BYVALmode-EXPRmode (silent: method apply in $anon) | |
| | | | | | | \-> T | |
| | | | | | \-> R | |
| | | | | \-> [def apply] (t: T)R | |
| | | | \-> [class $anon] Select[T,R] | |
| | | |-- new $anon() : pt=Select[T,R] EXPRmode (site: method apply in LowPrio) | |
| | | | |-- new $anon BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method apply in LowPrio) | |
| | | | | |-- new $anon EXPRmode-POLYmode-QUALmode (silent: method apply in LowPrio) | |
| | | | | | |-- $anon FUNmode-TYPEmode (silent: method apply in LowPrio) | |
| | | | | | | \-> Select[T,R] | |
| | | | | | \-> Select[T,R] | |
| | | | | \-> ()Select[T,R] | |
| | | | \-> Select[T,R] | |
| | | \-> Select[T,R] | |
| | \-> [def apply] [T, R](f: T => R)Select[T,R] | |
| |-- def autoLeft[T, R, O] BYVALmode-EXPRmode (site: trait LowPrio) | |
| | |-- Select[scala.Tuple2[R, O], R] TYPEmode (site: method autoLeft in LowPrio) | |
| | | |-- scala.Tuple2[R, O] TYPEmode (site: method autoLeft in LowPrio) | |
| | | | |-- R TYPEmode (site: method autoLeft in LowPrio) | |
| | | | | \-> R | |
| | | | |-- O TYPEmode (site: method autoLeft in LowPrio) | |
| | | | | \-> O | |
| | | | \-> (R, O) | |
| | | |-- R TYPEmode (site: method autoLeft in LowPrio) | |
| | | | \-> R | |
| | | \-> Select[(R, O),R] | |
| | |-- Select[T,R] TYPEmode (site: method autoLeft in LowPrio) | |
| | | |-- (T1, T2) TYPEmode (site: method autoLeft in LowPrio) | |
| | | | \-> (R, O) | |
| | | \-> Select[(R, O),R] | |
| | |-- Select(((x$1) => x$1._1)) : pt=Select[(R, O),R] EXPRmode (site: method autoLeft in LowPrio) | |
| | | |-- Select BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method autoLeft in LowPrio) | |
| | | | |-- LowPrio FUNmode-TYPEmode (site: object Select) | |
| | | | | \-> LowPrio | |
| | | | |-- LowPrio TYPEmode (site: object Select) | |
| | | | | \-> LowPrio | |
| | | | |-- Select.apply BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method autoLeft in LowPrio) | |
| | | | | [adapt] [T, R](f: T => R)Select[T,R] adapted to [T, R](f: T => R)Select[T,R] | |
| | | | | \-> (f: T => R)Select[T,R] | |
| | | | [adapt] Select.type adapted to [T, R](f: T => R)Select[T,R] | |
| | | | \-> (f: T => R)Select[T,R] | |
| | | |-- ((x$1) => x$1._1) : pt=((R, O)) => R BYVALmode-EXPRmode-POLYmode (site: method autoLeft in LowPrio) | |
| | | | |-- x$1._1 : pt=R EXPRmode (site: value $anonfun in LowPrio) | |
| | | | | |-- x$1 EXPRmode-POLYmode-QUALmode (site: value $anonfun in LowPrio) | |
| | | | | | \-> x$1.type (with underlying type (R, O)) | |
| | | | | \-> x$1._1.type (with underlying type R) | |
| | | | \-> ((R, O)) => x$1._1.type forSome { val x$1: (R, O) } | |
| | | solving for (T: ?T, R: ?R) | |
| | | \-> Select[(R, O),R] | |
| | \-> [def autoLeft] [T, R, O]=> Select[(R, O),R] | |
| \-> [trait LowPrio] LowPrio | |
|-- object Select BYVALmode-EXPRmode (site: package <empty>) | |
| |-- super EXPRmode-POLYmode-QUALmode (silent: <init> in Select) | |
| | |-- this EXPRmode (silent: <init> in Select) | |
| | | \-> Select.type | |
| | \-> Select.type | |
| |-- def autoRight[T, R, O] BYVALmode-EXPRmode (site: object Select) | |
| | |-- Select[scala.Tuple2[O, R], R] TYPEmode (site: method autoRight in Select) | |
| | | |-- scala.Tuple2[O, R] TYPEmode (site: method autoRight in Select) | |
| | | | |-- O TYPEmode (site: method autoRight in Select) | |
| | | | | \-> O | |
| | | | |-- R TYPEmode (site: method autoRight in Select) | |
| | | | | \-> R | |
| | | | \-> (O, R) | |
| | | |-- R TYPEmode (site: method autoRight in Select) | |
| | | | \-> R | |
| | | \-> Select[(O, R),R] | |
| | |-- Select[T,R] TYPEmode (site: method autoRight in Select) | |
| | | |-- (T1, T2) TYPEmode (site: method autoRight in Select) | |
| | | | \-> (O, R) | |
| | | \-> Select[(O, R),R] | |
| | |-- Select(((x$2) => x$2._2)) : pt=Select[(O, R),R] EXPRmode (site: method autoRight in Select) | |
| | | |-- Select BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method autoRight in Select) | |
| | | | |-- Select.apply BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method autoRight in Select) | |
| | | | | [adapt] [T, R](f: T => R)Select[T,R] adapted to [T, R](f: T => R)Select[T,R] | |
| | | | | \-> (f: T => R)Select[T,R] | |
| | | | [adapt] Select.type adapted to [T, R](f: T => R)Select[T,R] | |
| | | | \-> (f: T => R)Select[T,R] | |
| | | |-- ((x$2) => x$2._2) : pt=((O, R)) => R BYVALmode-EXPRmode-POLYmode (site: method autoRight in Select) | |
| | | | |-- x$2._2 : pt=R EXPRmode (site: value $anonfun in Select) | |
| | | | | |-- x$2 EXPRmode-POLYmode-QUALmode (site: value $anonfun in Select) | |
| | | | | | \-> x$2.type (with underlying type (O, R)) | |
| | | | | \-> x$2._2.type (with underlying type R) | |
| | | | \-> ((O, R)) => x$2._2.type forSome { val x$2: (O, R) } | |
| | | solving for (T: ?T, R: ?R) | |
| | | \-> Select[(O, R),R] | |
| | \-> [def autoRight] [T, R, O]=> Select[(O, R),R] | |
| \-> [object Select] Select.type | |
|-- object Test BYVALmode-EXPRmode (site: package <empty>) | |
| |-- scala.Tuple2(12, "hello") EXPRmode (site: value x in Test) | |
| | |-- scala.Tuple2 BYVALmode-EXPRmode-FUNmode-POLYmode (silent: value x in Test) | |
| | | |-- scala.Tuple2.apply BYVALmode-EXPRmode-FUNmode-POLYmode (silent: value x in Test) | |
| | | | [adapt] [T1, T2](_1: T1, _2: T2)(T1, T2) adapted to [T1, T2](_1: T1, _2: T2)(T1, T2) | |
| | | | \-> (_1: T1, _2: T2)(T1, T2) | |
| | | [adapt] Tuple2.type adapted to [T1, T2](_1: T1, _2: T2)(T1, T2) | |
| | | \-> (_1: T1, _2: T2)(T1, T2) | |
| | |-- 12 BYVALmode-EXPRmode-POLYmode (site: value x in Test) | |
| | | \-> Int(12) | |
| | |-- "hello" BYVALmode-EXPRmode-POLYmode (site: value x in Test) | |
| | | \-> String("hello") | |
| | solving for (T1: ?T1, T2: ?T2) | |
| | \-> (Int, String) | |
| |-- Int TYPEmode (site: value y in Test) | |
| | \-> Int | |
| |-- Int TYPEmode (site: value y in Test) | |
| | \-> Int | |
| |-- String TYPEmode (site: value z in Test) | |
| | [adapt] String is now a TypeTree(String) | |
| | \-> String | |
| |-- String TYPEmode (site: value z in Test) | |
| | [adapt] String is now a TypeTree(String) | |
| | \-> String | |
| |-- super EXPRmode-POLYmode-QUALmode (silent: <init> in Test) | |
| | |-- this EXPRmode (silent: <init> in Test) | |
| | | \-> Test.type | |
| | \-> Test.type | |
| |-- def select[T, R] BYVALmode-EXPRmode (site: object Test) | |
| | |-- R TYPEmode (site: method select in Test) | |
| | | \-> R | |
| | |-- T TYPEmode (site: value t in Test) | |
| | | \-> T | |
| | |-- Select[T, R] TYPEmode (site: value sel in Test) | |
| | | |-- T TYPEmode (site: value sel in Test) | |
| | | | \-> T | |
| | | |-- R TYPEmode (site: value sel in Test) | |
| | | | \-> R | |
| | | \-> Select[T,R] | |
| | |-- Select[T,R] TYPEmode (site: value sel in Test) | |
| | | \-> Select[T,R] | |
| | |-- sel(t) : pt=R EXPRmode (site: method select in Test) | |
| | | |-- sel BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method select in Test) | |
| | | | |-- sel.apply BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method select in Test) | |
| | | | | \-> (t: T)R | |
| | | | [adapt] Select[T,R] adapted to (t: T)R | |
| | | | \-> (t: T)R | |
| | | |-- t : pt=T BYVALmode-EXPRmode (silent: method select in Test) | |
| | | | \-> T | |
| | | \-> R | |
| | \-> [def select] [T, R](t: T)(implicit sel: Select[T,R])R | |
| |-- (Int, String) BYVALmode-EXPRmode (site: object Test) | |
| | \-> [val x ] (Int, String) | |
| |-- def x BYVALmode-EXPRmode (site: object Test) | |
| | |-- (Int, String) : pt=(Int, String) EXPRmode (site: value x in Test) | |
| | | |-- Test.type EXPRmode-POLYmode-QUALmode (site: value x in Test) | |
| | | | \-> Test.type | |
| | | \-> (Int, String) | |
| | \-> [def x] => (Int, String) | |
| |-- Int BYVALmode-EXPRmode (site: object Test) | |
| | |-- Int TYPEmode (site: value y in Test) | |
| | | \-> Int | |
| | |-- select(x) : pt=Int BYVALmode-EXPRmode (site: value y in Test) | |
| | | |-- select BYVALmode-EXPRmode-FUNmode-POLYmode (silent: value y in Test) | |
| | | | [adapt] [T, R](t: T)(implicit sel: Select[T,R])R adapted to [T, R](t: T)(implicit sel: Select[T,R])R | |
| | | | \-> (t: T)(implicit sel: Select[T,R])R | |
| | | |-- x BYVALmode-EXPRmode-POLYmode (site: value y in Test) | |
| | | | \-> (Int, String) | |
| | | solving for (T: ?T, R: ?R) | |
| | | solving for (R: ?R) | |
| | | solving for (T: ?T, R: ?R, O: ?O) | |
| | | [adapt] [T, R, O]=> Select[(O, R),R] adapted to [T, R, O]=> Select[(O, R),R] based on pt Select[(Int, String),Int] | |
| | | solving for (T: ?T, R: ?R, O: ?O) | |
| | | [adapt] [T, R, O]=> Select[(R, O),R] adapted to [T, R, O]=> Select[(R, O),R] based on pt Select[(Int, String),Int] | |
| | | |-- [T, R](t: T)(implicit sel: Select[T,R])R : pt=Int BYVALmode-EXPRmode (silent: value y in Test) | |
| | | | \-> Int | |
| | | [adapt] [T, R](t: T)(implicit sel: Select[T,R])R adapted to [T, R](t: T)(implicit sel: Select[T,R])R based on pt Int | |
| | | \-> Int | |
| | \-> [val y ] Int | |
| |-- def y BYVALmode-EXPRmode (site: object Test) | |
| | |-- Int : pt=Int EXPRmode (site: value y in Test) | |
| | | |-- Test.type EXPRmode-POLYmode-QUALmode (site: value y in Test) | |
| | | | \-> Test.type | |
| | | \-> Int | |
| | \-> [def y] => Int | |
| |-- String BYVALmode-EXPRmode (site: object Test) | |
| | |-- String TYPEmode (site: value z in Test) | |
| | | [adapt] String is now a TypeTree(String) | |
| | | \-> String | |
| | |-- select(x) : pt=String BYVALmode-EXPRmode (site: value z in Test) | |
| | | |-- select BYVALmode-EXPRmode-FUNmode-POLYmode (silent: value z in Test) | |
| | | | [adapt] [T, R](t: T)(implicit sel: Select[T,R])R adapted to [T, R](t: T)(implicit sel: Select[T,R])R | |
| | | | \-> (t: T)(implicit sel: Select[T,R])R | |
| | | |-- x BYVALmode-EXPRmode-POLYmode (site: value z in Test) | |
| | | | \-> (Int, String) | |
| | | solving for (T: ?T, R: ?R) | |
| | | solving for (R: ?R) | |
| | | solving for (T: ?T, R: ?R, O: ?O) | |
| | | [adapt] [T, R, O]=> Select[(R, O),R] adapted to [T, R, O]=> Select[(R, O),R] based on pt Select[(Int, String),String] | |
| | | solving for (T: ?T, R: ?R, O: ?O) | |
| | | [adapt] [T, R, O]=> Select[(O, R),R] adapted to [T, R, O]=> Select[(O, R),R] based on pt Select[(Int, String),String] | |
| | | |-- [T, R](t: T)(implicit sel: Select[T,R])R : pt=String BYVALmode-EXPRmode (silent: value z in Test) | |
| | | | \-> String | |
| | | [adapt] [T, R](t: T)(implicit sel: Select[T,R])R adapted to [T, R](t: T)(implicit sel: Select[T,R])R based on pt String | |
| | | \-> String | |
| | \-> [val z ] String | |
| |-- def z BYVALmode-EXPRmode (site: object Test) | |
| | |-- String : pt=String EXPRmode (site: value z in Test) | |
| | | |-- Test.type EXPRmode-POLYmode-QUALmode (site: value z in Test) | |
| | | | \-> Test.type | |
| | | \-> String | |
| | \-> [def z] => String | |
| \-> [object Test] Test.type | |
|-- (_1: <?>, _2: <?>)(T1, T2) EXPRmode-FUNmode-POLYmode-TAPPmode (site: object Test) implicits disabled | |
| |-- new (Int, String) EXPRmode-POLYmode-QUALmode (site: object Test) implicits disabled | |
| | \-> (Int, String) | |
| \-> (_1: Int, _2: String)(Int, String) | |
|-- { @SerialVersionUID(0) final <synthetic> class $anonfun e... EXPRmode (site: method autoLeft in LowPrio) implicits disabled | |
| |-- class $anonfun BYVALmode-EXPRmode (site: method autoLeft in LowPrio) implicits disabled | |
| | |-- super EXPRmode-POLYmode-QUALmode (silent: <init> in $anonfun) implicits disabled | |
| | | |-- this EXPRmode (silent: <init> in $anonfun) implicits disabled | |
| | | | \-> scala.runtime.AbstractFunction1[(R, O),x$1._1.type forSome { val x$1: (R, O) }] with Serializable | |
| | | \-> super.type (with underlying type scala.runtime.AbstractFunction1[(R, O),x$1._1.type forSome { val x$1: (R, O) }]) | |
| | |-- def apply BYVALmode-EXPRmode (site: anonymous class $anonfun) implicits disabled | |
| | | \-> [def apply] (x$1: (R, O))x$1._1.type forSome { val x$1: (R, O) } | |
| | \-> [class $anonfun] scala.runtime.AbstractFunction1[(R, O),x$1._1.type forSome { val x$1: (R, O) }] with Serializable | |
| |-- (new <$anon: ((R, O)) => x$1._1.type forSome { val x$1: (... EXPRmode (site: method autoLeft in LowPrio) implicits disabled | |
| | |-- new <$anon: ((R, O)) => x$1._1.type forSome { val x$1: (R... : pt=((R, O)) => x$1._1.type forSome { val x$1: (R, O) } EXPRmode (site: method autoLeft in LowPrio) implicits disabled | |
| | | |-- new <$anon: ((R, O)) => x$1._1.type forSome { val x$1: (R... BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method autoLeft in LowPrio) implicits disabled | |
| | | | |-- new <$anon: ((R, O)) => x$1._1.type forSome { val x$1: (R... EXPRmode-POLYmode-QUALmode (silent: method autoLeft in LowPrio) implicits disabled | |
| | | | | \-> scala.runtime.AbstractFunction1[(R, O),x$1._1.type forSome { val x$1: (R, O) }] with Serializable | |
| | | | \-> ()scala.runtime.AbstractFunction1[(R, O),x$1._1.type forSome { val x$1: (R, O) }] with Serializable | |
| | | \-> scala.runtime.AbstractFunction1[(R, O),x$1._1.type forSome { val x$1: (R, O) }] with Serializable | |
| | \-> ((R, O)) => x$1._1.type forSome { val x$1: (R, O) } | |
| \-> ((R, O)) => x$1._1.type forSome { val x$1: (R, O) } | |
|-- { @SerialVersionUID(0) final <synthetic> class $anonfun e... EXPRmode (site: method autoRight in Select) implicits disabled | |
| |-- class $anonfun BYVALmode-EXPRmode (site: method autoRight in Select) implicits disabled | |
| | |-- super EXPRmode-POLYmode-QUALmode (silent: <init> in $anonfun) implicits disabled | |
| | | |-- this EXPRmode (silent: <init> in $anonfun) implicits disabled | |
| | | | \-> scala.runtime.AbstractFunction1[(O, R),x$2._2.type forSome { val x$2: (O, R) }] with Serializable | |
| | | \-> super.type (with underlying type scala.runtime.AbstractFunction1[(O, R),x$2._2.type forSome { val x$2: (O, R) }]) | |
| | |-- def apply BYVALmode-EXPRmode (site: anonymous class $anonfun) implicits disabled | |
| | | \-> [def apply] (x$2: (O, R))x$2._2.type forSome { val x$2: (O, R) } | |
| | \-> [class $anonfun] scala.runtime.AbstractFunction1[(O, R),x$2._2.type forSome { val x$2: (O, R) }] with Serializable | |
| |-- (new <$anon: ((O, R)) => x$2._2.type forSome { val x$2: (... EXPRmode (site: method autoRight in Select) implicits disabled | |
| | |-- new <$anon: ((O, R)) => x$2._2.type forSome { val x$2: (O... : pt=((O, R)) => x$2._2.type forSome { val x$2: (O, R) } EXPRmode (site: method autoRight in Select) implicits disabled | |
| | | |-- new <$anon: ((O, R)) => x$2._2.type forSome { val x$2: (O... BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method autoRight in Select) implicits disabled | |
| | | | |-- new <$anon: ((O, R)) => x$2._2.type forSome { val x$2: (O... EXPRmode-POLYmode-QUALmode (silent: method autoRight in Select) implicits disabled | |
| | | | | \-> scala.runtime.AbstractFunction1[(O, R),x$2._2.type forSome { val x$2: (O, R) }] with Serializable | |
| | | | \-> ()scala.runtime.AbstractFunction1[(O, R),x$2._2.type forSome { val x$2: (O, R) }] with Serializable | |
| | | \-> scala.runtime.AbstractFunction1[(O, R),x$2._2.type forSome { val x$2: (O, R) }] with Serializable | |
| | \-> ((O, R)) => x$2._2.type forSome { val x$2: (O, R) } | |
| \-> ((O, R)) => x$2._2.type forSome { val x$2: (O, R) } | |
|-- (v1: T1)R EXPRmode-FUNmode-POLYmode-TAPPmode (site: method apply in $anon) implicits disabled | |
| \-> (v1: T)R | |
|-- ()T1 EXPRmode-FUNmode-POLYmode-TAPPmode (site: method apply in $anonfun) implicits disabled | |
| \-> ()R | |
|-- ()T2 EXPRmode-FUNmode-POLYmode-TAPPmode (site: method apply in $anonfun) implicits disabled | |
| \-> ()R | |
|-- def LowPrio$$anon$$$outer EXPRmode (site: anonymous class $anon) implicits disabled | |
| |-- LowPrio.this.type : pt=LowPrio.this.type EXPRmode (site: value LowPrio$$anon$$$outer in $anon) implicits disabled | |
| | |-- Select[T,R]{val $outer(): LowPrio.this.type} EXPRmode-POLYmode-QUALmode (site: value LowPrio$$anon$$$outer in $anon) implicits disabled | |
| | | \-> LowPrio.$anon.type (with underlying type Select[T,R]{val $outer(): LowPrio.this.type}) | |
| | \-> this.$outer.type (with underlying type LowPrio) | |
| \-> [def LowPrio$$anon$$$outer] ()LowPrio.this.type (with underlying type ()LowPrio.this.type) | |
|-- def LowPrio$$anonfun$$$outer EXPRmode (site: anonymous class $anonfun) implicits disabled | |
| |-- LowPrio.this.type : pt=LowPrio.this.type EXPRmode (site: value LowPrio$$anonfun$$$outer in $anonfun) implicits disabled | |
| | |-- scala.runtime.AbstractFunction1[(R, O),x$1._1.type forSom... EXPRmode-POLYmode-QUALmode (site: value LowPrio$$anonfun$$$outer in $anonfun) implicits disabled | |
| | | \-> LowPrio.$anonfun.type (with underlying type scala.runtime.AbstractFunction1[(R, O),x$1._1.type forSome { val x$1: (R, O) }] with Serializable{val $outer(): LowPrio.this.type}) | |
| | \-> this.$outer.type (with underlying type LowPrio) | |
| \-> [def LowPrio$$anonfun$$$outer] ()LowPrio.this.type (with underlying type ()LowPrio.this.type) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|-- <empty> EXPRmode-POLYmode-QUALmode (site: package <root>) | |
| \-> <empty>.type | |
|-- class Select[T, R] BYVALmode-EXPRmode (site: package <empty>) | |
| |-- def apply BYVALmode-EXPRmode (site: trait Select) | |
| | |-- R TYPEmode (site: method apply in Select) | |
| | | \-> R | |
| | |-- T TYPEmode (site: value t in Select) | |
| | | \-> T | |
| | \-> [def apply] (t: T)R | |
| \-> [trait Select] Select[T,R] | |
|-- class LowPrio BYVALmode-EXPRmode (site: package <empty>) | |
| |-- def $init$ BYVALmode-EXPRmode (site: trait LowPrio) | |
| | \-> [def $init$] ()Unit | |
| |-- def apply[T, R] BYVALmode-EXPRmode (site: trait LowPrio) | |
| | |-- Select[T, R] TYPEmode (site: method apply in LowPrio) | |
| | | |-- T TYPEmode (site: method apply in LowPrio) | |
| | | | \-> T | |
| | | |-- R TYPEmode (site: method apply in LowPrio) | |
| | | | \-> R | |
| | | \-> Select[T,R] | |
| | |-- _root_.scala.Function1[T, R] TYPEmode (site: value f in LowPrio) | |
| | | |-- T TYPEmode (site: value f in LowPrio) | |
| | | | \-> T | |
| | | |-- R TYPEmode (site: value f in LowPrio) | |
| | | | \-> R | |
| | | \-> T => R | |
| | |-- _root_.scala.Function1[T, R] TYPEmode (site: value f in LowPrio) | |
| | | \-> T => R | |
| | |-- Select[T,R] TYPEmode (site: method apply in LowPrio) | |
| | | \-> Select[T,R] | |
| | |-- { final class $anon extends Select[T, R] { def <init>() =... : pt=Select[T,R] EXPRmode (site: method apply in LowPrio) | |
| | | |-- Select FUNmode-TYPEmode (site: anonymous class $anon) | |
| | | | \-> Select | |
| | | |-- Select[T, R] TYPEmode (site: anonymous class $anon) | |
| | | | |-- T TYPEmode (site: anonymous class $anon) | |
| | | | | \-> T | |
| | | | |-- R TYPEmode (site: anonymous class $anon) | |
| | | | | \-> R | |
| | | | \-> Select[T,R] | |
| | | |-- R TYPEmode (site: method apply in $anon) | |
| | | | \-> R | |
| | | |-- T TYPEmode (site: value t in $anon) | |
| | | | \-> T | |
| | | |-- class $anon BYVALmode-EXPRmode (site: method apply in LowPrio) | |
| | | | |-- Select[T,R] TYPEmode (site: anonymous class $anon) | |
| | | | | \-> Select[T,R] | |
| | | | |-- super EXPRmode-POLYmode-QUALmode (silent: <init> in $anon) | |
| | | | | |-- this EXPRmode (silent: <init> in $anon) | |
| | | | | | \-> Select[T,R] | |
| | | | | \-> super.type (with underlying type AnyRef) | |
| | | | |-- def apply BYVALmode-EXPRmode (site: anonymous class $anon) | |
| | | | | |-- f(t) : pt=R EXPRmode (site: method apply in $anon) | |
| | | | | | |-- f BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method apply in $anon) | |
| | | | | | | |-- f.apply BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method apply in $anon) | |
| | | | | | | | \-> (v1: T)R | |
| | | | | | | [adapt] T => R adapted to (v1: T1)R | |
| | | | | | | \-> (v1: T)R | |
| | | | | | |-- t : pt=T BYVALmode-EXPRmode (silent: method apply in $anon) | |
| | | | | | | \-> T | |
| | | | | | \-> R | |
| | | | | \-> [def apply] (t: T)R | |
| | | | \-> [class $anon] Select[T,R] | |
| | | |-- new $anon() : pt=Select[T,R] EXPRmode (site: method apply in LowPrio) | |
| | | | |-- new $anon BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method apply in LowPrio) | |
| | | | | |-- new $anon EXPRmode-POLYmode-QUALmode (silent: method apply in LowPrio) | |
| | | | | | |-- $anon FUNmode-TYPEmode (silent: method apply in LowPrio) | |
| | | | | | | \-> Select[T,R] | |
| | | | | | \-> Select[T,R] | |
| | | | | \-> ()Select[T,R] | |
| | | | \-> Select[T,R] | |
| | | \-> Select[T,R] | |
| | \-> [def apply] [T, R](f: T => R)Select[T,R] | |
| |-- def autoLeft[T, R, O] BYVALmode-EXPRmode (site: trait LowPrio) | |
| | |-- Select[scala.Tuple2[R, O], R] TYPEmode (site: method autoLeft in LowPrio) | |
| | | |-- scala.Tuple2[R, O] TYPEmode (site: method autoLeft in LowPrio) | |
| | | | |-- R TYPEmode (site: method autoLeft in LowPrio) | |
| | | | | \-> R | |
| | | | |-- O TYPEmode (site: method autoLeft in LowPrio) | |
| | | | | \-> O | |
| | | | \-> (R, O) | |
| | | |-- R TYPEmode (site: method autoLeft in LowPrio) | |
| | | | \-> R | |
| | | \-> Select[(R, O),R] | |
| | |-- Select[T,R] TYPEmode (site: method autoLeft in LowPrio) | |
| | | |-- (T1, T2) TYPEmode (site: method autoLeft in LowPrio) | |
| | | | \-> (R, O) | |
| | | \-> Select[(R, O),R] | |
| | |-- Select(((x$1) => x$1._1)) : pt=Select[(R, O),R] EXPRmode (site: method autoLeft in LowPrio) | |
| | | |-- Select BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method autoLeft in LowPrio) | |
| | | | |-- LowPrio FUNmode-TYPEmode (site: object Select) | |
| | | | | \-> LowPrio | |
| | | | |-- LowPrio TYPEmode (site: object Select) | |
| | | | | \-> LowPrio | |
| | | | |-- Select.apply BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method autoLeft in LowPrio) | |
| | | | | [adapt] [T, R](f: T => R)Select[T,R] adapted to [T, R](f: T => R)Select[T,R] | |
| | | | | \-> (f: T => R)Select[T,R] | |
| | | | [adapt] Select.type adapted to [T, R](f: T => R)Select[T,R] | |
| | | | \-> (f: T => R)Select[T,R] | |
| | | |-- ((x$1) => x$1._1) : pt=((R, O)) => R BYVALmode-EXPRmode-POLYmode (site: method autoLeft in LowPrio) | |
| | | | |-- x$1._1 : pt=R EXPRmode (site: value $anonfun in LowPrio) | |
| | | | | |-- x$1 EXPRmode-POLYmode-QUALmode (site: value $anonfun in LowPrio) | |
| | | | | | \-> x$1.type (with underlying type (R, O)) | |
| | | | | \-> x$1._1.type (with underlying type R) | |
| | | | \-> ((R, O)) => x$1._1.type forSome { val x$1: (R, O) } | |
| | | solving for (T: ?T, R: ?R) | |
| | | \-> Select[(R, O),R] | |
| | \-> [def autoLeft] [T, R, O]=> Select[(R, O),R] | |
| \-> [trait LowPrio] LowPrio | |
|-- object Select BYVALmode-EXPRmode (site: package <empty>) | |
| |-- super EXPRmode-POLYmode-QUALmode (silent: <init> in Select) | |
| | |-- this EXPRmode (silent: <init> in Select) | |
| | | \-> Select.type | |
| | \-> Select.type | |
| |-- def autoRight[T, R, O] BYVALmode-EXPRmode (site: object Select) | |
| | |-- Select[scala.Tuple2[O, R], R] TYPEmode (site: method autoRight in Select) | |
| | | |-- scala.Tuple2[O, R] TYPEmode (site: method autoRight in Select) | |
| | | | |-- O TYPEmode (site: method autoRight in Select) | |
| | | | | \-> O | |
| | | | |-- R TYPEmode (site: method autoRight in Select) | |
| | | | | \-> R | |
| | | | \-> (O, R) | |
| | | |-- R TYPEmode (site: method autoRight in Select) | |
| | | | \-> R | |
| | | \-> Select[(O, R),R] | |
| | |-- Select[T,R] TYPEmode (site: method autoRight in Select) | |
| | | |-- (T1, T2) TYPEmode (site: method autoRight in Select) | |
| | | | \-> (O, R) | |
| | | \-> Select[(O, R),R] | |
| | |-- Select(((x$2) => x$2._2)) : pt=Select[(O, R),R] EXPRmode (site: method autoRight in Select) | |
| | | |-- Select BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method autoRight in Select) | |
| | | | |-- Select.apply BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method autoRight in Select) | |
| | | | | [adapt] [T, R](f: T => R)Select[T,R] adapted to [T, R](f: T => R)Select[T,R] | |
| | | | | \-> (f: T => R)Select[T,R] | |
| | | | [adapt] Select.type adapted to [T, R](f: T => R)Select[T,R] | |
| | | | \-> (f: T => R)Select[T,R] | |
| | | |-- ((x$2) => x$2._2) : pt=((O, R)) => R BYVALmode-EXPRmode-POLYmode (site: method autoRight in Select) | |
| | | | |-- x$2._2 : pt=R EXPRmode (site: value $anonfun in Select) | |
| | | | | |-- x$2 EXPRmode-POLYmode-QUALmode (site: value $anonfun in Select) | |
| | | | | | \-> x$2.type (with underlying type (O, R)) | |
| | | | | \-> x$2._2.type (with underlying type R) | |
| | | | \-> ((O, R)) => x$2._2.type forSome { val x$2: (O, R) } | |
| | | solving for (T: ?T, R: ?R) | |
| | | \-> Select[(O, R),R] | |
| | \-> [def autoRight] [T, R, O]=> Select[(O, R),R] | |
| \-> [object Select] Select.type | |
|-- object Test BYVALmode-EXPRmode (site: package <empty>) | |
| |-- scala.Tuple2(12, "hello") EXPRmode (site: value x in Test) | |
| | |-- scala.Tuple2 BYVALmode-EXPRmode-FUNmode-POLYmode (silent: value x in Test) | |
| | | |-- scala.Tuple2.apply BYVALmode-EXPRmode-FUNmode-POLYmode (silent: value x in Test) | |
| | | | [adapt] [T1, T2](_1: T1, _2: T2)(T1, T2) adapted to [T1, T2](_1: T1, _2: T2)(T1, T2) | |
| | | | \-> (_1: T1, _2: T2)(T1, T2) | |
| | | [adapt] Tuple2.type adapted to [T1, T2](_1: T1, _2: T2)(T1, T2) | |
| | | \-> (_1: T1, _2: T2)(T1, T2) | |
| | |-- 12 BYVALmode-EXPRmode-POLYmode (site: value x in Test) | |
| | | \-> Int(12) | |
| | |-- "hello" BYVALmode-EXPRmode-POLYmode (site: value x in Test) | |
| | | \-> String("hello") | |
| | solving for (T1: ?T1, T2: ?T2) | |
| | \-> (Int, String) | |
| |-- Int TYPEmode (site: value y in Test) | |
| | \-> Int | |
| |-- Int TYPEmode (site: value y in Test) | |
| | \-> Int | |
| |-- String TYPEmode (site: value z in Test) | |
| | [adapt] String is now a TypeTree(String) | |
| | \-> String | |
| |-- String TYPEmode (site: value z in Test) | |
| | [adapt] String is now a TypeTree(String) | |
| | \-> String | |
| |-- super EXPRmode-POLYmode-QUALmode (silent: <init> in Test) | |
| | |-- this EXPRmode (silent: <init> in Test) | |
| | | \-> Test.type | |
| | \-> Test.type | |
| |-- def select[T, R] BYVALmode-EXPRmode (site: object Test) | |
| | |-- R TYPEmode (site: method select in Test) | |
| | | \-> R | |
| | |-- T TYPEmode (site: value t in Test) | |
| | | \-> T | |
| | |-- Select[T, R] TYPEmode (site: value sel in Test) | |
| | | |-- T TYPEmode (site: value sel in Test) | |
| | | | \-> T | |
| | | |-- R TYPEmode (site: value sel in Test) | |
| | | | \-> R | |
| | | \-> Select[T,R] | |
| | |-- Select[T,R] TYPEmode (site: value sel in Test) | |
| | | \-> Select[T,R] | |
| | |-- sel(t) : pt=R EXPRmode (site: method select in Test) | |
| | | |-- sel BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method select in Test) | |
| | | | |-- sel.apply BYVALmode-EXPRmode-FUNmode-POLYmode (silent: method select in Test) | |
| | | | | \-> (t: T)R | |
| | | | [adapt] Select[T,R] adapted to (t: T)R | |
| | | | \-> (t: T)R | |
| | | |-- t : pt=T BYVALmode-EXPRmode (silent: method select in Test) | |
| | | | \-> T | |
| | | \-> R | |
| | \-> [def select] [T, R](t: T)(implicit sel: Select[T,R])R | |
| |-- (Int, String) BYVALmode-EXPRmode (site: object Test) | |
| | \-> [val x ] (Int, String) | |
| |-- def x BYVALmode-EXPRmode (site: object Test) | |
| | |-- (Int, String) : pt=(Int, String) EXPRmode (site: value x in Test) | |
| | | |-- Test.type EXPRmode-POLYmode-QUALmode (site: value x in Test) | |
| | | | \-> Test.type | |
| | | \-> (Int, String) | |
| | \-> [def x] => (Int, String) | |
| |-- Int BYVALmode-EXPRmode (site: object Test) | |
| | |-- Int TYPEmode (site: value y in Test) | |
| | | \-> Int | |
| | |-- select(x) : pt=Int BYVALmode-EXPRmode (site: value y in Test) | |
| | | |-- select BYVALmode-EXPRmode-FUNmode-POLYmode (silent: value y in Test) | |
| | | | [adapt] [T, R](t: T)(implicit sel: Select[T,R])R adapted to [T, R](t: T)(implicit sel: Select[T,R])R | |
| | | | \-> (t: T)(implicit sel: Select[T,R])R | |
| | | |-- x BYVALmode-EXPRmode-POLYmode (site: value y in Test) | |
| | | | \-> (Int, String) | |
| | | solving for (T: ?T, R: ?R) | |
| | | solving for (R: ?R) | |
| | | solving for (T: ?T, R: ?R, O: ?O) | |
| | | [adapt] [T, R, O]=> Select[(O, R),R] adapted to [T, R, O]=> Select[(O, R),R] based on pt Select[(Int, String),R] | |
| | | solving for (R: ?R) | |
| | | |-- [T, R](t: T)(implicit sel: Select[T,R])R : pt=Int BYVALmode-EXPRmode (silent: value y in Test) | |
| | | | \-> <error> | |
| | | |-- select(x) BYVALmode-EXPRmode (site: value y in Test) | |
| | | | |-- select BYVALmode-EXPRmode-FUNmode-POLYmode (silent: value y in Test) | |
| | | | | [adapt] [T, R](t: T)(implicit sel: Select[T,R])R adapted to [T, R](t: T)(implicit sel: Select[T,R])R | |
| | | | | \-> (t: T)(implicit sel: Select[T,R])R | |
| | | | |-- x BYVALmode-EXPRmode-POLYmode (site: value y in Test) | |
| | | | | \-> (Int, String) | |
| | | | solving for (T: ?T, R: ?R) | |
| | | | solving for (R: ?R) | |
| | | | solving for (T: ?T, R: ?R, O: ?O) | |
| | | | [adapt] [T, R, O]=> Select[(O, R),R] adapted to [T, R, O]=> Select[(O, R),R] based on pt Select[(Int, String),R] | |
| | | | solving for (R: ?R) | |
| | | | |-- [T, R](t: T)(implicit sel: Select[T,R])R BYVALmode-EXPRmode (site: value y in Test) | |
| | | | | \-> String | |
| | | | [adapt] [T, R](t: T)(implicit sel: Select[T,R])R adapted to [T, R](t: T)(implicit sel: Select[T,R])R | |
| | | | \-> String | |
0.test-2.scala:20: error: type mismatch; | |
found : String | |
required: Int | |
val y: Int = select(x) | |
^ | |
| | | [adapt] [T, R](t: T)(implicit sel: Select[T,R])R adapted to [T, R](t: T)(implicit sel: Select[T,R])R based on pt Int | |
| | | \-> <error> | |
| | \-> [val y ] Int | |
| |-- def y BYVALmode-EXPRmode (site: object Test) | |
| | |-- Int : pt=Int EXPRmode (site: value y in Test) | |
| | | |-- Test.type EXPRmode-POLYmode-QUALmode (site: value y in Test) | |
| | | | \-> Test.type | |
| | | \-> Int | |
| | \-> [def y] => Int | |
| |-- String BYVALmode-EXPRmode (site: object Test) | |
| | |-- String TYPEmode (site: value z in Test) | |
| | | [adapt] String is now a TypeTree(String) | |
| | | \-> String | |
| | |-- select(x) : pt=String BYVALmode-EXPRmode (site: value z in Test) | |
| | | |-- select BYVALmode-EXPRmode-FUNmode-POLYmode (silent: value z in Test) | |
| | | | [adapt] [T, R](t: T)(implicit sel: Select[T,R])R adapted to [T, R](t: T)(implicit sel: Select[T,R])R | |
| | | | \-> (t: T)(implicit sel: Select[T,R])R | |
| | | |-- x BYVALmode-EXPRmode-POLYmode (site: value z in Test) | |
| | | | \-> (Int, String) | |
| | | solving for (T: ?T, R: ?R) | |
| | | solving for (R: ?R) | |
| | | solving for (T: ?T, R: ?R, O: ?O) | |
| | | [adapt] [T, R, O]=> Select[(O, R),R] adapted to [T, R, O]=> Select[(O, R),R] based on pt Select[(Int, String),R] | |
| | | solving for (R: ?R) | |
| | | |-- [T, R](t: T)(implicit sel: Select[T,R])R : pt=String BYVALmode-EXPRmode (silent: value z in Test) | |
| | | | \-> String | |
| | | [adapt] [T, R](t: T)(implicit sel: Select[T,R])R adapted to [T, R](t: T)(implicit sel: Select[T,R])R based on pt String | |
| | | \-> String | |
| | \-> [val z ] String | |
| |-- def z BYVALmode-EXPRmode (site: object Test) | |
| | |-- String : pt=String EXPRmode (site: value z in Test) | |
| | | |-- Test.type EXPRmode-POLYmode-QUALmode (site: value z in Test) | |
| | | | \-> Test.type | |
| | | \-> String | |
| | \-> [def z] => String | |
| \-> [object Test] Test.type |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment