mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
Also support specifying additional options to javac in codegen tests, which was needed to compile Java sources with the "-parameters" option
16 lines
507 B
Kotlin
Vendored
16 lines
507 B
Kotlin
Vendored
// JAVAC_OPTIONS: -parameters
|
|
|
|
import kotlin.test.assertEquals
|
|
|
|
fun box(): String {
|
|
val methodParam = J::foo.parameters.single()
|
|
if (methodParam.name == null) return "Fail: method parameter has no name"
|
|
assertEquals("methodParam", methodParam.name)
|
|
|
|
val constructorParam = J::class.constructors.single().parameters.single()
|
|
if (constructorParam.name == null) return "Fail: constructor parameter has no name"
|
|
assertEquals("constructorParam", constructorParam.name)
|
|
|
|
return "OK"
|
|
}
|