forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dealias type references when healing types in quotes
We where only doing the dealiasing if the type had no prefix but missed it if the type reference was on some path. Fixes scala#17037
- Loading branch information
1 parent
ce65296
commit bb5c098
Showing
4 changed files
with
39 additions
and
5 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,8 @@ | ||
import scala.quoted.* | ||
|
||
class Foo: | ||
type Bar = Int | ||
|
||
def macroImpl(using Quotes) = | ||
val foo = new Foo | ||
Type.of[foo.Bar] |
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,10 @@ | ||
import scala.quoted.* | ||
|
||
class Foo: | ||
type Bar = Int | ||
|
||
def macroImpl(using Quotes) = | ||
val foo = Foo() | ||
Type.of[foo.Bar] match | ||
case '[foo.Bar] => '{true} | ||
case _ => '{false} |
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,7 @@ | ||
import scala.quoted.* | ||
|
||
class Foo: | ||
type Bar = Int | ||
def macroImpl(using Quotes) = | ||
val foo = new Foo | ||
Type.of[this.Bar] |