for generic classes it would be really nice to hav...
# announcements
c
for generic classes it would be really nice to have a inline reified constructor, or a inline reified factory method that is called like the class to make it look like a constructor invocation.
s
define an
inline operator fun invoke()
in your class’s companion object
gets pretty close
can make the primary constructor private if you need to
c
That was my first thought as well
c
oh wow thats an interesting idea thanks for that
👍 1
k
Or just a normal function that has the same name as the class.
c
thats what i did before, but then idea warns that a function should not start with an uppercase letter
k
Supress that simple smile.
😮 2
🧌 3
🎉 1