summaryrefslogtreecommitdiff
path: root/test/files/pos/t2377
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-09-23 18:26:59 +0000
committerPaul Phillips <paulp@improving.org>2009-09-23 18:26:59 +0000
commit9992fe264c779e36e27bad215ac42012e05cfde4 (patch)
treec174b55852491d48db8f8e4e71243b6dcb35afbd /test/files/pos/t2377
parent4edbecfe9baaec89ced227f5bd6b92fb1f54e1ec (diff)
downloadscala-9992fe264c779e36e27bad215ac42012e05cfde4.tar.gz
scala-9992fe264c779e36e27bad215ac42012e05cfde4.tar.bz2
scala-9992fe264c779e36e27bad215ac42012e05cfde4.zip
Fix and test case for #2377.
Diffstat (limited to 'test/files/pos/t2377')
-rw-r--r--test/files/pos/t2377/Q.java12
-rw-r--r--test/files/pos/t2377/a.scala8
2 files changed, 20 insertions, 0 deletions
diff --git a/test/files/pos/t2377/Q.java b/test/files/pos/t2377/Q.java
new file mode 100644
index 0000000000..ef5b0574a6
--- /dev/null
+++ b/test/files/pos/t2377/Q.java
@@ -0,0 +1,12 @@
+public final class Q {
+ public static final class Stage {
+ public static Builder newBuilder() { return new Builder(); }
+ public static final class Builder { }
+ public Builder toBuilder() { return newBuilder(); }
+ }
+ public static final class WorkUnit {
+ public static Builder newBuilder() { return new Builder(); }
+ public static final class Builder { }
+ public Builder toBuilder() { return newBuilder(); }
+ }
+} \ No newline at end of file
diff --git a/test/files/pos/t2377/a.scala b/test/files/pos/t2377/a.scala
new file mode 100644
index 0000000000..5ec58987ff
--- /dev/null
+++ b/test/files/pos/t2377/a.scala
@@ -0,0 +1,8 @@
+import Q._
+
+class Bop(var workUnit: WorkUnit) {
+ def addStages(stageBuilder: Stage.Builder): Unit = {
+ val builder = workUnit.toBuilder
+ ()
+ }
+} \ No newline at end of file