Wiki

Ticket #123 (new enhancement)

Opened 16 years ago

Last modified 16 years ago

support for property with different access modifier visibility

Reported by: gauthier Owned by:
Priority: minor Milestone:
Component: Cobra Compiler Version: 0.8.0
Keywords: property accessor visibility Cc:

Description

c# has them:

abstract class C {
    public abstract object Prop { 
        get; protected set; 
    } 
}

could be

class C
    is abstract
    pro prop
        get is public
        set is protected

Change History

Changed 16 years ago by Chuck

  • priority changed from medium to minor
  • type changed from idea to enhancement
  • milestone Cobra 0.9 deleted

Yes, this was covered in a forum, but I suppose no ticket was made for it. Thanks.

So the syntax would be:

class C
    is abstract
    pro prop is abstract
        get is public
        set is protected

Note the "is abstract" on the "pro prop" line, or the parser will expect method bodies.

Also, the "is public" on "get" is optional since "public" is the default for a non-underscored method.

I took the Milestone off as I don't consider this a requirement for 0.9 since it comes up infrequently. However, if it's important to you, you can certainly implement it and submit it in time.

I suppose we need a Milestone 1.0.

Also, I bumped from "idea" to "enhancement".

Note: See TracTickets for help on using tickets.