Slide 96
Slide 96 text
class GreetingFirDeclarationGenerationExtension(session: FirSession) : … {
override fun getCallableNamesForClass(
...
) : Set {
.. .
}
override fun generateFunctions(
callableId: CallableId,
context: MemberGenerationContext?
): List {
return listOf(
createMemberFunction(
owner = context
? .
owner
?:
return emptyList(),
key = GreetingDeclarationKey,
name = callableId.callableName,
returnType = session.builtinTypes.unitType.type,
config = {
valueParameter(Name.identifier("name"), session.builtinTypes.stringType.type)
}
).symbol
)
}
}
96
fun greet(name: String)