Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-7995

Scope completion marks vars and vals accessible through the getters as non-accessible

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.3, Scala 2.11.0-M7
    • Fix Version/s: Scala 2.10.4-RC1
    • Component/s: Presentation Compiler
    • Labels:
      None

      Description

      This is a follow up to SI-7280.

      As stated in the previous ticket, vals and vars available through an import are returned by the scope completion, but they are filtered out by Scala IDE, and not displayed to the user.

      The reason the IDE filters them is because they are always marked as non-accessible.

      If they can be accessed through the synthetic getters, they should not be mark non-accessible, as referencing them at the location of the completion is valid in code.

      Test case:

      object Cont {
        val someVal = 2
        private val somePrivateVal = 3
        def longName() {}
      }
       
      class ImportOut {
        import Cont._
       
        def foo {
          /*_*/   // `longName`, `someVal` and `somePrivateVal` are in the scope members,
                  // but `someVal` is marked as inaccessible.
        }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              skyluc Luc Bourlier
              Reporter:
              skyluc Luc Bourlier
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: