Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark genSJSIR as *disabled* (rather than non-*runnable*) when no -scalajs. #20815

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion compiler/src/dotty/tools/backend/sjs/GenSJSIR.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ class GenSJSIR extends Phase {

override def description: String = GenSJSIR.description

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

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

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()
}
Loading