You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
s"Failed to check if $calleeMethodSig can be safely inlined to $callsiteClass without causing an IllegalAccessError. Checking instruction ${AsmUtils.textify(instruction)} failed:\n"+ cause
194
+
sm"""|Failed to check if $calleeMethodSig can be safely inlined to $callsiteClass without causing an IllegalAccessError.
195
+
|Checking failed for instruction ${AsmUtils.textify(instruction)}:
s"""The operand stack at the callsite in ${BackendReporting.methodSignature(callsiteClass, callsiteName, callsiteDesc)} contains more values than the
198
-
|arguments expected by the callee $calleeMethodSig. These values would be discarded
199
-
|when entering an exception handler declared in the inlined method.""".stripMargin
199
+
sm"""|The operand stack at the callsite in ${BackendReporting.methodSignature(callsiteClass, callsiteName, callsiteDesc)} contains more values than the
200
+
|arguments expected by the callee $calleeMethodSig. These values would be discarded
201
+
|when entering an exception handler declared in the inlined method."""
200
202
201
203
caseSynchronizedMethod(_, _, _, _) =>
202
204
s"Method $calleeMethodSig cannot be inlined because it is synchronized."
newSource1.scala:1: warning: A_1::test()Ljava/lang/String; could not be inlined:
2
-
Failed to check if A_1::test()Ljava/lang/String; can be safely inlined to T without causing an IllegalAccessError. Checking instruction INVOKEDYNAMIC m()LA_1$Fun; [
2
+
Failed to check if A_1::test()Ljava/lang/String; can be safely inlined to T without causing an IllegalAccessError.
3
+
Checking failed for instruction INVOKEDYNAMIC m()LA_1$Fun; [
@@ -170,37 +171,37 @@ class InlineWarningTest extends BytecodeTesting {
170
171
}
171
172
172
173
@Test// scala-dev#20
173
-
defmixedCompilationSpuriousWarning():Unit= {
174
+
defmixedCompilationSpuriousWarning:Unit= {
174
175
valjCode=
175
-
"""public class A {
176
-
| public static final int bar() { return 100; }
177
-
| public final int baz() { return 100; }
178
-
|}
179
-
""".stripMargin
176
+
sm"""|public class A {
177
+
| public static final int bar() { return 100; }
178
+
| public final int baz() { return 100; }
179
+
|}
180
+
"""
180
181
181
182
valsCode=
182
-
"""class C {
183
-
| @inline final def foo = A.bar()
184
-
| @inline final def fii(a: A) = a.baz()
185
-
| def t = foo + fii(new A)
186
-
|}
187
-
""".stripMargin
183
+
sm"""|class C {
184
+
| @inline final def foo = A.bar()
185
+
| @inline final def fii(a: A) = a.baz()
186
+
| def t = foo + fii(new A)
187
+
|}
188
+
"""
188
189
189
190
valwarns=List(
190
-
"""C::foo()I is annotated @inline but could not be inlined:
191
-
|Failed to check if C::foo()I can be safely inlined to C without causing an IllegalAccessError. Checking instruction INVOKESTATIC A.bar ()I failed:
192
-
|The method bar()I could not be found in the class A or any of its parents.
193
-
|Note that class A is defined in a Java source (mixed compilation), no bytecode is available.""".stripMargin,
194
-
195
-
"""C::fii(LA;)I is annotated @inline but could not be inlined:
196
-
|Failed to check if C::fii(LA;)I can be safely inlined to C without causing an IllegalAccessError. Checking instruction INVOKEVIRTUAL A.baz ()I failed:
197
-
|The method baz()I could not be found in the class A or any of its parents.
198
-
|Note that class A is defined in a Java source (mixed compilation), no bytecode is available.""".stripMargin
191
+
sm"""|C::foo()I is annotated @inline but could not be inlined:
192
+
|Failed to check if C::foo()I can be safely inlined to C without causing an IllegalAccessError.
193
+
|Checking failed for instruction INVOKESTATIC A.bar ()I:
194
+
|The method bar()I could not be found in the class A or any of its parents.
195
+
|Note that class A is defined in a Java source (mixed compilation), no bytecode is available.""",
196
+
197
+
sm"""|C::fii(LA;)I is annotated @inline but could not be inlined:
198
+
|Failed to check if C::fii(LA;)I can be safely inlined to C without causing an IllegalAccessError.
199
+
|Checking failed for instruction INVOKEVIRTUAL A.baz ()I:
200
+
|The method baz()I could not be found in the class A or any of its parents.
201
+
|Note that class A is defined in a Java source (mixed compilation), no bytecode is available.""",
199
202
)
200
-
varc=0
201
-
compileClasses(sCode, javaCode =List((jCode, "A.java")), allowMessage = i => { c +=1;
202
-
warns.exists(i.msg.contains)
203
-
})
204
-
assert(c ==2)
203
+
valallowed= mutable.Set.from(warns)
204
+
compileClasses(sCode, javaCode =List(jCode ->"A.java"), allowMessage = i => allowed.remove(i.msg))
0 commit comments