File tree 2 files changed +24
-26
lines changed
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:
13
13
object Test {
14
14
import TypeToolbox .*
15
15
def main (args : Array [String ]): Unit = {
16
- assert (show {
16
+ println (show {
17
17
class C {
18
18
def a = 0
19
19
private def b = 0
@@ -23,31 +23,8 @@ object Test {
23
23
protected [this ] def f = 0
24
24
protected [C ] def g = 0
25
25
}
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
+ })
40
27
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" ))
52
29
}
53
30
}
You can’t perform that action at this time.
0 commit comments