Skip to content

Commit 05c3fc2

Browse files
committed
ST6RI-847 Corrected the TypeUtil.isCompatible method.
1 parent 2bb8ed2 commit 05c3fc2

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)