Skip to content

Instantly share code, notes, and snippets.

Created Jun 13, 2021
What would you like to do?
fun `target is a data class`() {
val kotlinSource = SourceFile.kotlin(
"file1.kt", """
package com.tests.summable
import com.tsongkha.kspexample.IntSummable
data class FooSummable(
val bar: Int = 234,
val baz: Int = 123
val compilationResult = compile(kotlinSource)
assertEquals(KotlinCompilation.ExitCode.OK, compilationResult.exitCode)
package com.tests.summable
import kotlin.Int
public fun FooSummable.sumInts(): Int {
val sum = bar + baz
return sum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment