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.
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