-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add support for Scala 3.3.2-RC1
We already publish separate module in the compiler that allows user to have right from the box support for Scala 3.3.2 and later, but not all PRs were yet backported, which means the experience for users could be worse under 3.3.1, which we would like to avoid.
- Loading branch information
Showing
17 changed files
with
77 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package scala.meta.internal.pc | ||
|
||
object Compat: | ||
val EvidenceParamName = dotty.tools.dotc.core.NameKinds.EvidenceParamName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package scala.meta.internal.pc | ||
|
||
object Compat: | ||
val EvidenceParamName = dotty.tools.dotc.core.NameKinds.EvidenceParamName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package scala.meta.internal.pc | ||
|
||
object Compat: | ||
val EvidenceParamName = dotty.tools.dotc.core.NameKinds.EvidenceParamName |
4 changes: 4 additions & 0 deletions
4
mtags/src/main/scala-3.3.0/scala/meta/internal/pc/Compat.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package scala.meta.internal.pc | ||
|
||
object Compat: | ||
val EvidenceParamName = dotty.tools.dotc.core.NameKinds.EvidenceParamName |
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
mtags/src/main/scala-3.3.1/scala/meta/internal/pc/Compat.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package scala.meta.internal.pc | ||
|
||
object Compat: | ||
val EvidenceParamName = dotty.tools.dotc.core.NameKinds.EvidenceParamName |
6 changes: 6 additions & 0 deletions
6
mtags/src/main/scala-3.3.1/scala/meta/internal/pc/printer/RefinedDotcPrinter.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package scala.meta.internal.pc.printer | ||
|
||
import dotty.tools.dotc.core.Contexts.Context | ||
import dotty.tools.dotc.printing.RefinedPrinter | ||
|
||
abstract class RefinedDotcPrinter(_ctx: Context) extends RefinedPrinter(_ctx) |
4 changes: 4 additions & 0 deletions
4
mtags/src/main/scala-3.3.2-RC1/scala/meta/internal/pc/Compat.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package scala.meta.internal.pc | ||
|
||
object Compat: | ||
val EvidenceParamName = dotty.tools.dotc.core.NameKinds.ContextBoundParamName |
30 changes: 30 additions & 0 deletions
30
mtags/src/main/scala-3.3.2-RC1/scala/meta/internal/pc/printer/RefinedDotcPrinter.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package scala.meta.internal.pc.printer | ||
|
||
import dotty.tools.dotc.core.Contexts.Context | ||
import dotty.tools.dotc.printing.RefinedPrinter | ||
import dotty.tools.dotc.core.Types.* | ||
import dotty.tools.dotc.core.Flags.* | ||
import dotty.tools.dotc.printing.Texts.Text | ||
import dotty.tools.dotc.core.StdNames.* | ||
|
||
/* In 3.4.x some changes were made to printer, | ||
but haven't managed to port all of them yet to the LTS */ | ||
abstract class RefinedDotcPrinter(_ctx: Context) extends RefinedPrinter(_ctx): | ||
|
||
def toTextPrefix(tp: Type) = | ||
tp match | ||
case tp: NamedType => super.toTextPrefixOf(tp) | ||
case tp => Text() | ||
|
||
override def toText(tp: Type): Text = | ||
tp match | ||
case tp: TermRef | ||
if !tp.denotationIsCurrent && !homogenizedView || | ||
tp.symbol.is(Module) || tp.symbol.name == nme.IMPORT => | ||
toTextPrefix(tp.prefix) ~ selectionString(tp) ~ ".type" | ||
case tp: TermRef => | ||
toTextPrefix(tp.prefix) ~ selectionString(tp) | ||
case tr: TypeRef => | ||
super.toText(tr) | ||
case _ => super.toText(tp) | ||
end RefinedDotcPrinter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters