summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-05-22 18:25:03 +0000
committerPaul Phillips <paulp@improving.org>2011-05-22 18:25:03 +0000
commit850a689e75679640f6d3be167b3113c005f6c04c (patch)
tree608e384fdc51ca667542fbcb336b79997a84df57 /test
parent86e7c9b205f28f6fb01199bcb514bfc0e3062e86 (diff)
downloadscala-850a689e75679640f6d3be167b3113c005f6c04c.tar.gz
scala-850a689e75679640f6d3be167b3113c005f6c04c.tar.bz2
scala-850a689e75679640f6d3be167b3113c005f6c04c.zip
Regression in Enumeration caused some nullary m...
Regression in Enumeration caused some nullary methods to pose as fields. Closes #4570, no review.
Diffstat (limited to 'test')
-rw-r--r--test/files/run/bug4570.check1
-rw-r--r--test/files/run/bug4570.scala8
2 files changed, 9 insertions, 0 deletions
diff --git a/test/files/run/bug4570.check b/test/files/run/bug4570.check
new file mode 100644
index 0000000000..257cc5642c
--- /dev/null
+++ b/test/files/run/bug4570.check
@@ -0,0 +1 @@
+foo
diff --git a/test/files/run/bug4570.scala b/test/files/run/bug4570.scala
new file mode 100644
index 0000000000..5e1a20c52d
--- /dev/null
+++ b/test/files/run/bug4570.scala
@@ -0,0 +1,8 @@
+object Test extends Enumeration {
+ val foo = Value
+ def bar = withName("foo")
+
+ def main(args: Array[String]): Unit = {
+ values foreach println
+ }
+}