Repository navigation
v2.1.1 - static class fields + parser/interpreter correctness fixes
static class fields are now supported
static fields previously had no class-level storage — they were initialized onto every instance, and reading one (ClassName.field, or a bare reference inside a static method) threw at runtime. Now each class has a lazily initialized static-field store, shared by qualified ClassName.field access and bare references inside the class's own static methods, for read, write and compound assignment. The Java and C# grammars also now record the static field modifier (they were dropping it), so this works across those languages too.
Correctness fixes (parser & interpreter)
- Compound assignment
~/=no longer crashes the parser.~/=(Dart) and//=(Python) matched the grammar but had no handler, so parsing threw an uncaught error out ofloadCodeUnit.~/=///=are now fully supported, and any other still-unsupported compound operator (e.g. JavaScript/TypeScript%=) surfaces as a cleanSyntaxErrorinstead of an uncaught crash. Enum.valuescan be assigned to a typed or inferred list. It was built with adynamicelement type while its declared type isList<Enum>, sovar v = Color.values;/List<Color> v = Color.values;failed the declaration cast. It now carries the enum's own element type.ASTValue.fromValue<int>on a non-whole double now throws a cleanApolloVMCastExceptioninstead of a raw DartTypeError.
Division semantics are unchanged and remain intentionally per-language (Dart/JS/TS/Python / yields a double; Java/C#/Go/Kotlin / on ints is truncating integer division); regression guards now pin both.
Full changelog: https://github.com/ApolloVM/apollovm_dart/blob/v2.1.1/CHANGELOG.md