Closed
Description
Minimized example
trait Scope:
type Expr[+T]
def exprQuote[T](x: T)(using s: Scope): s.Expr[T] = ???
def test(using s: Scope): Unit =
val t1: s.Expr[1] = exprQuote(1)
val t2 = exprQuote(1)
val t3: s.Expr[1] = t2
Output
-- [E007] Type Mismatch Error: Foo.scala:9:22 ----------------------------------
9 | val t1: s.Expr[1] = exprQuote(1)
| ^^^^^^^^^^^^
| Found: s.Expr[Int]
| Required: s.Expr[(1 : Int)]
-- [E007] Type Mismatch Error: Foo.scala:11:22 ---------------------------------
11 | val t3: s.Expr[1] = t2
| ^^
| Found: (t2 : s.Expr[Int])
| Required: s.Expr[(1 : Int)]
Expectation
Should be able to infer the precise type