Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolveWithStdlib/hashSet.kt
T
2021-04-09 12:32:45 +03:00

21 lines
363 B
Kotlin
Vendored

import java.util.HashSet
val a: MutableSet<String>? = HashSet()
var b: MutableSet<String>? = null
set(_) {
field = HashSet()
}
var <T> MutableSet<T>.d: T? get() = null
set(_) {}
fun <T> produce(): T = TODO()
fun foo() {
var c: MutableSet<String>? = null
c = HashSet()
c<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>.d = produce()
}