https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
r

Ryan Simon

04/16/2021, 8:45 PM
Hey all, quick question about
kotlin.Result
usage in KMP. trying to use it as a return type by using this in my
:shared
KMP module's build file
Copy code
kotlin {
    targets.all {
        compilations.all {
            kotlinOptions {
                freeCompilerArgs = freeCompilerArgs + "-Xallow-result-return-type"
            }
        }
    }

    // other source sets and targets here...
}
I can build and run my apps just fine but the IDE is still highlighting that Result cannot be used as a return type. Anyone know if this is an IDE issue or I just didn't configure the build file correctly?
k

Kris Wong

04/16/2021, 8:46 PM
try running a gradle sync just to be sure. it might not understand that compiler arg.
r

Ryan Simon

04/16/2021, 8:48 PM
first thing i tried, but no dice 😕
l

louiscad

04/17/2021, 11:59 AM
This should not be needed anymore in Kotlin 1.5
🙏 1
3 Views