File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed
compiler/src/dotty/tools/dotc/ast Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -421,7 +421,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
421
421
t
422
422
}
423
423
424
- def singleton (tp : Type )(implicit ctx : Context ): Tree = tp match {
424
+ def singleton (tp : Type )(implicit ctx : Context ): Tree = tp.dealias match {
425
425
case tp : TermRef => ref(tp)
426
426
case tp : ThisType => This (tp.cls)
427
427
case tp : SkolemType => singleton(tp.narrow)
Original file line number Diff line number Diff line change
1
+ import scala .compiletime .erasedValue
2
+
3
+ inline def fooErased [T ] = inline erasedValue[T ] match { case _ => }
4
+ val f = fooErased[EmptyTuple ]
Original file line number Diff line number Diff line change
1
+ import scala .compiletime .erasedValue
2
+
3
+ type Foo = Foo .type
4
+ object Foo
5
+
6
+ inline def fooErased [T ] = inline erasedValue[T ] match { case _ => }
7
+ val f = fooErased[Foo ]
You can’t perform that action at this time.
0 commit comments