diff options
author | Martin Odersky <odersky@gmail.com> | 2016-09-11 13:48:02 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-10-02 16:11:21 +0200 |
commit | 975d297cc42dd170fe8869474038a4204771a7a1 (patch) | |
tree | d80e5c9c741f0094b6d22723e85ec1c7413943be /tests/run | |
parent | b743a9b3b98c67fd4e86c7700bf24e3c1d19e2b2 (diff) | |
download | dotty-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/run')
-rw-r--r-- | tests/run/inlineAccess/C_1.scala | 7 | ||||
-rw-r--r-- | tests/run/inlineAccess/Test_2.scala | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/run/inlineAccess/C_1.scala b/tests/run/inlineAccess/C_1.scala new file mode 100644 index 000000000..349f5b150 --- /dev/null +++ b/tests/run/inlineAccess/C_1.scala @@ -0,0 +1,7 @@ +package p { +class C { + protected def f(): Unit = () + + inline def inl() = f() // error (when inlined): not accessible +} +} diff --git a/tests/run/inlineAccess/Test_2.scala b/tests/run/inlineAccess/Test_2.scala new file mode 100644 index 000000000..98ea7693a --- /dev/null +++ b/tests/run/inlineAccess/Test_2.scala @@ -0,0 +1,7 @@ + +object Test { + def main(args: Array[String]) = { + val c = new p.C() + c.inl() + } +} |