aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/sealed-final.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/pos/sealed-final.scala')
-rw-r--r--tests/untried/pos/sealed-final.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/untried/pos/sealed-final.scala b/tests/untried/pos/sealed-final.scala
new file mode 100644
index 000000000..bdedb5c1f
--- /dev/null
+++ b/tests/untried/pos/sealed-final.scala
@@ -0,0 +1,14 @@
+sealed abstract class Foo {
+ @inline def bar(x: Int) = x + 1
+}
+object Foo {
+ def mkFoo(): Foo = new Baz2
+}
+
+object Baz1 extends Foo
+final class Baz2 extends Foo
+
+object Test {
+ // bar should be inlined now
+ def f = Foo.mkFoo() bar 10
+}