File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package scala.quoted
22
33import scala .runtime .quoted .Unpickler .Pickled
44
5- sealed abstract class Expr [T ] {
5+ sealed abstract class Expr [+ T ] {
66 final def unary_~ : T = throw new Error (" ~ should have been compiled away" )
77
88 /** Evaluate the contents of this expression and return the result.
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ import scala.quoted._
44object Test {
55 def loop [T ](x : Expr [T ])(implicit t : Type [T ]): Expr [T ] = ' {
66 val y : ~ t = ~ x
7- ~ loop( // error: inferred loop[~t] where T should be used
8- '(y)
9- )
7+ ~ loop('(y))
108 }
119}
Original file line number Diff line number Diff line change 1+ import scala .quoted ._
2+
3+ object Test {
4+ def foo : Expr [Option [String ]] = '(None)
5+ }
You can’t perform that action at this time.
0 commit comments