Closed
Description
Compiler version
3.5.1-RC1-bin-SNAPSHOT-nonbootstrapped-git-cd8c5ed
Minimized code
Minimized from i7294.scala with @hamzaremmal
object Test:
trait Foo:
val x: Any
??? match
case f: Foo =>
(f: Foo).x // ok
f.x // error
Output
-- [E007] Type Mismatch Error: tests/playground/example.scala:11:6 -------------
11 | f.x // error
| ^
|Found: (f : Nothing)
|Required: ?{ x: ? }
|Note that implicit conversions were not tried because the result of an implicit conversion
|must be more specific than ?{ x: <?> }
Expectation
no error