Ticket #83 (closed enhancement: fixed)
Don't require `is shared` for `def main`
Reported by: | Chuck | Owned by: | Chuck |
---|---|---|---|
Priority: | major | Milestone: | Cobra 0.9 |
Component: | Cobra Compiler | Version: | 0.8.0 |
Keywords: | Cc: |
Description
If a class has a parameterless initializer (whether explicit or implied) then don't require that the main be shared:
class Hello def main print 'Hello'
Generate an error if the class does not have a parameterless constructor.
If there is more than one main method in a program, that's an error due to ambiguity.
Also, provide a command line option to specify which method is the main method like C# does. In which case there is no ambiguity.
Change History
Note: See
TracTickets for help on using
tickets.