summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2010-07-02 16:38:29 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2010-07-02 16:38:29 +0000
commitd9dc68cd2b4b20dae1341064cb784c9169ab162d (patch)
tree0d282297fe74c6eea0edae4047e5c03ce4347869 /test
parentf5f71f2d02f480c08fb24660dcc6b7836857c6b0 (diff)
downloadscala-d9dc68cd2b4b20dae1341064cb784c9169ab162d.tar.gz
scala-d9dc68cd2b4b20dae1341064cb784c9169ab162d.tar.bz2
scala-d9dc68cd2b4b20dae1341064cb784c9169ab162d.zip
Closes #1766 (structural method dispatch broken...
Closes #1766 (structural method dispatch broken in class with multiple constructors). Review by prokopec.
Diffstat (limited to 'test')
-rw-r--r--test/files/run/bug1766.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/bug1766.scala b/test/files/run/bug1766.scala
new file mode 100644
index 0000000000..901f9ae664
--- /dev/null
+++ b/test/files/run/bug1766.scala
@@ -0,0 +1,16 @@
+object Test extends Application {
+
+ class C(s: String) {
+
+ def this(i: Int) = this("bar")
+
+ def f = {
+ val v: { def n: Int } = new { val n = 3 }
+ v.n
+ }
+
+ }
+
+ new C("foo").f
+
+}