Commit 1e30c39
committed
Fix #9000: Change definition of isTrivial
The only difference between checking cyclicity of a match type
in an object O and on the toplevel is that the matchtype itself
has the prefix O.this in the first case, and TermRef(_, pkgObject)
in the second case (this is because the match type is actually looked
up in the package scope, not in the package object scope).
This made a difference in the isTrivial check when computing type parameters.
And this in turn caused spurious cycles to be reported. The fix is
to add the missing case to isTrivial.1 parent aa1c363 commit 1e30c39
File tree
3 files changed
+21
-3
lines changed- compiler/src/dotty/tools/dotc/core
- tests
- neg/toplevel-cyclic
- pos
3 files changed
+21
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
148 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
149 | 154 | | |
150 | 155 | | |
151 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments