From 41ce53e3e643e85a022393e54c952ec4dee2cb57 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Tue, 31 Jan 2012 19:23:00 +0100 Subject: Tests for https://issues.scala-lang.org/browse/SI-5427 --- test/pending/run/t5427a.check | 1 + test/pending/run/t5427a.scala | 10 ++++++++++ test/pending/run/t5427b.check | 1 + test/pending/run/t5427b.scala | 11 +++++++++++ test/pending/run/t5427c.check | 1 + test/pending/run/t5427c.scala | 13 +++++++++++++ test/pending/run/t5427d.check | 1 + test/pending/run/t5427d.scala | 11 +++++++++++ 8 files changed, 49 insertions(+) create mode 100644 test/pending/run/t5427a.check create mode 100644 test/pending/run/t5427a.scala create mode 100644 test/pending/run/t5427b.check create mode 100644 test/pending/run/t5427b.scala create mode 100644 test/pending/run/t5427c.check create mode 100644 test/pending/run/t5427c.scala create mode 100644 test/pending/run/t5427d.check create mode 100644 test/pending/run/t5427d.scala (limited to 'test/pending') diff --git a/test/pending/run/t5427a.check b/test/pending/run/t5427a.check new file mode 100644 index 0000000000..d8263ee986 --- /dev/null +++ b/test/pending/run/t5427a.check @@ -0,0 +1 @@ +2 \ No newline at end of file diff --git a/test/pending/run/t5427a.scala b/test/pending/run/t5427a.scala new file mode 100644 index 0000000000..27b28da0ac --- /dev/null +++ b/test/pending/run/t5427a.scala @@ -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) +} \ No newline at end of file diff --git a/test/pending/run/t5427b.check b/test/pending/run/t5427b.check new file mode 100644 index 0000000000..d8263ee986 --- /dev/null +++ b/test/pending/run/t5427b.check @@ -0,0 +1 @@ +2 \ No newline at end of file diff --git a/test/pending/run/t5427b.scala b/test/pending/run/t5427b.scala new file mode 100644 index 0000000000..7a92b6ebbe --- /dev/null +++ b/test/pending/run/t5427b.scala @@ -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) +} \ No newline at end of file diff --git a/test/pending/run/t5427c.check b/test/pending/run/t5427c.check new file mode 100644 index 0000000000..32c91abbd6 --- /dev/null +++ b/test/pending/run/t5427c.check @@ -0,0 +1 @@ +no public member \ No newline at end of file diff --git a/test/pending/run/t5427c.scala b/test/pending/run/t5427c.scala new file mode 100644 index 0000000000..ab41d8b8cd --- /dev/null +++ b/test/pending/run/t5427c.scala @@ -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") + } +} \ No newline at end of file diff --git a/test/pending/run/t5427d.check b/test/pending/run/t5427d.check new file mode 100644 index 0000000000..d8263ee986 --- /dev/null +++ b/test/pending/run/t5427d.check @@ -0,0 +1 @@ +2 \ No newline at end of file diff --git a/test/pending/run/t5427d.scala b/test/pending/run/t5427d.scala new file mode 100644 index 0000000000..fd4c62e876 --- /dev/null +++ b/test/pending/run/t5427d.scala @@ -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) +} \ No newline at end of file -- cgit v1.2.3