summaryrefslogtreecommitdiff
path: root/test/files/neg/inlineMaxSize.check
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2015-03-30 21:40:40 +0200
committerLukas Rytz <lukas.rytz@gmail.com>2015-04-01 08:35:32 +0200
commit323d044f93242cb023042c37b64ce79c5810e612 (patch)
tree7a775b5cb8b84380fc239bc98f3d1f4c8419b5a9 /test/files/neg/inlineMaxSize.check
parenta40ee59d4455c2bb45168844f50e9d15120bd7d8 (diff)
downloadscala-323d044f93242cb023042c37b64ce79c5810e612.tar.gz
scala-323d044f93242cb023042c37b64ce79c5810e612.tar.bz2
scala-323d044f93242cb023042c37b64ce79c5810e612.zip
Don't inlinie if the resulting method becomes too large for the JVM
This threshold is really the last resort and should never be reached. An inlining heuristic that blows up methods to the maximum size allowed by the JVM is broken. In the future we need to include some heuristic about code size when making an inlining decision, see github.com/scala-opt/scala/issues/2
Diffstat (limited to 'test/files/neg/inlineMaxSize.check')
-rw-r--r--test/files/neg/inlineMaxSize.check9
1 files changed, 9 insertions, 0 deletions
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