summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-10-31 16:37:59 +0000
committerPaul Phillips <paulp@improving.org>2011-10-31 16:37:59 +0000
commit8de176f454d1e365b1297de21a0ed4a45c04a87f (patch)
tree2196e6db505ef3d14075a1c6b87d46420cb2cf8a /test/files
parent62b01828347087f071c70ac191372a357c4fc787 (diff)
downloadscala-8de176f454d1e365b1297de21a0ed4a45c04a87f.tar.gz
scala-8de176f454d1e365b1297de21a0ed4a45c04a87f.tar.bz2
scala-8de176f454d1e365b1297de21a0ed4a45c04a87f.zip
Clean result of function type.
NullaryMethodType was escaping. Closes SI-5099, review by moors.
Diffstat (limited to 'test/files')
-rw-r--r--test/files/pos/t5099.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/files/pos/t5099.scala b/test/files/pos/t5099.scala
new file mode 100644
index 0000000000..178151259f
--- /dev/null
+++ b/test/files/pos/t5099.scala
@@ -0,0 +1,14 @@
+class LazyValVsFunctionType[a] {
+ val f: a => a = x => {
+ lazy val _x: a = throw new java.lang.Error("todo")
+ _x // error: type mismatch
+/*
+[error] found : a => => a
+[error] required: a => a
+[error] val f: a => a = x => {
+[error] ^
+[error] one error found
+*/
+ // _x: a // ok
+ }
+} \ No newline at end of file