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
I'd expect it to point user to the missing given instance:
[error] Nogiveninstance of typeStreamArnFor[MyEvent] was found
[error] api.expect(MyEvent){ (event: MyEvent) => event.id.nonEmpty }
[error] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3.nightly says (or 3.7.0-RC1) (Edit: for the minimized gist)
32 | api.expect(MyEvent){ (event: MyEvent) => event.id.nonEmpty }
| ^
|No given instance of type StreamArnFor[MyEvent] was found for parameter streamArnFor of method expect in object api
1 error found
Compilation failed
Compiler version
Tested on latest LTS 3.3.5 and latest Next 3.6.4
Minimized code
Full scala-cli runnable reproduction: https://gist.github.com/majk-p/081f79021769b904cd8399a339bd6e94
Given following API definition
When user attempts to compile api invocation without
StreamArnFor
instance in given scope:Output
The compiler responds with following error
Expectation
I'd expect it to point user to the missing given instance:
Workaround 1
Full runnable workaround: https://gist.github.com/majk-p/06639b0d98f0bb88b60b1ba3355a95ff
Changing the order of
using
clauses such that theStreamArnFor
is first makes the compiler report the correct error.Running the method with
StreamArnFor
in scope works properlyWorkaround 2
Removing
partitionKey: Option[String] = None
makes the initial version compile without changing the parameter orderingThe text was updated successfully, but these errors were encountered: