Skip to content

Commit 6ed869b

Browse files
committed
Add test
1 parent 2548294 commit 6ed869b

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

tests/pos/i11415.scala

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package example
2+
3+
import scala.language.experimental.macros
4+
5+
trait Context {
6+
7+
val universe: Universe
8+
9+
trait Universe {
10+
type Tree >: Null <: AnyRef with TreeApi
11+
type Literal >: Null <: LiteralApi with TermTree
12+
type TermTree >: Null <: TermTreeApi with Tree
13+
14+
trait TermTreeApi extends TreeApi { this: TermTree => }
15+
trait LiteralApi extends TermTreeApi { this: Literal => }
16+
trait TreeApi extends Product { this: Tree => }
17+
}
18+
}
19+
20+
object MacroCompat {
21+
22+
object Bundles {
23+
def mono: Int = macro Macros2.MacroImpl.mono
24+
inline def mono: Int = ${ Macros3.monoImpl }
25+
}
26+
27+
object Macros2 {
28+
class MacroImpl(val c: Context) {
29+
import c.universe._
30+
31+
def mono: Literal = ???
32+
}
33+
}
34+
35+
object Macros3 {
36+
import quoted._
37+
38+
def monoImpl(using Quotes) = '{1}
39+
40+
}
41+
42+
}

0 commit comments

Comments
 (0)