diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2014-12-28 17:42:04 +0100 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2015-02-11 16:33:20 +0100 |
commit | 5150cad821a9e7db821732eeb19019b96e1975a0 (patch) | |
tree | d69db0675c5b79952ec8e44f7dff48fc24316e34 /tests/pos/anonClassSubtyping.scala | |
parent | 03a2c6e74c07d08e79ee3323d3c1c38eb3d588ef (diff) | |
download | dotty-5150cad821a9e7db821732eeb19019b96e1975a0.tar.gz dotty-5150cad821a9e7db821732eeb19019b96e1975a0.tar.bz2 dotty-5150cad821a9e7db821732eeb19019b96e1975a0.zip |
Prevent block types with references to local symbols
Diffstat (limited to 'tests/pos/anonClassSubtyping.scala')
-rw-r--r-- | tests/pos/anonClassSubtyping.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/pos/anonClassSubtyping.scala b/tests/pos/anonClassSubtyping.scala new file mode 100644 index 000000000..b5591d826 --- /dev/null +++ b/tests/pos/anonClassSubtyping.scala @@ -0,0 +1,9 @@ +object O { + class A + class B + def f[T](x: T, y: T): T = x + + val x: A = f(new A { }, new A) + + val y: A | B = f(new A { }, new B) +} |