File tree Expand file tree Collapse file tree 2 files changed +24
-26
lines changed
Expand file tree Collapse file tree 2 files changed +24
-26
lines changed Original file line number Diff line number Diff line change 1+ {
2+ class C() {
3+ def a: scala.Int = 0
4+ private[this] def b: scala.Int = 0
5+ private[this] def c: scala.Int = 0
6+ private[C] def d: scala.Int = 0
7+ protected def e: scala.Int = 0
8+ protected[this] def f: scala.Int = 0
9+ protected[C] def g: scala.Int = 0
10+ }
11+ ()
12+ }
13+ @scala.annotation.internal.SourceFile("tests/run-macros/term-show/Test_2.scala") trait A() extends java.lang.Object {
14+ def imp(x: scala.Int)(implicit str: scala.Predef.String): scala.Int
15+ def use(`x₂`: scala.Int)(using `str₂`: scala.Predef.String): scala.Int
16+ def era(`x₃`: scala.Int)(erased `str₃`: scala.Predef.String): scala.Int
17+ def f1(x1: scala.Int, erased x2: scala.Int): scala.Int
18+ def f2(erased `x1₂`: scala.Int, erased `x2₂`: scala.Int): scala.Int
19+ def f3(using `x1₃`: scala.Int, erased `x2₃`: scala.Int): scala.Int
20+ def f4(using erased `x1₄`: scala.Int, erased `x2₄`: scala.Int): scala.Int
21+ }
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ trait A:
1313object Test {
1414 import TypeToolbox .*
1515 def main (args : Array [String ]): Unit = {
16- assert (show {
16+ println (show {
1717 class C {
1818 def a = 0
1919 private def b = 0
@@ -23,31 +23,8 @@ object Test {
2323 protected [this ] def f = 0
2424 protected [C ] def g = 0
2525 }
26- }
27- ==
28- """ {
29- | class C() {
30- | def a: scala.Int = 0
31- | private[this] def b: scala.Int = 0
32- | private[this] def c: scala.Int = 0
33- | private[C] def d: scala.Int = 0
34- | protected def e: scala.Int = 0
35- | protected[this] def f: scala.Int = 0
36- | protected[C] def g: scala.Int = 0
37- | }
38- | ()
39- |}""" .stripMargin)
26+ })
4027
41- assert(showTree(" A" )
42- ==
43- """ @scala.annotation.internal.SourceFile("tests/run-macros/term-show/Test_2.scala") trait A() extends java.lang.Object {
44- | def imp(x: scala.Int)(implicit str: scala.Predef.String): scala.Int
45- | def use(`x₂`: scala.Int)(using `str₂`: scala.Predef.String): scala.Int
46- | def era(`x₃`: scala.Int)(erased `str₃`: scala.Predef.String): scala.Int
47- | def f1(x1: scala.Int, erased x2: scala.Int): scala.Int
48- | def f2(erased `x1₂`: scala.Int, erased `x2₂`: scala.Int): scala.Int
49- | def f3(using `x1₃`: scala.Int, erased `x2₃`: scala.Int): scala.Int
50- | def f4(using erased `x1₄`: scala.Int, erased `x2₄`: scala.Int): scala.Int
51- |}""" .stripMargin)
28+ println(showTree(" A" ))
5229 }
5330}
You can’t perform that action at this time.
0 commit comments