Skip to content
Snippets Groups Projects
Commit c84b500c authored by Dominique Marcadet's avatar Dominique Marcadet
Browse files

name of enumeration may differ from id of EnumType

parent 71685548
No related branches found
No related tags found
1 merge request!13Resolve "enumeration name may differ"
......@@ -89,15 +89,16 @@ public class EnumerationValidator extends TypeValidator {
new Object[] { ada } ));
res = false;
}
if( ! getName().equals( ada.getType() )) {
diagnostics.add( new BasicDiagnostic(
Diagnostic.ERROR,
RiseClipseValidatorSCL.DIAGNOSTIC_SOURCE,
0,
"[NSD validation] type of DA/BDA \"" + ada.getName() + "\" (line = " + ada.getLineNumber() + ") is not " + getName(),
new Object[] { ada } ));
res = false;
}
// Name may differ
// if( ! getName().equals( ada.getType() )) {
// diagnostics.add( new BasicDiagnostic(
// Diagnostic.ERROR,
// RiseClipseValidatorSCL.DIAGNOSTIC_SOURCE,
// 0,
// "[NSD validation] type of DA/BDA \"" + ada.getName() + "\" (line = " + ada.getLineNumber() + ") is not " + getName(),
// new Object[] { ada } ));
// res = false;
// }
for( Val val : ada.getVal() ) {
res = validateValue( ada, val.getValue(), diagnostics ) && res;
}
......@@ -192,7 +193,8 @@ public class EnumerationValidator extends TypeValidator {
}
}
// TODO: do we have to check that all literals in Enumeration are present as EnumVal ?
// we do not have to check that all literals in Enumeration are present as EnumVal
// See comment in issue #13
return res;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment