diff options
author | Lukas Rytz <lukas.rytz@typesafe.com> | 2016-02-15 14:13:20 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2016-02-15 14:13:20 +0100 |
commit | c524f18ee4959f6fe8297971fc882e63468c4317 (patch) | |
tree | 184898c792215b0f34bd25709b1c167f0ae58786 /test | |
parent | c672d6892db662f15ea1a84cdbedf857e2a17b22 (diff) | |
parent | 363bad3de9a570746927b3fd9dd0d076cade7750 (diff) | |
download | scala-c524f18ee4959f6fe8297971fc882e63468c4317.tar.gz scala-c524f18ee4959f6fe8297971fc882e63468c4317.tar.bz2 scala-c524f18ee4959f6fe8297971fc882e63468c4317.zip |
Merge pull request #4966 from lrytz/inlineProject
SD-79 don't issue spurious inliner warnings under l:project
Diffstat (limited to 'test')
-rw-r--r-- | test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala index 70f3060027..54eddc868d 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala @@ -1515,4 +1515,13 @@ class InlinerTest extends ClearAfterClass { "C$$$anonfun$2", IRETURN, -1 /*A*/, "C$$$anonfun$3", IRETURN)) } + + @Test + def inlineProject(): Unit = { + val codeA = "final class A { @inline def f = 1 }" + val codeB = "class B { def t(a: A) = a.f }" + // tests that no warning is emitted + val List(a, b) = compileClassesSeparately(List(codeA, codeB), extraArgs = "-Yopt:l:project -Yopt-warnings") + assertInvoke(getSingleMethod(b, "t"), "A", "f") + } } |