Ticket #375 (new enhancement)
Opened 10 years ago
Confusing error message when omitting `as dynamic`
Reported by: | Jonno | Owned by: | |
---|---|---|---|
Priority: | trivial | Milestone: | |
Component: | Cobra Compiler | Version: | 0.9.6 |
Keywords: | dynamic void error | Cc: |
Description
The following code
class VoidError def doError(x) return x def main .doError(1)
produces the error
error: Keyword "void" cannot be used in this context=
which appears to come straight from the C# compiler. Coming back from Python, I forgot to add as dynamic to the method signature. Would it be possible to detect a return statement in a void method and either treat as dynamic as implied, or raise a more suitable error message that pertains directly to the Cobra source?
Note: See
TracTickets for help on using
tickets.