Wiki

Ticket #205 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

properties using 'from var' should also search for a __name

Reported by: hopscc Owned by: Chuck
Priority: medium Milestone:
Component: Cobra Compiler Version: 0.8.0
Keywords: Cc:

Description

Its not uncommon to want property backing variables as private declared minimally using the __name (double underscore prefix) shortcut.

var __buttonCount = 0

pro buttonCount from var

Currently if use '<name> from var' syntax as above for an automatic match the compiler gives an error regarding a missing _name

There is no variable named "_buttonCount" to match the property "buttonCount"

For completeness the name lookup using 'from var' should also look for a __name if the search for a _name fails.

Attachments

prop-from-var-fallback.patch Download (3.8 KB) - added by hopscc 14 years ago.

Change History

Changed 14 years ago by hopscc

  • summary changed from props using from var should also search for a __name to properties using 'from var' should also search for a __name

Changed 14 years ago by hopscc

Changed 14 years ago by hopscc

  • status changed from new to assigned
  • owner set to Chuck

Irritating niggling annoyance rather than a defect.

Heres a patch +Tests + relnote

Changed 14 years ago by Chuck

  • status changed from assigned to closed
  • resolution set to fixed

I agree. Thanks for the patch. Applied in changeset:2394

Note: See TracTickets for help on using tickets.