Skip to content

Commit 7b8f63f

Browse files
Merge pull request #7158 from dotty-staging/add-reflection-api-prototype-regression-test
Add TASTy Reflect opaque API prototype
2 parents b0bbe30 + 081b40b commit 7b8f63f

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
trait CompilerInterface {
3+
type Tree
4+
type Term <: Tree
5+
}
6+
7+
class Reflect(val internal: CompilerInterface) {
8+
9+
opaque type Tree = internal.Tree
10+
opaque type Term <: Tree = internal.Term
11+
12+
object Tree {
13+
given Ops (tree: Tree) {
14+
def show: String = ???
15+
}
16+
}
17+
18+
}
19+
20+
object App {
21+
val refl: Reflect = ???
22+
import refl._
23+
24+
val tree: Tree = ???
25+
tree.show
26+
27+
val term: Term = ???
28+
tree.show
29+
30+
}

0 commit comments

Comments
 (0)