aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/inlineAccess
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-09-11 13:48:02 +0200
committerMartin Odersky <odersky@gmail.com>2016-10-02 16:11:21 +0200
commit975d297cc42dd170fe8869474038a4204771a7a1 (patch)
treed80e5c9c741f0094b6d22723e85ec1c7413943be /tests/neg/inlineAccess
parentb743a9b3b98c67fd4e86c7700bf24e3c1d19e2b2 (diff)
downloaddotty-975d297cc42dd170fe8869474038a4204771a7a1.tar.gz
dotty-975d297cc42dd170fe8869474038a4204771a7a1.tar.bz2
dotty-975d297cc42dd170fe8869474038a4204771a7a1.zip
Fix problem related to accessor generation under separate compilation
Accessors were multiply generated under separate compilation. To fix this, the resident body of an inlined function is now the same as the inlined body. Both use accessors where necessary. Previously, only the inlined body used accessors.
Diffstat (limited to 'tests/neg/inlineAccess')
-rw-r--r--tests/neg/inlineAccess/C_1.scala12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/neg/inlineAccess/C_1.scala b/tests/neg/inlineAccess/C_1.scala
index 349f5b150..841222cf4 100644
--- a/tests/neg/inlineAccess/C_1.scala
+++ b/tests/neg/inlineAccess/C_1.scala
@@ -1,7 +1,9 @@
-package p {
+// error not yet recognized (independent of inlining)
+package p
+private class D
class C {
- protected def f(): Unit = ()
-
- inline def inl() = f() // error (when inlined): not accessible
-}
+ inline def inl(): Unit = {
+ val d = new D() // error (when inlined): not accessible
+ }
}
+