-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" labelEvery issue needs to have an "area" and "itype" label
Milestone
Description
Compiler version
3.1.3, 3.2.0-RC1
Minimized code
trait Foo[X >: Int <: String]
type Bar = Foo[? >: Int <: String]Output
-- [E057] Type Mismatch Error: -------------------------------------------------
1 |type Bar = Foo[? >: Int <: String]
| ^
| Type argument >: Int <: String does not conform to upper bound String
|-----------------------------------------------------------------------------
| Explanation (enabled by `-explain`)
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| I tried to show that
| >: Int <: String
| conforms to
| String
| but the comparison trace ended with `false`:
|
| ==> type bounds [ >: Int <: String] <: String
| ==> type bounds [ >: Int <: String] <: String
| ==> String <: String (left is approximated)
| <== String <: String (left is approximated) = true
| <== type bounds [ >: Int <: String] <: String = true
| <== type bounds [ >: Int <: String] <: String = true
|
| The tests were made under the empty constraint
-----------------------------------------------------------------------------Expectation
A comparison trace that actually ends with false, or some more correct error.
Metadata
Metadata
Assignees
Labels
itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" labelEvery issue needs to have an "area" and "itype" label