Ticket #197 (closed defect: fixed)
Spurious compiler error in void anon method with a return
Reported by: | hopscc | Owned by: | Chuck |
---|---|---|---|
Priority: | medium | Milestone: | |
Component: | Cobra Compiler | Version: | 0.8.0 |
Keywords: | Cc: |
Description
This generates a spurious compiler error. It should not.
sig Delg class DoX def main is shared i = 0 anon as Delg = do if i > 7 return #error thrown here -line 8. print i for i in 0: 10 anon()
Error is
dox.cobra(8): error: Return statement must return a passthrough, or (anonymous method 14735) must have its return type removed.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.