Skip to content

Commit

Permalink
fix scalajs scala3 compilation by removing duplicate HasDefaultParams…
Browse files Browse the repository at this point in the history
… flag
  • Loading branch information
lihaoyi committed Feb 10, 2024
1 parent 34bc70e commit 1716171
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,18 @@ trait UnrollModule extends Cross.Module[String]{
def mimaPreviousArtifacts = T.traverse(mimaPrevious)(_.jvm.jar)()
override def scalacPluginClasspath = T{ Agg(plugin.jar()) }

// override def scalaCompilerClasspath = T{
// super.scalaCompilerClasspath().filter(!_.toString().contains("scala-compiler")) ++
// Agg(PathRef(os.Path("/Users/lihaoyi/.ivy2/local/org.scala-lang/scala-compiler/2.13.12-bin-SNAPSHOT/jars/scala-compiler.jar")))
// }
// override def scalaCompilerClasspath = T{
// super.scalaCompilerClasspath().filter(!_.toString().contains("scala3-compiler")) ++
// Agg(PathRef(os.Path("/Users/lihaoyi/.ivy2/local/org.scala-lang/scala3-compiler_3/3.3.2-RC3-bin-SNAPSHOT/jars/scala3-compiler_3.jar")))
// }
override def scalacOptions = T{
Seq(
s"-Xplugin:${plugin.jar().path}",
"-Xplugin-require:unroll",
//"-Xprint:all",
//"-Ydebug-error",
//"-Ydebug-type-error",
//"-Ydebug-trace"
//"-Xprint:typer",
//"-Xprint:unroll",
//"-Xprint:patmat",
Expand Down
2 changes: 1 addition & 1 deletion unroll/plugin/src-3/UnrollPhaseScala3.scala
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class UnrollPhaseScala3() extends PluginPhase {
val forwarderDefSymbol = Symbols.newSymbol(
defdef.symbol.owner,
defdef.name,
defdef.symbol.flags,
defdef.symbol.flags &~ HasDefaultParams,
truncatedMethodType
)

Expand Down

0 comments on commit 1716171

Please sign in to comment.