Skip to content

Commit

Permalink
Merge 837ff31 into 56d053e
Browse files Browse the repository at this point in the history
  • Loading branch information
fdodino committed Aug 11, 2018
2 parents 56d053e + 837ff31 commit e32581d
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -425,14 +425,15 @@ class WMethodContainerExtensions extends WollokModelExtensions {
nrOfArgs == parameters.size
}

// all calls to 'this' are valid in mixins
// def static dispatch boolean isValidCall(WMixin it, WMemberFeatureCall call) { true }
def static boolean isValidCall(WMethodContainer c, WMemberFeatureCall call) {
c.matchesProperty(call.feature, call.memberCallArguments.size)
c.matchesPropertiesInHierarchy(call.feature, call.memberCallArguments.size)
|| c.allMethods.exists[isValidMessage(call)]
|| (c.parent !== null && !c.hasCyclicHierarchy && c.parent.isValidCall(call))
}

def static boolean matchesPropertiesInHierarchy(WMethodContainer it, String propertyName, int parametersSize) {
matchesProperty(propertyName, parametersSize) || (parent !== null && !hasCyclicHierarchy && parent.matchesPropertiesInHierarchy(propertyName, parametersSize))
}

// ************************************************************************
// ** Basic methods
// ************************************************************************
Expand Down

0 comments on commit e32581d

Please sign in to comment.