File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ import scala .quoted ._
2
+
3
+ object Test {
4
+
5
+ trait Producer [A ] { self =>
6
+ def step (k : (A => Expr [Unit ])): Expr [Unit ]
7
+ }
8
+
9
+ trait Foo [A ]
10
+ case class Bar [A , B ](producer : Producer [B ], nestedf : B => Expr [Unit ]) extends Foo [A ]
11
+
12
+ def meth [A ](stream : Foo [Expr [A ]]): Producer [Expr [A ]] = {
13
+ stream match {
14
+ case Bar (producer, nestedf) => {
15
+ new Producer [Expr [A ]] {
16
+ def step (k : Expr [A ] => Expr [Unit ]): Expr [Unit ] = ' {
17
+ val adv : Unit => Unit = { _ => ~ producer.step((el) => nestedf(el))}
18
+ }
19
+ }
20
+ }
21
+ }
22
+ }
23
+ }
Original file line number Diff line number Diff line change
1
+ import scala .quoted ._
2
+
3
+ object Test {
4
+ def step (k : (String => Expr [Unit ])): Expr [Unit ] = '()
5
+ def meth (): Unit = ' {
6
+ (i : Int ) => ~ step(el => '() )
7
+ }
8
+ }
You can’t perform that action at this time.
0 commit comments