Skip to content

Commit d24ef45

Browse files
authored
Merge pull request #658 from Systems-Modeling/ST6RI-847
ST6RI-847 TypeUtil.isCompatibleWith does not match specification
2 parents 52e0a52 + 05c3fc2 commit d24ef45

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

org.omg.sysml/src/org/omg/sysml/util/TypeUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public static boolean isCompatible(Type subtype, Type supertype) {
185185
if (specializes(subtype, supertype)) {
186186
return true;
187187
} else if (subtype instanceof Feature && supertype instanceof Feature &&
188-
(subtype.getOwnedFeature().isEmpty() || supertype.getOwnedFeature().isEmpty())) {
188+
subtype.getOwnedFeature().isEmpty() && supertype.getOwnedFeature().isEmpty()) {
189189
Set<Feature> subtypeRedefined = FeatureUtil.getAllRedefinedFeaturesOf((Feature)subtype);
190190
Set<Feature> supertypeRedefined = FeatureUtil.getAllRedefinedFeaturesOf((Feature)supertype);
191191
if (subtypeRedefined.stream().anyMatch(supertypeRedefined::contains)) {

0 commit comments

Comments
 (0)