aboutsummaryrefslogblamecommitdiff
path: root/tests/untried/pos/t5099.scala
blob: b41697e572dd8a6c7b30a71c5c8b60c0ee1fe4c3 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
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
    }
}