- String[] fieldNames = ((SCLConstructor)constructorValue.getValue()).recordFieldNames;
- if(fieldNames == null) {
- context.getErrorLog().log(constructor.location, "Value " + constructor.name + " is not a record constructor.");
- return new EError(constructor.location);
- }
- Expression[] parameters = translateFieldsToFunctionParameters(context, fields, fieldNames, false);
+ Expression[] parameters = translateFieldsToFunctionParameters(context, fields, parameterNames, false);