summaryrefslogtreecommitdiff
path: root/test/files/run/t6989/Test_2.scala
blob: ba88e5cce39642293c5cedff73df84b21cf2c0ff (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
import scala.reflect.runtime.universe._

package object foo {
  def test(sym: Symbol) = {
    println("============")
    println(sym)
    println(s"isPrivate = ${sym.isPrivate}")
    println(s"isProtected = ${sym.isProtected}")
    println(s"isPublic = ${sym.isPublic}")
    println(s"privateWithin = ${sym.privateWithin}")
  }

  def testAll() = {
    test(typeOf[foo.JavaClass_1].typeSymbol)
    test(typeOf[foo.JavaClass_1].declaration(newTermName("x")))
    test(typeOf[foo.JavaClass_1].declaration(newTermName("y")))
    test(typeOf[foo.JavaClass_1].declaration(newTermName("z")))
  }
}

object Test extends App {
  foo.testAll()
}