Commit 9039a77
committed
Printing hack for
This is a hack to tell `case _ =>` and `case Any =>` apart while printing match
type error messages. At this point in the compilation pipeline both `pat` types
=:= Any, however because of the slight difference in representation we are able
to restore the original syntax. Here is what `pat.toString` gives in each case:
// case _ =>
(TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Any))
// case Any =>
(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),object scala),class Any))
The second case doesn't `eq defn.AnyType` because it starts from <root>, and
thus doesn't match the pattern added in this commit.case _ =>
1 parent b402193 commit 9039a77
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
0 commit comments