summaryrefslogtreecommitdiff
path: root/test/files/pos/t4036.scala
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2010-12-03 18:47:06 +0000
committerLukas Rytz <lukas.rytz@epfl.ch>2010-12-03 18:47:06 +0000
commite1a0866ce748ee1a228060f401dbb190d3caa8c3 (patch)
treecb5a6f9ad52bfa4d93d5c54674a412fdb40f16bb /test/files/pos/t4036.scala
parent627adab5dbddcef8bd57d2b40eaa6a6e40c06cab (diff)
downloadscala-e1a0866ce748ee1a228060f401dbb190d3caa8c3.tar.gz
scala-e1a0866ce748ee1a228060f401dbb190d3caa8c3.tar.bz2
scala-e1a0866ce748ee1a228060f401dbb190d3caa8c3.zip
close #4036, fix #2489.
Diffstat (limited to 'test/files/pos/t4036.scala')
-rw-r--r--test/files/pos/t4036.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/pos/t4036.scala b/test/files/pos/t4036.scala
new file mode 100644
index 0000000000..b902a3153b
--- /dev/null
+++ b/test/files/pos/t4036.scala
@@ -0,0 +1,13 @@
+object Error {
+ def f {
+ case class X(b: Boolean = false)
+ val r = X()
+ }
+ def g = {
+ val x = 0
+ var y = 1 // no constant type
+ def foo(z: Int = y) = 1
+ val z = 2
+ foo()
+ }
+}