Boo

Avoid unneeded field initialization

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 0.8.2
  • Fix Version/s: 0.9
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

Currently, field initialization generates unneeded code when using default values.

The following code :

class Foo:
    _enabled = false
    _count = 0

Will create and emit these as assignment in the constructor.
Of course one could define fields with _enabled as bool and _count as int to avoid that, but it is not what type inference is about and Boo should be smart enough to handle that automatically.

Activity

Hide
Cedric Vivier added a comment -

Fixed in rev. 3098

Show
Cedric Vivier added a comment - Fixed in rev. 3098

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: