Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SI-4859 Don't elide qualifiers when selecting nested modules.
Otherwise we fail to throw in: {???; Predef}.DummyImplicit.dummyImplicit We still elide the initialization of `Outer` in `Outer.Inner.foo` as before, although that seems a little dubious to me. In total, we had to change RefChecks, Flatten, and GenICode to effect this change. A recently fixed bug in tail call elimination was also due to assuming that the the qualifier of a Select node wasn't worthy of traversal. Let's keep a close eye out for more instances of this problem.
- Loading branch information
Showing
5 changed files
with
55 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Inner | ||
Inner.i | ||
About to reference Inner.i | ||
Outer | ||
Inner.i | ||
About to reference O.N | ||
About to reference O.N | ||
About to reference O.N.apply() |
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,29 @@ | ||
object O { | ||
case class N() | ||
object P | ||
} | ||
|
||
object Outer { | ||
println("Outer") | ||
object Inner { | ||
println("Inner") | ||
def i { | ||
println("Inner.i") | ||
} | ||
} | ||
} | ||
|
||
object Test { | ||
def main(args: Array[String]) { | ||
Outer.Inner.i // we still don't initiialize Outer here (but should we?) | ||
|
||
{println("About to reference Inner.i"); Outer}.Inner.i // Outer will be initialized. | ||
|
||
{println("About to reference O.N" ); O}.N | ||
|
||
{println("About to reference O.N" ); O}.N | ||
|
||
{println("About to reference O.N.apply()"); O}.N.apply() | ||
} | ||
} | ||
|