K2: Fix false-positive RETURN_TYPE_MISMATCH_ON_OVERRIDE
The reason was that `substitutorByMap` ignored the difference between `T` and `T?` ^KT-57001 Fixed
This commit is contained in:
committed by
Space Team
parent
ac8cbcafb4
commit
d9ca77f716
@@ -0,0 +1,11 @@
|
||||
// FIR_IDENTICAL
|
||||
// ISSUE: KT-57001
|
||||
|
||||
interface ConverterFromString<T> {
|
||||
|
||||
fun ofS(s: String): T
|
||||
|
||||
fun nullable(nullText: String): ConverterFromString<T?> = object: ConverterFromString<T?> {
|
||||
override fun ofS(s: String): T? = if (s == nullText) null else this@ConverterFromString.ofS(s)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user