X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Felaboration%2Fexpressions%2FERecord.java;h=a41c0f042d46034e782ec06b78888bfe146cf7c9;hb=527940f032d9dd8ebd4c7bd202356115f1715120;hp=6ef9e9e72b4f69ef878e244484edc97880219cf1;hpb=655590362c7017aff657d1ff30e6c63f03b6dd75;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ERecord.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ERecord.java index 6ef9e9e72..a41c0f042 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ERecord.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ERecord.java @@ -54,11 +54,14 @@ public class ERecord extends ASTExpression { THashMap recordMap = new THashMap(fields.length); for(FieldAssignment field : fields) { if(field.value == null) { + String actualName = field.name; + if(actualName.charAt(0) == '?') + actualName = actualName.substring(1); String bestMatch = null; int bestMatchLength = 0; for(int i=0;i bestMatchLength) { + if(actualName.startsWith(fieldName) && fieldName.length() > bestMatchLength) { bestMatch = fieldName; bestMatchLength = fieldName.length(); }