|
| 1 | +-- [E057] Type Mismatch Error: tests/neg-custom-args/i15575.scala:3:27 ------------------------------------------------- |
| 2 | +3 | def bar[T]: Unit = foo[T & Any] // error |
| 3 | + | ^ |
| 4 | + | Type argument T & Any does not conform to lower bound Any |
| 5 | + |--------------------------------------------------------------------------------------------------------------------- |
| 6 | + | Explanation (enabled by `-explain`) |
| 7 | + |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 8 | + | I tried to show that |
| 9 | + | Any |
| 10 | + | conforms to |
| 11 | + | T & Any |
| 12 | + | but the comparison trace ended with `false`: |
| 13 | + | |
| 14 | + | ==> Any <: T & Any |
| 15 | + | ==> Any <: T |
| 16 | + | <== Any <: T = false |
| 17 | + | <== Any <: T & Any = false |
| 18 | + | |
| 19 | + | The tests were made under the empty constraint |
| 20 | + --------------------------------------------------------------------------------------------------------------------- |
| 21 | +-- [E057] Type Mismatch Error: tests/neg-custom-args/i15575.scala:7:14 ------------------------------------------------- |
| 22 | +7 | val _ = foo[String] // error |
| 23 | + | ^ |
| 24 | + | Type argument String does not conform to lower bound CharSequence |
| 25 | + |--------------------------------------------------------------------------------------------------------------------- |
| 26 | + | Explanation (enabled by `-explain`) |
| 27 | + |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 28 | + | I tried to show that |
| 29 | + | CharSequence |
| 30 | + | conforms to |
| 31 | + | String |
| 32 | + | but the comparison trace ended with `false`: |
| 33 | + | |
| 34 | + | ==> CharSequence <: String |
| 35 | + | ==> CharSequence <: String |
| 36 | + | <== CharSequence <: String = false |
| 37 | + | <== CharSequence <: String = false |
| 38 | + | |
| 39 | + | The tests were made under the empty constraint |
| 40 | + --------------------------------------------------------------------------------------------------------------------- |
0 commit comments