compiler error when . is in object field name

This commit is contained in:
2024-02-17 09:09:55 -07:00
parent 75b17384dc
commit 597e242135

View File

@@ -99,7 +99,7 @@ class SpecialForms {
{ {
quotes: Unquoted, quotes: Unquoted,
field: switch (pair[0].def) { field: switch (pair[0].def) {
case Symbol(name): name; case Symbol(name) if (!name.contains(".")): name;
case TypedExp(_, case TypedExp(_,
{pos: _, def: Symbol(_)}): throw KissError.fromExp(pair[0], "type specification on anonymous objects will be ignored"); {pos: _, def: Symbol(_)}): throw KissError.fromExp(pair[0], "type specification on anonymous objects will be ignored");
default: throw KissError.fromExp(pair[0], "first expression in anonymous object field binding should be a plain symbol"); default: throw KissError.fromExp(pair[0], "first expression in anonymous object field binding should be a plain symbol");