Ticket #337 (closed enhancement: fixed)
Confusing message on missed 'of' in generics call
Reported by: | hopscc | Owned by: | Chuck |
---|---|---|---|
Priority: | medium | Milestone: | |
Component: | Cobra Compiler | Version: | 0.9.4 |
Keywords: | Cc: |
Description
Found by Chasm
Below program gives error msg
"The method "method" is expecting 1 argument, but no arguments are being supplied in this call. The declaration is "method(argument as T)""
class Program def main .method<int>(14) def method<of T>(argument as T) pass
Call is incorrect but parsed as a (invalid) ChainedCompare.
Probably easy enough to do if used to C* languages generics support.
<Type> vs <of Type> in cobra.
Perhaps trap this (based on comparison being to a Type) and emit a soothing corrective suggestion.
See ForumTopic
Attachments
Change History
Note: See
TracTickets for help on using
tickets.