File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
src/compiler/scala/tools/nsc/backend/jvm Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -91,9 +91,9 @@ abstract class BTypesFromSymbols[G <: Global](val global: G) extends BTypes {
91
91
92
92
assert(classSym != NoSymbol , " Cannot create ClassBType from NoSymbol" )
93
93
assert(classSym.isClass, s " Cannot create ClassBType from non-class symbol $classSym" )
94
+ // note: classSym can be scala.Array, see https://github.com/scala/bug/issues/12225#issuecomment-729687859
94
95
if (global.settings.debug) {
95
- // OPT these assertions have too much performance overhead to run unconditionally
96
- assertClassNotArrayNotPrimitive(classSym)
96
+ // OPT this assertion has too much performance overhead to run unconditionally
97
97
assert(! primitiveTypeToBType.contains(classSym) || isCompilingPrimitive, s " Cannot create ClassBType for primitive class symbol $classSym" )
98
98
}
99
99
@@ -221,11 +221,6 @@ abstract class BTypesFromSymbols[G <: Global](val global: G) extends BTypes {
221
221
assert(sym != definitions.ArrayClass || isCompilingArray, sym)
222
222
}
223
223
224
- def assertClassNotArrayNotPrimitive (sym : Symbol ): Unit = {
225
- assertClassNotArray(sym)
226
- assert(! primitiveTypeToBType.contains(sym) || isCompilingPrimitive, sym)
227
- }
228
-
229
224
def implementedInterfaces (classSym : Symbol ): List [Symbol ] = {
230
225
231
226
def isInterfaceOrTrait (sym : Symbol ) = sym.isInterface || sym.isTrait
Original file line number Diff line number Diff line change
1
+ // scalac: -Ydebug
2
+ object Test {
3
+ def foo (arr : Array [Int ]): Unit = {
4
+ val Array (x, y) = arr
5
+ }
6
+ }
You can’t perform that action at this time.
0 commit comments