diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2015-10-01 20:31:06 +0200 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2015-10-09 14:56:49 +0200 |
commit | 48acd08ac7e6346ffa573163fc1993cbdae458cd (patch) | |
tree | d53a5e05810ebbf8e047eddc4dc1465b9943dec3 /tests | |
parent | 5f7e2901b0d13d0201874ada72a107820870e274 (diff) | |
download | dotty-48acd08ac7e6346ffa573163fc1993cbdae458cd.tar.gz dotty-48acd08ac7e6346ffa573163fc1993cbdae458cd.tar.bz2 dotty-48acd08ac7e6346ffa573163fc1993cbdae458cd.zip |
TypeAssigner#avoid: more precise types for inner classes
When we need to avoid `A` in the class `A#B`, we can try to replace `A`
by a supertype. Previously, we only tried to replace `A#B` itself by a
supertype.
Fixes #711.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pos/escapingRefs.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/pos/escapingRefs.scala b/tests/pos/escapingRefs.scala new file mode 100644 index 000000000..a7960bee4 --- /dev/null +++ b/tests/pos/escapingRefs.scala @@ -0,0 +1,12 @@ +class Outer { + class Inner +} + +object Test { + def test = { + val a: Outer#Inner = { + val o = new Outer + new o.Inner + } + } +} |