aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/t5099.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/pos/t5099.scala')
-rw-r--r--tests/untried/pos/t5099.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/untried/pos/t5099.scala b/tests/untried/pos/t5099.scala
new file mode 100644
index 000000000..b41697e57
--- /dev/null
+++ b/tests/untried/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
+ }
+}