diff options
author | Lukas Rytz <lukas.rytz@typesafe.com> | 2015-04-07 16:06:01 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2015-04-07 16:06:01 +0200 |
commit | bbb5d201a2835b24cd25a6fc60de5bc586490bd0 (patch) | |
tree | d7d597b82069c854f714836012e718330b62b959 /test/files/neg | |
parent | 9e2e63306bc111a933418eb16ff890fa748301f9 (diff) | |
parent | 6becefe90690ae025308b00e0fd7e46646b4f961 (diff) | |
download | scala-bbb5d201a2835b24cd25a6fc60de5bc586490bd0.tar.gz scala-bbb5d201a2835b24cd25a6fc60de5bc586490bd0.tar.bz2 scala-bbb5d201a2835b24cd25a6fc60de5bc586490bd0.zip |
Merge pull request #4413 from lrytz/opt/inliningEverything
Fixes and Improvements for the new inliner
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/case-collision2.flags | 2 | ||||
-rw-r--r-- | test/files/neg/inlineMaxSize.check | 9 | ||||
-rw-r--r-- | test/files/neg/inlineMaxSize.flags | 1 | ||||
-rw-r--r-- | test/files/neg/inlineMaxSize.scala | 8 |
4 files changed, 19 insertions, 1 deletions
diff --git a/test/files/neg/case-collision2.flags b/test/files/neg/case-collision2.flags index 5bfa9da5c5..bea46902c9 100644 --- a/test/files/neg/case-collision2.flags +++ b/test/files/neg/case-collision2.flags @@ -1 +1 @@ --Ynooptimize -Ybackend:GenBCode -Xfatal-warnings +-Ybackend:GenBCode -Xfatal-warnings diff --git a/test/files/neg/inlineMaxSize.check b/test/files/neg/inlineMaxSize.check new file mode 100644 index 0000000000..d218a8b6e2 --- /dev/null +++ b/test/files/neg/inlineMaxSize.check @@ -0,0 +1,9 @@ +inlineMaxSize.scala:7: warning: C::i()I is annotated @inline but could not be inlined: +The size of the callsite method C::j()I +would exceed the JVM method size limit after inlining C::i()I. + + @inline final def j = i + i + ^ +error: No warnings can be incurred under -Xfatal-warnings. +one warning found +one error found diff --git a/test/files/neg/inlineMaxSize.flags b/test/files/neg/inlineMaxSize.flags new file mode 100644 index 0000000000..9c6b811622 --- /dev/null +++ b/test/files/neg/inlineMaxSize.flags @@ -0,0 +1 @@ +-Ybackend:GenBCode -Ydelambdafy:method -Yopt:l:classpath -Yopt-warnings -Xfatal-warnings
\ No newline at end of file diff --git a/test/files/neg/inlineMaxSize.scala b/test/files/neg/inlineMaxSize.scala new file mode 100644 index 0000000000..16dc0d9538 --- /dev/null +++ b/test/files/neg/inlineMaxSize.scala @@ -0,0 +1,8 @@ +// not a JUnit test because of https://github.com/scala-opt/scala/issues/23 +class C { + @inline final def f = 0 + @inline final def g = f + f + f + f + f + f + f + f + f + f + @inline final def h = g + g + g + g + g + g + g + g + g + g + @inline final def i = h + h + h + h + h + h + h + h + h + h + @inline final def j = i + i +} |