forked from TrueCloudLab/neoneo-go
80f71a4e6e
In case of ellipsis usage compiler defines argument type as ArrayT (which is correct, because it's a natural representation of the last argument, it represents the array of interface{}). Here goes the problem: ``` === RUN TestEventWarnings/variadic_event_args_via_ellipsis compiler_test.go:251: Error Trace: compiler_test.go:251 Error: Received unexpected error: event 'Event' should have 'Integer' as type of 1 parameter, got: Array Test: TestEventWarnings/variadic_event_args_via_ellipsis ``` Parsing the last argument in this case is a separate complicated problem due to the fact that we need to grab types of elements of []interface{} inside the fully qualified ast node which may looks like: ``` runtime.Notify("Event", (append([]interface{}{1, 2}, (([]interface{}{someVar, 4}))...))...) ``` Temporary solution is to exclude such notifications from analysis until we're able to properly resolve element types of []interface{}. |
||
---|---|---|
.. | ||
compiler | ||
config | ||
consensus | ||
core | ||
crypto | ||
encoding | ||
interop | ||
io | ||
neorpc | ||
neotest | ||
network | ||
rpcclient | ||
services | ||
smartcontract | ||
util | ||
vm | ||
wallet |