error: unresolved reference: success
# kotlin-native
k
error: unresolved reference: success
Hoping I'm just having a momentary brain lapse and/or somebody knows what's happening. Intellij code completes this fine.
cont!!.resumeWith(Result.success("jjj"))
No idea why, but if you run into this, be explicit with 'kotlin.Result.success(asdf)' and it'll compile. Just fyi.
o
This looks like a case of two
*
imports importing same short name
k
Likely. Was baffling as it seemed to work fine on jvm side, but also confusing because "Result" isn't in native runtime source. Apparently a built in type? Saw it in the IR output code
o
Nope, native doesn’t have builtin types at all
k
I couldn't find Result defined in the native runtime source, but found this, which was the source of confusion on my end: https://github.com/JetBrains/kotlin-native/blob/master/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/Ir.kt#L417
Not a big priority, but where is Result defined for native?