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 Bug
    • Status: Closed
    • Priority: Blocker 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.
        }
      }
      

        Activity

        Show
        Mirco Dotta added a comment - https://github.com/scala/scala/pull/3222

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development