File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed
compiler/src/dotty/tools/dotc/tastyreflect Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -474,7 +474,7 @@ object TastyImpl extends scala.tasty.Tasty {
474
474
object Value extends ValueExtractor {
475
475
def unapply (x : Pattern )(implicit ctx : Context ): Option [Term ] = x match {
476
476
case lit : tpd.Literal @ unchecked => Some (lit)
477
- case ident : tpd.Ident @ unchecked if ident .isTerm => Some (ident )
477
+ case ref : tpd.RefTree @ unchecked if ref .isTerm => Some (ref )
478
478
case _ => None
479
479
}
480
480
}
Original file line number Diff line number Diff line change
1
+ /** Decompiled from out/posTestFromTasty/pos/simpleMatchRef/Foo.class */
2
+ class Foo() {
3
+ val X: scala.Int = scala.Predef.???
4
+ def foo(x: scala.Any): scala.Unit = x match {
5
+ case this.X =>
6
+ scala.Predef.println("a")
7
+ case Y =>
8
+ scala.Predef.println("b")
9
+ }
10
+ }
11
+ /** Decompiled from out/posTestFromTasty/pos/simpleMatchRef/Y.class */
12
+ object Y
Original file line number Diff line number Diff line change
1
+
2
+ class Foo {
3
+ val X : Int = ???
4
+ def foo (x : Any ): Unit = x match {
5
+ case X => println(" a" )
6
+ case Y => println(" b" )
7
+ }
8
+ }
9
+
10
+ object Y
You can’t perform that action at this time.
0 commit comments