summaryrefslogtreecommitdiff
path: root/test/files/pos/t5099.scala
blob: 178151259f6da20ac7dc15fecda4a53d82654ae2 (plain) (blame)
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
    }
}