Skip to content

Commit

Permalink
Backport "Mark genSJSIR as *disabled* (rather than non-*runnable*) wh…
Browse files Browse the repository at this point in the history
…en no `-scalajs`." to LTS (#21150)

Backports #20815 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
  • Loading branch information
WojciechMazur authored Jul 10, 2024
2 parents 1c9287f + 0c404ab commit 132467a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/backend/sjs/GenSJSIR.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class GenSJSIR extends Phase {

override def description: String = GenSJSIR.description

override def isRunnable(using Context): Boolean =
super.isRunnable && ctx.settings.scalajs.value
override def isEnabled(using Context): Boolean =
ctx.settings.scalajs.value

def run(using Context): Unit =
new JSCodeGen().run()
Expand Down
1 change: 0 additions & 1 deletion sbt-bridge/test/xsbt/CompileProgressSpecification.scala
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ class CompileProgressSpecification {
"MegaPhase{pruneErasedDefs,...,arrayConstructors}",
"erasure",
"constructors",
"genSJSIR",
"genBCode"
)
val missingExpectedPhases = someExpectedPhases -- allPhases.toSet
Expand Down
14 changes: 14 additions & 0 deletions tests/pos/i20296.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
trait Foo

object Foo {
inline def bar(): Foo =
class InlinedFoo extends Foo {}
new InlinedFoo

inline def foo(): Foo =
bar()
class InlinedFoo extends Foo {}
new InlinedFoo

def Test: Foo = Foo.foo()
}

0 comments on commit 132467a

Please sign in to comment.