diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t0117.check | 4 | ||||
-rwxr-xr-x | test/files/neg/t0117.scala | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/test/files/neg/t0117.check b/test/files/neg/t0117.check new file mode 100644 index 0000000000..f6bb6eaa80 --- /dev/null +++ b/test/files/neg/t0117.check @@ -0,0 +1,4 @@ +t0117.scala:2: error: implementation restriction: traits may not select fields or methods from to super[C] where C is a class +trait B extends A { println(super[A].a) }
+ ^ +one error found diff --git a/test/files/neg/t0117.scala b/test/files/neg/t0117.scala new file mode 100755 index 0000000000..dd200b1cf9 --- /dev/null +++ b/test/files/neg/t0117.scala @@ -0,0 +1,6 @@ +class A { def a = 0 } +trait B extends A { println(super[A].a) } +object Test extends Application { + new B {} +} + |