-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15443 from dotty-staging/fix-15311
Handle recursions in isFullyDefined
- Loading branch information
Showing
9 changed files
with
121 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
-- Error: tests/neg/i15311.scala:16:4 ---------------------------------------------------------------------------------- | ||
16 |def test = // error | ||
|^ | ||
|Recursion limit exceeded. | ||
|Maybe there is an illegal cyclic reference? | ||
|If that's not the case, you could also try to increase the stacksize using the -Xss JVM option. | ||
|A recurring operation is (inner to outer): | ||
| | ||
| check fully defined food.T | ||
| check fully defined food.T | ||
| check fully defined food.T | ||
| check fully defined food.T | ||
| check fully defined food.T | ||
| check fully defined food.T | ||
| check fully defined food.T | ||
| check fully defined food.T | ||
| check fully defined food.T | ||
| check fully defined food.T | ||
| ... | ||
| | ||
| check fully defined food.T | ||
| check fully defined food.T | ||
| check fully defined food.T | ||
| check fully defined food.T | ||
| check fully defined food.T | ||
| check fully defined food.T | ||
| check fully defined food.T | ||
| check fully defined food.T | ||
| check fully defined food.T | ||
| check fully defined Template[food.T] | ||
17 | eat(ham) | ||
18 | eat(food.self) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
trait Template[+T <: Template[T]]: | ||
type Clone <: T { type Clone = Template.this.Clone } | ||
val self :Clone | ||
|
||
type Food = Template[_] | ||
|
||
class Ham extends Template[Ham]: | ||
type Clone = Ham | ||
val self = this | ||
|
||
def eat[F <: Template[F]](food :F) :F = food.self.self | ||
|
||
val ham = new Ham | ||
val food :Food = ham | ||
|
||
def test = // error | ||
eat(ham) | ||
eat(food.self) |