-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13748 from dotty-staging/fix-#i13422
Widen qualifier skolems
- Loading branch information
Showing
3 changed files
with
22 additions
and
1 deletion.
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,9 @@ | ||
import scala.quoted._ | ||
|
||
inline def rule(inline r: Any): Unit = ${ ruleImpl('r) } | ||
|
||
def ruleImpl(r: Expr[Any])(using Quotes): Expr[Unit] = { | ||
import quotes.reflect.* | ||
r.asTerm.show | ||
'{} | ||
} |
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,12 @@ | ||
def test = rule { | ||
foo(bar(baz)) | ||
} | ||
|
||
def foo[I](r: I): Nothing = ??? | ||
|
||
def bar(i: Baz): i.Out = ??? | ||
|
||
sealed trait Baz: | ||
type Out = Nothing match { case Nothing => Nothing } | ||
|
||
def baz: Baz = ??? |