Commit 93d8e51
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 82d9b5f commit 93d8e51
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
0 commit comments