diff options
author | Martin Odersky <odersky@gmail.com> | 2016-09-04 15:10:44 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-10-02 16:11:21 +0200 |
commit | c1674dc461ee3f4bf38b7b895cfc9d7d6b41b53f (patch) | |
tree | 7b1340917b86e09df1187d422771e07e9c19f8bf /tests/neg | |
parent | 333ec27c9e503f428c86a155351d11f332f2892d (diff) | |
download | dotty-c1674dc461ee3f4bf38b7b895cfc9d7d6b41b53f.tar.gz dotty-c1674dc461ee3f4bf38b7b895cfc9d7d6b41b53f.tar.bz2 dotty-c1674dc461ee3f4bf38b7b895cfc9d7d6b41b53f.zip |
Neg test demonstrating inline positions under cross-compilation
Diffstat (limited to 'tests/neg')
-rw-r--r-- | tests/neg/inlineAccess/C_1.scala | 8 | ||||
-rw-r--r-- | tests/neg/inlineAccess/Test_2.scala | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/neg/inlineAccess/C_1.scala b/tests/neg/inlineAccess/C_1.scala new file mode 100644 index 000000000..fc24f7666 --- /dev/null +++ b/tests/neg/inlineAccess/C_1.scala @@ -0,0 +1,8 @@ +package p { +class C { + protected def f(): Unit = () + + @dotty.annotation.inline + def inl() = f() // error (when inlined): not accessible +} +} diff --git a/tests/neg/inlineAccess/Test_2.scala b/tests/neg/inlineAccess/Test_2.scala new file mode 100644 index 000000000..98ea7693a --- /dev/null +++ b/tests/neg/inlineAccess/Test_2.scala @@ -0,0 +1,7 @@ + +object Test { + def main(args: Array[String]) = { + val c = new p.C() + c.inl() + } +} |