-
Notifications
You must be signed in to change notification settings - Fork 3.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 #8716 from lrytz/t11756
Rework insertion of stabilizing definitions
- Loading branch information
Showing
8 changed files
with
189 additions
and
80 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
new Foo 0 | ||
new Foo 1 | ||
new Bar 0 | ||
new Foo 2 | ||
new Foo 3 | ||
new Bar 0 | ||
new Bar 1 | ||
sara | ||
frank | ||
new Foo 4 | ||
new Bar 0 | ||
new Bar 1 | ||
new Foo 5 | ||
new Foo 6 | ||
new Bar 0 | ||
new Foo 7 | ||
new Foo 8 | ||
new Bar 0 | ||
new Bar 1 | ||
sara | ||
frank | ||
new Foo 9 | ||
new Bar 0 | ||
new Bar 1 |
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,41 @@ | ||
class Foo { | ||
println(s"new Foo ${Foo.c}"); Foo.c += 1 | ||
|
||
class Bar { | ||
println(s"new Bar ${Bar.c}"); Bar.c += 1 | ||
} | ||
|
||
object Bar { | ||
var c = 0 | ||
implicit def brr: Bar = new Bar | ||
} | ||
def m(implicit b: Bar): Foo = Foo.this | ||
} | ||
object Foo { | ||
var c = 0 | ||
} | ||
|
||
object Test { | ||
(new Foo).m(null) | ||
def a = (new Foo).m(null) | ||
|
||
(new Foo).m | ||
def b = (new Foo).m | ||
|
||
(new Foo).m(null).m(null) | ||
def c = (new Foo).m(null).m(null) | ||
|
||
(new Foo).m.m | ||
def d = (new Foo).m.m | ||
|
||
{ println("sara"); { println("frank"); new Foo}.m}.m | ||
def e = { println("sara"); { println("frank"); new Foo}.m}.m | ||
|
||
def main(args: Array[String]): Unit = { | ||
a | ||
b | ||
c | ||
d | ||
e | ||
} | ||
} |
Oops, something went wrong.