Open mvysny opened 7 years ago
Reported as a bug to the ByteBuddy library: https://github.com/raphw/byte-buddy/issues/350 Most probably caused by the bug in the Kotlin compiler: https://youtrack.jetbrains.com/issue/KT-20869 Unfortunately there are no known workarounds as of now.
The only workaround I could found is that the class must have a public zero-arg constructor, and all fields must then be listed outside of any constructor.
"The only workaround I could found is that the class must have a public zero-arg constructor, and all fields must then be listed outside of any constructor"
If it's any consolation, Google seems to run into similar issues with plain Java and Android framework, so at least you have company. Example: https://stackoverflow.com/questions/44194579/android-viewmodel-has-no-zero-argument-constructor
Lots of frameworks tend to require zero-arg constructor - that's completely OK. However, this bug is something else - it's a bug in Kotlin compiler which produces illegal bytecode. Please read more here: https://github.com/raphw/byte-buddy/issues/350
If you'd like this bug to be fixed, please upvote https://youtrack.jetbrains.com/issue/KT-20869 by starring it.
When I launch the Beverage Buddy Vaadin 10 example and hit "Edit" button on the Reviews list, I'll get the following exception in the console: