|
| 1 | +-- [E057] Type Mismatch Error: tests/neg-custom-args/i11637.scala:11:33 ------------------------------------------------ |
| 2 | +11 | var h = new HKT3_1[FunctorImpl](); // error // error |
| 3 | + | ^ |
| 4 | + | Type argument test2.FunctorImpl does not conform to upper bound [Generic2[T] <: Set[T]] =>> Any |
| 5 | + |
| 6 | +Explanation |
| 7 | +=========== |
| 8 | + |
| 9 | +I tried to show that |
| 10 | + test2.FunctorImpl |
| 11 | +conforms to |
| 12 | + [Generic2[T] <: Set[T]] =>> Any |
| 13 | +but the comparison trace ended with `false`: |
| 14 | + |
| 15 | + ==> test2.FunctorImpl <: [Generic2[T] <: Set[T]] =>> Any |
| 16 | + ==> test2.FunctorImpl <: [Generic2[T] <: Set[T]] =>> Any (recurring) |
| 17 | + ==> type bounds [[T] <: Set[T]] <: type bounds [[T] <: Iterable[T]] |
| 18 | + ==> type bounds [[T] <: Set[T]] <: type bounds [[T] <: Iterable[T]] (recurring) |
| 19 | + ==> [T <: String] =>> Set[T] <: Iterable |
| 20 | + ==> [T <: String] =>> Set[T] <: Iterable (recurring) |
| 21 | + ==> type bounds [] <: type bounds [ <: String] |
| 22 | + ==> type bounds [] <: type bounds [ <: String] (recurring) |
| 23 | + ==> Any <: String |
| 24 | + ==> Any <: String (recurring) |
| 25 | + ==> Any <: String (recurring) |
| 26 | + <== Any <: String (recurring) = false |
| 27 | + <== Any <: String (recurring) = false |
| 28 | + <== Any <: String = false |
| 29 | + <== type bounds [] <: type bounds [ <: String] (recurring) = false |
| 30 | + <== type bounds [] <: type bounds [ <: String] = false |
| 31 | + <== [T <: String] =>> Set[T] <: Iterable (recurring) = false |
| 32 | + <== [T <: String] =>> Set[T] <: Iterable = false |
| 33 | + <== type bounds [[T] <: Set[T]] <: type bounds [[T] <: Iterable[T]] (recurring) = false |
| 34 | + <== type bounds [[T] <: Set[T]] <: type bounds [[T] <: Iterable[T]] = false |
| 35 | + <== test2.FunctorImpl <: [Generic2[T] <: Set[T]] =>> Any (recurring) = false |
| 36 | + <== test2.FunctorImpl <: [Generic2[T] <: Set[T]] =>> Any = false |
| 37 | + |
| 38 | +The tests were made under the empty constraint |
| 39 | + |
| 40 | +-- [E057] Type Mismatch Error: tests/neg-custom-args/i11637.scala:11:21 ------------------------------------------------ |
| 41 | +11 | var h = new HKT3_1[FunctorImpl](); // error // error |
| 42 | + | ^ |
| 43 | + | Type argument test2.FunctorImpl does not conform to upper bound [Generic2[T] <: Set[T]] =>> Any |
| 44 | + |
| 45 | +Explanation |
| 46 | +=========== |
| 47 | + |
| 48 | +I tried to show that |
| 49 | + test2.FunctorImpl |
| 50 | +conforms to |
| 51 | + [Generic2[T] <: Set[T]] =>> Any |
| 52 | +but the comparison trace ended with `false`: |
| 53 | + |
| 54 | + ==> test2.FunctorImpl <: [Generic2[T] <: Set[T]] =>> Any |
| 55 | + ==> test2.FunctorImpl <: [Generic2[T] <: Set[T]] =>> Any (recurring) |
| 56 | + ==> type bounds [[T] <: Set[T]] <: type bounds [[T] <: Iterable[T]] |
| 57 | + ==> type bounds [[T] <: Set[T]] <: type bounds [[T] <: Iterable[T]] (recurring) |
| 58 | + ==> [T <: String] =>> Set[T] <: Iterable |
| 59 | + ==> [T <: String] =>> Set[T] <: Iterable (recurring) |
| 60 | + ==> type bounds [] <: type bounds [ <: String] |
| 61 | + ==> type bounds [] <: type bounds [ <: String] (recurring) |
| 62 | + ==> Any <: String |
| 63 | + ==> Any <: String (recurring) |
| 64 | + ==> Any <: String (recurring) |
| 65 | + <== Any <: String (recurring) = false |
| 66 | + <== Any <: String (recurring) = false |
| 67 | + <== Any <: String = false |
| 68 | + <== type bounds [] <: type bounds [ <: String] (recurring) = false |
| 69 | + <== type bounds [] <: type bounds [ <: String] = false |
| 70 | + <== [T <: String] =>> Set[T] <: Iterable (recurring) = false |
| 71 | + <== [T <: String] =>> Set[T] <: Iterable = false |
| 72 | + <== type bounds [[T] <: Set[T]] <: type bounds [[T] <: Iterable[T]] (recurring) = false |
| 73 | + <== type bounds [[T] <: Set[T]] <: type bounds [[T] <: Iterable[T]] = false |
| 74 | + <== test2.FunctorImpl <: [Generic2[T] <: Set[T]] =>> Any (recurring) = false |
| 75 | + <== test2.FunctorImpl <: [Generic2[T] <: Set[T]] =>> Any = false |
| 76 | + |
| 77 | +The tests were made under the empty constraint |
0 commit comments