Compiler error when using @meth
There is a compiler error thrown when using @meth decorator.
This expression has type Js_OO.Meth.arity1<array<int> => bool>
It is not a function.
Rescript version: 9.1.2
But the code compiles in version 9.0.2. Can you verify?
https://rescript-lang.org/try?code=C4TwDgpgBAhgTnGIBMAeA5DAfFAvFAbwCgooABAWwmAAsSoAiASwGcBBBJBgLlk5FRMAdsBy4cAIwD2UgDZEAvkTIsAxlMgAKBgHdhAEyk6GASnIA3GLKgQAHsAhwhVvohS94btMNF5GHNwYiWWooYTAAV2A-AG0ARgBdYNDbP08kZGTokD9bGOZ2fgYEzXCokyIgA
This is reproducible for me as well.
Syntax Lookup example code for @meth also shows this error.
Removing the @meth decorator appears to resolve the issue.
Not sure if the docs need to be updated, or this should be raised as a compiler issue?
9.1.2 basically made the original @meth semantics inaccessible from our syntax (/cc @IwanKaramazow), because the compiler unified Js.t with structural objects. To represent method calls, you kinda need to use @send external instead (at least for now, not sure if we want to introduce dedicated syntax for method calls).
This needs to be updated in the docs
This actually compiles again in v11. Closing...