File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
compiler/src/dotty/tools/dotc/ast Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -1079,7 +1079,7 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
10791079 case Inlined (_, Nil , expr) => unapply(expr)
10801080 case Block (Nil , expr) => unapply(expr)
10811081 case _ =>
1082- tree.tpe.widenTermRefExpr.normalized match
1082+ tree.tpe.widenTermRefExpr.dealias. normalized match
10831083 case ConstantType (Constant (x)) => Some (x)
10841084 case _ => None
10851085 }
Original file line number Diff line number Diff line change 1+ trait Logger {
2+ inline def debug : debug = valueOf[debug]
3+ final type debug = false
4+
5+ // fails
6+ inline final def log (inline s : String ): Unit =
7+ inline if (debug) println(s)
8+ }
9+
10+ trait BaseLogger extends Logger {
11+ // fails
12+ def bar () = log(" case1" )
13+ }
14+
15+ object Logger {
16+ inline def log (s : String ): Unit =
17+ inline if (valueOf[Logger # debug]) println(s)
18+ }
19+
20+ class Test :
21+ def fails (x : BaseLogger ) =
22+ x.log(" case2" )
23+
24+ def works =
25+ Logger .log(" case3" )
You can’t perform that action at this time.
0 commit comments