Skip to content

No way to find the original symbol for exported symbols #19444

@tgodzik

Description

@tgodzik

Compiler version

3.4.0-RC1

Minimized code

We can get the example from the docs:

class BitMap
class InkJet

class Printer:
  type PrinterType
  def print(bits: BitMap): Unit = ???
  def status: List[String] = ???

class Scanner:
  def scan(): BitMap = ???
  def status: List[String] = ???

class Copier:
  private val printUnit = new Printer { type PrinterType = InkJet }
  private val scanUnit = new Scanner

  export scanUnit.scan
  export printUnit.{status as _, *}

  def status: List[String] = printUnit.status ++ scanUnit.status

Output

Currently when using the exported symbols there will be no link to the original symbol, which means both semanticdb and the presentation compiler will not work properly. This most likely affects Intellij also.

Expectation

There is a .sourceSymbol filed, which could maybe link to the original symbol?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions