-
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.
Fix quotes with references to path dependent types
- Loading branch information
1 parent
28676ae
commit 9d0008d
Showing
5 changed files
with
137 additions
and
59 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
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,67 @@ | ||
import scala.quoted.* | ||
|
||
trait A: | ||
type T | ||
val b: B | ||
|
||
trait B: | ||
type T | ||
|
||
class Test: | ||
def testLocalPathsGlobalClasses(using Quotes): Unit = | ||
'{ | ||
type T | ||
val a: A = ??? | ||
${ | ||
'{ | ||
val _: T = ??? | ||
val _: a.T = ??? | ||
// val _: a.b.T = ??? // FIXME pickling | ||
val _: a.type = ??? | ||
val _: a.b.type = ??? | ||
} | ||
??? | ||
} | ||
} | ||
|
||
def testLocalPathsLocalClasses(using Quotes): Unit = | ||
'{ | ||
type U | ||
trait C: | ||
type U | ||
val d: D | ||
trait D: | ||
type U | ||
val c: C = ??? | ||
${ | ||
'{ | ||
val _: U = ??? | ||
val _: c.U = ??? | ||
val _: c.d.U = ??? | ||
val _: c.type = ??? | ||
val _: c.d.type = ??? | ||
} | ||
??? | ||
} | ||
} | ||
|
||
def testThisPaths(using Quotes): Unit = | ||
'{ | ||
trait E: | ||
type V | ||
val f: F | ||
${ | ||
'{ | ||
// val _: this.type = ??? // FIXME pickling E | ||
// val _: V = ??? // FIXME pickling E | ||
// val _: this.V = ??? // FIXME pickling E | ||
val _: this.f.V = ??? | ||
// val _: this.type = ??? // FIXME pickling E | ||
val _: this.f.type = ??? | ||
} | ||
??? | ||
} | ||
trait F: | ||
type V | ||
??? | ||
} |