Boo

Allow specific types for getter/property AST attributes

Details

  • Type: New Feature New Feature
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 0.8.2
  • Fix Version/s: 0.9
  • Component/s: None
  • Labels:
    None
  • Testcase included:
    yes
  • Number of attachments :
    0

Description

It is often desirable to have a property with a type less specialized than the underlying field type.

Currently we have to get back to the long syntax to do that but we should be able to do that :

[getter(Foos as Foo*)]
_foos = List[of Foo]()

[getter(Actions as ICollection[of Action])]
_actions = List[of Action]()

Activity

Hide
Avishay Lavie added a comment -

Great idea. Related: we also need a way to define accessibility using getter/setter/property macros.

[getter(Foos as Foo*)]
[setter(protected Foos as List of Foo)]
_foos = List of Foo()
Show
Avishay Lavie added a comment - Great idea. Related: we also need a way to define accessibility using getter/setter/property macros.
[getter(Foos as Foo*)]
[setter(protected Foos as List of Foo)]
_foos = List of Foo()
Hide
Cedric Vivier added a comment -

Landed in rev. 3062

Show
Cedric Vivier added a comment - Landed in rev. 3062
Hide
Cedric Vivier added a comment - - edited

Avish, we can already define accessibility with the Protected flag.

[getter(Foo, Protected:true)]

Show
Cedric Vivier added a comment - - edited Avish, we can already define accessibility with the Protected flag. [getter(Foo, Protected:true)]

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: