Hi Gonzalo,
This is either a misfeature, bug, or exciting new programming paradigm, depending on your point of view :)
To explain:
public class Foo {
1 => static int bar;
}
static int bar; properly declares bar as a static variable. ChucK's "pre-constructor" concept executes all of the actual code in the body of the class every time the class is instantiated. For some reason this includes the 1 => static int bar; which just reduces to 1 => bar; since bar already exists.
Truthfully this is a bug that should be changed to only set the value once for static vars. In practice I do this:
public class Foo {
static int bar;
}
1 => Foo.bar;
which achieves the desired outcome with only minor inconvenience.
spencer