File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
compiler/src/dotty/tools/dotc/inlines Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -567,9 +567,8 @@ class Inliner(val call: tpd.Tree)(using Context):
567567 case t : TypeRef => paramProxy.getOrElse(t, mapOver(t))
568568 case t : TermRef if t.symbol.isImport =>
569569 val ImportType (e) = t.widenTermRefExpr: @ unchecked
570- paramProxy.get(e.tpe) match
571- case Some (p) => newImportSymbol(ctx.owner, singleton(p)).termRef
572- case None => mapOver(t)
570+ val e1 = singleton(apply(e.tpe))
571+ newImportSymbol(ctx.owner, e1).termRef
573572 case t : SingletonType =>
574573 if t.termSymbol.isAllOf(InlineParam ) then apply(t.widenTermRefExpr)
575574 else paramProxy.getOrElse(t, mapOver(t))
Original file line number Diff line number Diff line change @@ -22,8 +22,21 @@ object Minimization:
2222
2323 inline def foo (x : GivesString ): Unit =
2424 import x .aString
25- summon[String ]
25+ summon[String ] // ok
2626 summonInline[String ] // was error
2727
2828 foo(??? )
29+
30+
31+ trait A :
32+ val x : GivesString
33+
34+ inline def bar : Unit =
35+ import this .x .aString
36+ summon[String ] // ok
37+ summonInline[String ] // was error
38+
39+ val a : A = ???
40+ a.bar
41+
2942end Minimization
You can’t perform that action at this time.
0 commit comments