Given `data class Foo(var s: Int? = null)`, is it ...
# announcements
c
Given
data class Foo(var s: Int? = null)
, is it possible to invoke the default constructor by reflection without requiring
@JvmOverloads
? Without it, I see that this class has two constructors, one with a last parameter
DefaultConstructorMarker
but it doesn’t look like I can invoke it.
k
That's funny, both the REPL and the debugger in IDEA have trouble with
Foo::class.constructors
, they say it has type
ArrayList
but when I do
Foo::class.constructors[0]
they complain that the
get
overloads for
Map
don't work.