Open lerzeel opened 7 years ago
I think a quick fix is to not put the meta in the interface, but in the implementation.
So make your interface like this:
interface RandomItemInput2
{
function readPart():Surprise<String, Dynamic>;
}
and implementation:
@await class Input implements RandomItemInput2
{
@async public function readPart():String { /* ... */ }
}
But it still worth a look about the bug itself, or maybe we should just amend the readme.
Great tip! This seems to solve the problem.
In case someone is trying to find the right import, here it is:
import tink.core.Future.Surprise;
using tink.CoreApi;
is the recommended way to import everything from tink_core :smile:
btw let's keep this open until we fix the readme or something
Is it possible to use @await and @async on interfaces? The documentation says interfaces are supported but when I try to compile the following interface I get an error message:
The error message is:
A quick look at the source code reveals that the members of the interface are being processed. But when the "readPart" function is processed the func.expr value is null. This causes the "expr.pos.makeBlankType()" expression to fail.
Any idea what is causing this problem?