summaryrefslogtreecommitdiff
path: root/test/files/presentation/visibility/src/Completions.scala
blob: 8c0793491586c3f159614083f00e95d1ef1cac80 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package accessibility {

  class Foo {
    private def secretPrivate(): Unit = ()
    private[this] def secretPrivateThis(): Unit = ()

    protected def secretProtected(): Unit

    protected[accessibility] def secretProtectedInPackage(): Unit

    def secretPublic(): Unit

    def someTests(other: Foo) {
      other./*!*/secretPrivate // should be all but scretThis

      this./*!*/secretProtected // should hit five completions
    }
  }

  class AccessibilityChecks extends Foo {
    def someTests {
      this./*!*/ // should not list secretPrivate*
    }
  }

  class UnrelatedClass {
    def someTests(foo: Foo) {
      foo./*!*/ // should list public and protected[accessiblity]
    }
  }

}

package other {
  class SomeChecsk {
    def foo(o: accessibility.Foo) {
      o./*!*/ // should only match secretPublic
    }
  }
}