diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/bug3913.check | 2 | ||||
-rw-r--r-- | test/files/neg/bug4166.check | 4 | ||||
-rw-r--r-- | test/files/neg/bug4166.scala | 11 | ||||
-rw-r--r-- | test/files/neg/bug473.check | 2 |
4 files changed, 17 insertions, 2 deletions
diff --git a/test/files/neg/bug3913.check b/test/files/neg/bug3913.check index 0ab8708bc8..e6df31fb23 100644 --- a/test/files/neg/bug3913.check +++ b/test/files/neg/bug3913.check @@ -1,4 +1,4 @@ bug3913.scala:2: error: super constructor cannot be passed a self reference unless parameter is declared by-name object LimboStage extends Stage( Set( LimboStage )) - ^ + ^ one error found diff --git a/test/files/neg/bug4166.check b/test/files/neg/bug4166.check new file mode 100644 index 0000000000..938dad1488 --- /dev/null +++ b/test/files/neg/bug4166.check @@ -0,0 +1,4 @@ +bug4166.scala:3: error: super constructor arguments cannot reference unconstructed `this` +class Demo extends Base(new { Demo.this }) { + ^ +one error found diff --git a/test/files/neg/bug4166.scala b/test/files/neg/bug4166.scala new file mode 100644 index 0000000000..c20796c43c --- /dev/null +++ b/test/files/neg/bug4166.scala @@ -0,0 +1,11 @@ +class Base(a: Any) + +class Demo extends Base(new { Demo.this }) { + val x: Any = () +} + + +class Demo2 extends Base(new { this }) { + val x: Any = () +} + diff --git a/test/files/neg/bug473.check b/test/files/neg/bug473.check index 7d21dfb210..7e3c4a4ed5 100644 --- a/test/files/neg/bug473.check +++ b/test/files/neg/bug473.check @@ -1,4 +1,4 @@ bug473.scala:3: error: super constructor cannot be passed a self reference unless parameter is declared by-name case object Voop extends Foo(Voop) - ^ + ^ one error found |