You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using Kotlin's Result type (which is somewhat experimental), you must pass an argument to the compiler to enable Result type to be returned by a function.
Argument required to enable Result return type: -Xallow-result-return-type
When changing the string inside error (Error("Something else")) or making any other trivial change
Quarkus is able to "reload" the application and continue working as expected.
Actual behavior
(Describe the actual behavior clearly and concisely.)
On reload, instead of getting back "Something else" when hitting the /hello endpoint, I see compilation errors Kotlin.Result cannot be used as a return type
Describe the bug
When using Kotlin's
Result
type (which is somewhat experimental), you must pass an argument to the compiler to enable Result type to be returned by a function.Argument required to enable Result return type:
-Xallow-result-return-type
How to pass args to build tools
If using maven:
If using gradle:
Writing a simple hello world example using the Result type works on first compilation:
Expected behavior
Error("Something else")
) or making any other trivial changeQuarkus is able to "reload" the application and continue working as expected.
Actual behavior
(Describe the actual behavior clearly and concisely.)
On reload, instead of getting back
"Something else"
when hitting the/hello
endpoint, I see compilation errorsKotlin.Result
cannot be used as a return typeTo Reproduce
Link to a small reproducer - https://github.com/MrMoner/kotlin-result-pattern-demo
Steps to reproduce the behavior:
Environment (please complete the following information):
ver
: Microsoft Windows [Version 10.0.19041.844]java -version
:openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.10+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.10+9, mixed mode)
mvnw --version
orgradlew --version
): apache-maven-3.6.3The text was updated successfully, but these errors were encountered: