Edoardo Luppi
09/04/2023, 1:52 PMcommonMain
I keep getting a warning:
Extension is shadowed by a memberNow, I don't care, I'm happy it's shadowed and I want to suppress it. So I do that, and now it says "redundant suppression" ๐ Can I suppress the "redundant suppression"? lol
mbonnin
09/04/2023, 1:53 PMmbonnin
09/04/2023, 1:54 PMEdoardo Luppi
09/04/2023, 1:55 PMmbonnin
09/04/2023, 1:55 PMcommonMain
, sorry I somehow expected that in build.gradle.kts
mbonnin
09/04/2023, 1:55 PMEdoardo Luppi
09/04/2023, 1:55 PMmbonnin
09/04/2023, 1:56 PMmbonnin
09/04/2023, 1:56 PMEdoardo Luppi
09/04/2023, 1:57 PMpublic expect class ZDeferred<T>
public expect inline fun <T, S> ZDeferred<T>.then(noinline thenFn: (T) -> S): ZDeferred<S>
in `jsMain`:
@Suppress("ACTUAL_TYPE_ALIAS_TO_CLASS_WITH_DECLARATION_SITE_VARIANCE", "ACTUAL_WITHOUT_EXPECT")
public actual typealias ZDeferred<T> = Promise<T>
@Suppress("EXTENSION_SHADOWED_BY_MEMBER")
public actual inline fun <T, S> ZDeferred<T>.then(noinline thenFn: (T) -> S): ZDeferred<S> =
then(onFulfilled = thenFn)
Edoardo Luppi
09/04/2023, 1:57 PMmbonnin
09/04/2023, 1:59 PMmbonnin
09/04/2023, 2:00 PMExpected performance impact from inlining is insignificant. Inlining works best for functions with parameters of functional types
Edoardo Luppi
09/04/2023, 2:00 PMmbonnin
09/04/2023, 2:00 PM> Task :compileKotlinJvm
w: file:///Users/mbonnin/git/test-suppression/src/jvmMain/kotlin/Main.jvm.kt:3:8 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of functional types
Same for JS:
> Task :compileKotlinJs
w: file:///Users/mbonnin/git/test-suppression/src/jsMain/kotlin/Main.js.kt:3:8 Expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of functional types
mbonnin
09/04/2023, 2:01 PMEdoardo Luppi
09/04/2023, 2:01 PMEdoardo Luppi
09/04/2023, 2:05 PMPromise<T>
Edoardo Luppi
09/04/2023, 2:05 PMjsMain
it should be
@Suppress("ACTUAL_TYPE_ALIAS_TO_CLASS_WITH_DECLARATION_SITE_VARIANCE", "ACTUAL_WITHOUT_EXPECT")
actual typealias ZDeferred<T> = Promise<T>
mbonnin
09/04/2023, 2:06 PMEdoardo Luppi
09/04/2023, 2:06 PMmbonnin
09/04/2023, 2:09 PMmbonnin
09/04/2023, 2:09 PMEdoardo Luppi
09/04/2023, 2:10 PMI guess it's a YoutrackI guess so, I'll create it tonight. In the meantime, do you happen to know if something similar to
@Suppress("REDUNDANT_SUPPRESSION")
exists?mbonnin
09/04/2023, 2:10 PMmbonnin
09/04/2023, 2:10 PMEdoardo Luppi
09/04/2023, 2:11 PMmbonnin
09/04/2023, 2:12 PMEdoardo Luppi
09/04/2023, 2:12 PMmbonnin
09/04/2023, 2:13 PMEdoardo Luppi
09/04/2023, 2:14 PM@Suppress("EXTENSION_SHADOWED_BY_MEMBER", "KotlinRedundantDiagnosticSuppress")
Edoardo Luppi
09/04/2023, 2:15 PMJeff Lockhart
09/04/2023, 3:46 PM@Suppress("KotlinRedundantDiagnosticSuppress")
might be what you're looking for.Edoardo Luppi
09/04/2023, 3:48 PMJeff Lockhart
09/04/2023, 3:49 PM