-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix of #39 #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix of #39 #42
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,7 @@ class tests extends CompilerTest { | |
@Test def pos_overloaded() = compileFile(posDir, "overloaded") | ||
@Test def pos_templateParents() = compileFile(posDir, "templateParents") | ||
@Test def pos_structural() = compileFile(posDir, "structural") | ||
@Test def pos_i39 = compileFile(posDir, "i39") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be good to have a http link for this issue on github, as "i39" is not so obvious. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think should have a naming convention for issue tests, then it will become obvious. Scala 2 has t123, should we do the same or stick with i123? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Having such convention seems good idea. |
||
|
||
@Test def neg_blockescapes() = compileFile(negDir, "blockescapesNeg", xerrors = 1) | ||
@Test def neg_typedapply() = compileFile(negDir, "typedapply", xerrors = 4) | ||
|
@@ -49,6 +50,7 @@ class tests extends CompilerTest { | |
@Test def neg_privates() = compileFile(negDir, "privates", xerrors = 2) | ||
@Test def neg_rootImports = compileFile(negDir, "rootImplicits", xerrors = 2) | ||
@Test def neg_templateParents() = compileFile(negDir, "templateParents", xerrors = 3) | ||
@Test def neg_i39 = compileFile(negDir, "i39", xerrors = 1) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
|
||
@Test def dotc = compileDir(dotcDir + "tools/dotc") | ||
@Test def dotc_ast = compileDir(dotcDir + "tools/dotc/ast") | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
object i39neg { | ||
|
||
trait B { | ||
type D <: { type T } | ||
def d: D | ||
} | ||
|
||
val bc: B = new B { | ||
def d: D = ??? | ||
private def pd: D = ??? | ||
} | ||
|
||
val d: bc.D = bc.d | ||
val pd: bc.D = bc.pd | ||
|
||
// infinite loop in Typer | ||
val asT: d.T = ??? | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
object i39 { | ||
|
||
trait B { | ||
type D <: { type T } | ||
def d: D | ||
} | ||
|
||
val bc: B = new B { | ||
def d: D = ??? | ||
} | ||
|
||
val d: bc.D = bc.d | ||
|
||
// infinite loop in Typer | ||
val asT: d.T = ??? | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you assign Unit to a val?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I will do a shortcut in the interest of time and fix it in the next commit.