caffeine
12/24/2021, 9:06 AMexpect class ContextRef
then I try implement this code for linux_x64:
actual typealias ContextRef = LLVMContextRef
in this case i got error because LLVMContextRef
is alias: public typealias LLVMContextRef = kotlinx.cinterop.CPointer<cnames.structs.LLVMOpaqueContext>
okey, it is fine, I forgot about that thing. I try to change my code to actual typealias ContextRef = kotlinx.cinterop.CPointer<cnames.structs.LLVMOpaqueContext>
And i got suddenly error: Type arguments in the right-hand side of actual type alias should be its type parameters in the same order, e.g. 'actual typealias Foo<A, B> = Bar<A, B>'
Why it happend? Why it work fine without expect
and actual
? How I can fix it?caffeine
12/24/2021, 9:12 AMpublic expect class TestResult
in js public actual typealias TestResult = Promise<Unit>
(it is my case)
in other (jvm and native): public actual typealias TestResult = Unit
. How it work? TestResult
should be class
, but Unit
- it is object
caffeine
12/24/2021, 10:41 AM@Suppress("NO_ACTUAL_FOR_EXPECT")
expect class LLVMContextRef
@Suppress("ACTUAL_WITHOUT_EXPECT", "ACTUAL_TYPE_ALIAS_WITH_COMPLEX_SUBSTITUTION")
actual typealias LLVMContextRef = CPointer<cnames.structs.LLVMOpaqueContext>