File tree 2 files changed +6
-9
lines changed
src/dotty/tools/dotc/core
test/dotty/tools/backend/jvm
2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -340,11 +340,10 @@ class Definitions {
340
340
lazy val Predef_undefinedR = ScalaPredefModule .requiredMethodRef(" ???" )
341
341
def Predef_undefined (implicit ctx : Context ) = Predef_undefinedR .symbol
342
342
// The set of all wrap{X, Ref}Array methods, where X is a value type
343
- lazy val Predef_wrapArrayR : collection.Set [TermRef ] = {
343
+ val Predef_wrapArray = new PerRun [ collection.Set [Symbol ]]({ implicit ctx =>
344
344
val methodNames = ScalaValueTypes .map(TreeGen .wrapArrayMethodName) + nme.wrapRefArray
345
- methodNames.map(ScalaPredefModule .requiredMethodRef)
346
- }
347
- val Predef_wrapArray = new PerRun [collection.Set [Symbol ]](implicit ctx => Predef_wrapArrayR .map(_.symbol))
345
+ methodNames.map(ScalaPredefModule .requiredMethodRef(_).symbol)
346
+ })
348
347
349
348
lazy val ScalaRuntimeModuleRef = ctx.requiredModuleRef(" scala.runtime.ScalaRunTime" )
350
349
def ScalaRuntimeModule (implicit ctx : Context ) = ScalaRuntimeModuleRef .symbol
Original file line number Diff line number Diff line change @@ -205,11 +205,9 @@ class TestBCode extends DottyBytecodeTest {
205
205
val moduleNode = loadClassNode(moduleIn.input)
206
206
val method = getMethod(moduleNode, " test" )
207
207
208
- val arrayWrapped = instructionsFromMethod(method).exists { instr : Instruction =>
209
- instr match {
210
- case inv : Invoke => inv.name.contains(" wrapRefArray" )
211
- case _ => false
212
- }
208
+ val arrayWrapped = instructionsFromMethod(method).exists {
209
+ case inv : Invoke => inv.name.contains(" wrapRefArray" )
210
+ case _ => false
213
211
}
214
212
215
213
assert(! arrayWrapped, " Arrays should not be wrapped when passed to a Java varargs method\n " )
You can’t perform that action at this time.
0 commit comments