File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -239,8 +239,7 @@ object TypeErasure {
239
239
* TermRefs are kept instead of being widened away.
240
240
*/
241
241
def erasedRef (tp : Type )(using Context ): Type = tp match {
242
- case tp : TermRef =>
243
- assert(tp.symbol.exists, tp)
242
+ case tp : TermRef if tp.symbol.exists =>
244
243
val tp1 = makePackageObjPrefixExplicit(tp)
245
244
if (tp1 ne tp) erasedRef(tp1)
246
245
else TermRef (erasedRef(tp.prefix), tp.symbol.asTerm)
Original file line number Diff line number Diff line change
1
+ class Foo
2
+ class Bar extends Selectable :
3
+ def selectDynamic (name : String ): Foo = null
4
+
5
+ inline def meth (inline foo : Foo ): Foo = foo
Original file line number Diff line number Diff line change
1
+ class Test :
2
+ def t1 (bar : Bar { val foo : Foo }): Any =
3
+ meth(bar.foo)
You can’t perform that action at this time.
0 commit comments