mirror of
https://github.com/github/codeql.git
synced 2025-12-21 11:16:30 +01:00
This generates functions that omit parameters with default values, rightmost first, such that Java can achieve a similar experience to Kotlin (which represents calls internally as if the default was supplied explicitly, and/or uses a $default method that supplies the needed arguments). A complication: combining JvmOverloads with JvmStatic means that both the companion object and the surrounding class get overloads.
7 lines
132 B
Kotlin
7 lines
132 B
Kotlin
public class A {
|
|
|
|
@JvmOverloads
|
|
fun <T> genericFunctionWithOverloads(x: T? = null, y: List<T>? = null, z: T? = null): T? = z
|
|
|
|
}
|