[FIR] Fix missing receiver type if anonymous function without label
This commit is contained in:
+2
-2
@@ -9,7 +9,7 @@ class None<T> : Option<T>
|
||||
fun <T> bind(r: Option<T>): Option<T> {
|
||||
return if (r is Some) {
|
||||
// Ideally we should infer Option<T> here (see KT-10896)
|
||||
(if (true) None() else r) checkType { <!UNRESOLVED_REFERENCE!>_<!><Option<T>>() }
|
||||
(if (true) None() else r) checkType { _<Option<T>>() }
|
||||
// Works correctly
|
||||
if (true) None() else r
|
||||
}
|
||||
@@ -48,7 +48,7 @@ class SimpleNone : SimpleOption
|
||||
|
||||
fun bindNoGeneric(r: SimpleOption): SimpleOption {
|
||||
return if (r is SimpleSome) {
|
||||
(if (true) SimpleNone() else r) checkType { <!UNRESOLVED_REFERENCE!>_<!><SimpleOption>() }
|
||||
(if (true) SimpleNone() else r) checkType { _<SimpleOption>() }
|
||||
if (true) SimpleNone() else r
|
||||
}
|
||||
else r
|
||||
|
||||
Reference in New Issue
Block a user