Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
xeno-by committed Feb 1, 2012
1 parent 263aa2e commit 41ce53e
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/pending/run/t5427a.check
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2
10 changes: 10 additions & 0 deletions test/pending/run/t5427a.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import scala.reflect.mirror._

object Foo { val bar = 2 }

object Test extends App {
val tpe = getType(Foo)
val bar = tpe.nonPrivateMember(newTermName("bar"))
val value = getValue(Foo, bar)
println(value)
}
1 change: 1 addition & 0 deletions test/pending/run/t5427b.check
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2
11 changes: 11 additions & 0 deletions test/pending/run/t5427b.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import scala.reflect.mirror._

class Foo { val bar = 2 }

object Test extends App {
val foo = new Foo
val tpe = getType(foo)
val bar = tpe.nonPrivateMember(newTermName("bar"))
val value = getValue(foo, bar)
println(value)
}
1 change: 1 addition & 0 deletions test/pending/run/t5427c.check
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
no public member
13 changes: 13 additions & 0 deletions test/pending/run/t5427c.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import scala.reflect.mirror._

class Foo(bar: Int)

object Test extends App {
val foo = new Foo(2)
val tpe = getType(foo)
val bar = tpe.nonPrivateMember(newTermName("bar"))
bar match {
case NoSymbol => println("no public member")
case _ => println("i'm screwed")
}
}
1 change: 1 addition & 0 deletions test/pending/run/t5427d.check
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2
11 changes: 11 additions & 0 deletions test/pending/run/t5427d.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import scala.reflect.mirror._

class Foo(val bar: Int)

object Test extends App {
val foo = new Foo(2)
val tpe = getType(foo)
val bar = tpe.nonPrivateMember(newTermName("bar"))
val value = getValue(foo, bar)
println(value)
}

0 comments on commit 41ce53e

Please sign in to comment.