aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-02-19 09:29:28 +0100
committerMartin Odersky <odersky@gmail.com>2017-02-19 09:29:41 +0100
commitc54e942ef6275fc0c61c051539a1b37f4e12123c (patch)
tree744cbe78aa878ccb9ca9c9ba150cdbe8a5116fb8 /tests/pos
parentdb295e8fb13c8490b96d84e8357a75550ebdebfd (diff)
downloaddotty-c54e942ef6275fc0c61c051539a1b37f4e12123c.tar.gz
dotty-c54e942ef6275fc0c61c051539a1b37f4e12123c.tar.bz2
dotty-c54e942ef6275fc0c61c051539a1b37f4e12123c.zip
Fix sorting of accessed this-proxies
They are sorted according to the nesting depth of the classes they represent. This is no necessarily the same as the nesting level of the symbols of the proxy classes. i1990a.scala shows an example where the two differ.
Diffstat (limited to 'tests/pos')
-rw-r--r--tests/pos/i1990a.scala20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/pos/i1990a.scala b/tests/pos/i1990a.scala
new file mode 100644
index 000000000..f6f95ee36
--- /dev/null
+++ b/tests/pos/i1990a.scala
@@ -0,0 +1,20 @@
+class A { self =>
+ class Foo {
+ inline def inlineMeth: Unit = {
+ println(self)
+ }
+ }
+}
+
+class C extends A {
+ class B extends A
+}
+
+object Test {
+ def main(args: Array[String]): Unit = {
+ val c = new C
+ val b = new c.B
+
+ (new b.Foo).inlineMeth
+ }
+}