Skip to content

WIP: fix inline export forwarder generation regression #23126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion compiler/src/dotty/tools/dotc/transform/AccessProxies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,11 @@ abstract class AccessProxies {
if accessorClass.is(Package) then
accessorClass = ctx.owner.topLevelClass
val accessorName = accessorNameOf(accessed.name, accessorClass)
val mappedInfo = accessed.info match
case tref @ TypeRef(prefix, _) if tref.symbol.is(Module) => TermRef(prefix, tref.symbol.companionModule)
case other => other
val accessorInfo =
accessed.info.ensureMethodic.asSeenFrom(accessorClass.thisType, accessed.owner)
mappedInfo.ensureMethodic.asSeenFrom(accessorClass.thisType, accessed.owner)
val accessor = accessorSymbol(accessorClass, accessorName, accessorInfo, accessed)
rewire(reference, accessor)
}
Expand Down
16 changes: 16 additions & 0 deletions tests/pos/i22593.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import scala.quoted.*

package jam {
trait JamCoreDsl {
implicit inline def defaultJamConfig: this.JamConfig =
new JamConfig(brewRecRegex = ".*")
class JamConfig(val brewRecRegex: String)
inline def brew(implicit inline config: JamConfig): Unit = ???
}
private object internal extends JamCoreDsl
export internal._
}

object test {
jam.brew
}
Loading