Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 0.8.2
-
Fix Version/s: 0.9
-
Component/s: None
-
Labels:None
-
Number of attachments :
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.
Fixed in rev. 3098