forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
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 #6 from scala/backport-lts-3.3-21651
Backport "Handle suspension due to macro call in arbitrary phases" to LTS
- Loading branch information
Showing
5 changed files
with
42 additions
and
13 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
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,17 @@ | ||
package dummy | ||
|
||
trait BG { | ||
val description: { type Structure } | ||
type Structure = description.Structure | ||
} | ||
|
||
abstract class Caller extends BG { | ||
type Foo >: this.type <: this.type | ||
|
||
transparent inline def generate2() = | ||
${Macro.impl() } | ||
|
||
final val description = { | ||
generate2() | ||
} | ||
} |
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 @@ | ||
package dummy | ||
|
||
import scala.quoted.* | ||
|
||
object Macro: | ||
def impl()(using quotes:Quotes) : Expr[Any] = | ||
'{ null } |
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 dummy | ||
|
||
trait User: | ||
final def bar(cell:Any) : Unit = | ||
(cell: cell.type) match | ||
case c: (Caller & cell.type) => () |