Skip to content

Commit

Permalink
fix validation
Browse files Browse the repository at this point in the history
  • Loading branch information
melaasar committed Aug 7, 2024
1 parent 1f05cf7 commit 610b38e
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -753,11 +753,7 @@ boolean validateScalarEquivalenceAxioms(ScalarEquivalenceAxiom object, Diagnosti
*/
boolean validateTypePredicateAsConsequent(TypePredicate object, DiagnosticChain diagnostics, Map<Object, Object> context) {
if (object.getConsequentRule() != null) {
if (object.getType() instanceof Entity) {
return report(Diagnostic.ERROR, diagnostics, object,
"Entity "+object.getType().getAbbreviatedIri()+" cannot be used as a consequent predicate",
OmlPackage.Literals.TYPE_PREDICATE__TYPE);
} else if (object.getType() instanceof Scalar) {
if (object.getType() instanceof Scalar) {
return report(Diagnostic.ERROR, diagnostics, object,
"Scalar "+object.getType().getAbbreviatedIri()+" cannot be used as a consequent predicate",
OmlPackage.Literals.TYPE_PREDICATE__TYPE);
Expand Down

0 comments on commit 610b38e

Please sign in to comment.