function argument compiler error when . is included

This commit is contained in:
2024-02-17 09:26:37 -07:00
parent fe61d3edeb
commit 8ff1961ee0

View File

@@ -229,10 +229,10 @@ class Helpers {
{ {
// These could use varName() and explicitType() but so far there are no &meta annotations for function arguments // These could use varName() and explicitType() but so far there are no &meta annotations for function arguments
name: switch (funcArg.def) { name: switch (funcArg.def) {
case Symbol(name) | TypedExp(_, {pos: _, def: Symbol(name)}): case Symbol(name) | TypedExp(_, {pos: _, def: Symbol(name)}) if (!name.contains(".")):
name; name;
default: default:
throw KissError.fromExp(funcArg, 'function argument should be a symbol or typed symbol'); throw KissError.fromExp(funcArg, 'function argument should be a plain symbol or typed symbol');
}, },
type: switch (funcArg.def) { type: switch (funcArg.def) {
case TypedExp(type, _): case TypedExp(type, _):