File tree Expand file tree Collapse file tree 5 files changed +14
-1
lines changed
compiler/src/dotty/tools/backend/sjs
sbt-test/scalajs/backward-compat Expand file tree Collapse file tree 5 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -1557,7 +1557,7 @@ class JSCodeGen()(using genCtx: Context) {
15571557
15581558 def jsParams = params.map(genParamDef(_))
15591559
1560- if (primitives.isPrimitive(sym)) {
1560+ if (primitives.isPrimitive(sym) && sym != defn.newArrayMethod ) {
15611561 None
15621562 } else if (sym.is(Deferred ) && currentClassSym.isNonNativeJSClass) {
15631563 // scala-js/#4409: Do not emit abstract methods in non-native JS classes
Original file line number Diff line number Diff line change 1+ enablePlugins(ScalaJSPlugin )
2+
3+ scalaVersion := sys.props(" plugin.scalaVersion" )
4+
5+ libraryDependencies += " org.scalameta" %%% " munit" % " 1.1.0"
Original file line number Diff line number Diff line change 1+
2+ addSbtPlugin(" org.scala-js" % " sbt-scalajs" % sys.props(" plugin.scalaJSVersion" ))
Original file line number Diff line number Diff line change 1+ class NewArrayIssue22794Test extends munit.FunSuite {
2+ test(" foo" ) {
3+ assert(2 + 2 == 4 )
4+ }
5+ }
Original file line number Diff line number Diff line change 1+ > test
You can’t perform that action at this time.
0 commit comments