isExtension

val isExtension: Boolean = false

Parameters

isExtension

whether the member is an extension property or an extension function. Default is false.

If there is a member with the same name as this member in a local scope, the generated code will include this member's fully-qualified name to avoid ambiguity, e.g.:

package com.squareup.tacos

import kotlin.Unit

public class TacoTest {
public fun test(): Unit {
kotlin.error("errorText")
}

public fun error(): Unit {
}
}

However, since Kotlin compiler does not allow fully-qualified extension members, if isExtension is set to true for this MemberName, the generated code will include an import for this member and its simple name at the call site, e.g.:

package com.squareup.tacos

import kotlin.Unit
import kotlin.hashCode

public class TacoTest {
public override fun hashCode(): Unit {
var result = super.hashCode
if (result == 0) {
result = result * 37 + embedded_message.hashCode()
super.hashCode = result
}
return result
}
}