Wiki

Ticket #92 (new enhancement)

Opened 15 years ago

Last modified 15 years ago

cue init

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

Description

  • The first statement in the .init cue must be base.init or .init
  • If the signature is the same as an inherited one then is override or a base.init call is required, just like methods.
  • init can be overloaded just like a method.
  • init cannot be invoked outside of an init cue (other than indirectly through instantiation)
  • If no init cues are defined in a class then the init cues of the base class are inherited.
  • At some point def init should give a warning.
  • At some point the internal hacks around methods called init can be removed.

See also:  http://cobra-language.com/forums/viewtopic.php?f=4&t=213

Change History

Changed 15 years ago by Chuck

  • Done: def init should give a warning.
  • To do: If a subclass defines no init and there is no parameterless init in the base class, give the user a nice error message with correct line number.
Note: See TracTickets for help on using tickets.