aboutsummaryrefslogtreecommitdiff
path: root/core/testdata/issues/errorClasses.kt
blob: 9e966b3a43d68db1fc76a325719b5aee31798842 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class Test(var value: String) {
    fun brokenApply(v: String) = apply { value = v }

    fun brokenRun(v: String) = run {
        value = v
        this
    }

    fun brokenLet(v: String) = let {
        it.value = v
        it
    }

    fun brokenGenerics() = listOf("a", "b", "c")

    fun working(v: String) = doSomething()

    fun doSomething(): String = "Hello"
}