We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
void
I wrote this code (minimised):
duchess::java_package! package com.example; class MyService { public static native void initialise(java.lang.String); } } #[duchess::java_function(com.example.MyService::initialise)] fn initialise(path: &java::lang::String) -> duchess::GlobalResult<()> { Ok(()) }
But I get the following compile error:
error[E0308]: mismatched types --> client-lib\src\service.rs:413:72 | 413 | #[duchess::java_function(com.example.NotebookService::initialise)] | ^--------- | | | _______________________________________________________________expected `()` because of return type | | 414 | | fn initialise(path: &java::lang::String) -> duchess::GlobalResult<()> { | | ^- help: consider using a semicolon here: `;` | |_____________________| | expected `()`, found `Result<(), Error<Global<...>>>` | = note: expected unit type `()` found enum `std::result::Result<(), duchess::Error<duchess::Global<Throwable>>>`
The compile error goes away if I replace void/GlobalResult<()> with java.lang.String/GlobalResult<String>.
GlobalResult<()>
java.lang.String
GlobalResult<String>
The text was updated successfully, but these errors were encountered:
Thanks for this! I'll take a look. Curious.
Sorry, something went wrong.
Duplicate of #126
No branches or pull requests
I wrote this code (minimised):
But I get the following compile error:
The compile error goes away if I replace
void
/GlobalResult<()>
withjava.lang.String
/GlobalResult<String>
.The text was updated successfully, but these errors were encountered: