diff options
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/bug3234.flags | 1 | ||||
-rw-r--r-- | test/files/pos/bug3234.scala | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/test/files/pos/bug3234.flags b/test/files/pos/bug3234.flags new file mode 100644 index 0000000000..c9cefdc4b9 --- /dev/null +++ b/test/files/pos/bug3234.flags @@ -0,0 +1 @@ +-Yinline -Xfatal-warnings
\ No newline at end of file diff --git a/test/files/pos/bug3234.scala b/test/files/pos/bug3234.scala new file mode 100644 index 0000000000..1553f1fa05 --- /dev/null +++ b/test/files/pos/bug3234.scala @@ -0,0 +1,19 @@ +trait Trait1 { + // need more work before this one works + // @inline + def foo2(n: Int) = n*n +} + +trait Trait2 { + @inline def foo3(n: Int) = 1 +} + +class Base extends Trait1 { + @inline def foo(n: Int) = n +} + +object Test extends Base with Trait2 { + def main(args: Array[String]) = { + println(foo(42) + foo2(11) + foo3(2)) + } +}
\ No newline at end of file |