The implementation of the Rascal meta-programming language (including interpreter, type checker, parser generator, compiler and JVM based run-time system)
>rascal>data X = x(map[str,str] namen=());
ok
rascal>X example = x();
X: x()
rascal>example.namen["jurgen"] = "vinju";
|prompt:///|(0,13,<1,0>,<1,13>): Uninitialized variable
Advice: |https://www.rascal-mpl.org/docs/Rascal/Errors/CompileTimeErrors/UninitializedVariable/UninitializedVariable.html|
This makes little sense to me. I expected the example.namen to produce the empty map by the default definition, then setting the key "jurgen" to "vinju", then assigning the new map into example.namen, then returning the new example value.
Describe the bug
This makes little sense to me. I expected the
example.namen
to produce the empty map by the default definition, then setting the key "jurgen" to "vinju", then assigning the new map intoexample.namen
, then returning the new example value.