Wiki

Ticket #360 (closed defect: duplicate)

Opened 4 years ago

Last modified 4 years ago

getters should always supply a return value

Reported by: kobi7 Owned by:
Priority: major Milestone:
Component: Cobra Compiler Version: 0.8.0
Keywords: Cc:

Description

currently cobra accepts code such as this:
get hasSubCmds

return _sub.count > 0

however it seems to get confused about the type, in the call site.
I suggest making it mandatory to supply a return value, (which the user may simply forget sometimes).

get hasSubCmds as bool

return _sub.count > 0

Change History

Changed 4 years ago by kobi7

  • status changed from new to closed
  • resolution set to duplicate
Note: See TracTickets for help on using tickets.