Scala Programming Language
  1. Scala Programming Language
  2. SI-6109

Compiler introduces different symbols that have the same binary/internal name

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Scala 2.10.0
    • Fix Version/s: None
    • Component/s: Compiler Backend
    • Labels:
      None

      Description

      See:

      https://groups.google.com/d/msg/scala-internals/Sg3xGKU6UWg/bNgDperR7acJ

      I'm creating this ticket as place-holder so I can refer to it from other places. I'll provide more info later on.

        Issue Links

          Activity

          Hide
          Lukas Rytz added a comment -

          I think this is not a bug.

          The symbol loader will create a symbol for every classfile that it finds. See also https://github.com/scala/scala/blob/21f14e371c0baa9d59678fe5645cea80586ef116/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala#L648

          Show
          Lukas Rytz added a comment - I think this is not a bug. The symbol loader will create a symbol for every classfile that it finds. See also https://github.com/scala/scala/blob/21f14e371c0baa9d59678fe5645cea80586ef116/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala#L648
          Hide
          Paul Phillips added a comment -

          Stepping back, there are two possible approaches: don't create duplicate symbols in the first place, or detect duplicate symbols if they are created. I trust we all agree that the former approach is preferable wherever possible; but if it isn't (I don't know) then we would probably benefit from identifying some invariants about when/where/how we will encounter such duplicates and how/where/when we can reliably detect them.

          Show
          Paul Phillips added a comment - Stepping back, there are two possible approaches: don't create duplicate symbols in the first place, or detect duplicate symbols if they are created. I trust we all agree that the former approach is preferable wherever possible; but if it isn't (I don't know) then we would probably benefit from identifying some invariants about when/where/how we will encounter such duplicates and how/where/when we can reliably detect them.

            People

            • Assignee:
              Grzegorz Kossakowski
              Reporter:
              Grzegorz Kossakowski
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:

                Development