Skip to content

Commit 6c3bdb8

Browse files
committed
Issue #5 - Simplified superInvocationExpressionOperation check.
- Now that overloading is implemented, only need to check that referent is non-null.
1 parent b8da0ad commit 6c3bdb8

File tree

2 files changed

+3
-27
lines changed

2 files changed

+3
-27
lines changed

org.modeldriven.alf/src/org/modeldriven/alf/execution/AlfBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
public abstract class AlfBase {
2626

27-
public static final String ALF_VERSION = "0.6.0e";
27+
public static final String ALF_VERSION = "0.6.0f";
2828

2929
protected boolean isVerbose = false;
3030

org.modeldriven.alf/src/org/modeldriven/alf/syntax/expressions/impl/SuperInvocationExpressionImpl.java

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
/*******************************************************************************
3-
* Copyright 2011, 2012 Data Access Technologies, Inc. (Model Driven Solutions)
3+
* Copyright 2011-2016 Data Access Technologies, Inc. (Model Driven Solutions)
44
* All rights reserved worldwide. This program and the accompanying materials
55
* are made available for use under the terms of the GNU General Public License
66
* (GPL) version 3 that accompanies this distribution and is available at
@@ -237,31 +237,7 @@ public boolean superInvocationExpressionDestructorCall() {
237237
* resolution rules.
238238
**/
239239
public boolean superInvocationExpressionOperation() {
240-
// return this.getSelf().getReferent() != null;
241-
SuperInvocationExpression self = this.getSelf();
242-
if (self.getReferent() == null) {
243-
return false;
244-
} else {
245-
// TODO: Remove this check once overloading resolution is implemented.
246-
Tuple tuple = self.getTuple();
247-
if (tuple == null ||
248-
tuple.getImpl().size() > this.parameterCount()) {
249-
return false;
250-
} else {
251-
this.getAssignmentAfterMap(); // Force computation of assignments.
252-
for (NamedExpression input: tuple.getInput()) {
253-
if (!this.parameterIsAssignableFrom(input)) {
254-
return false;
255-
}
256-
}
257-
for (NamedExpression output: tuple.getOutput()) {
258-
if (!this.parameterIsAssignableTo(output)) {
259-
return false;
260-
}
261-
}
262-
}
263-
return true;
264-
}
240+
return this.getSelf().getReferent() != null;
265241
}
266242

267243
/*

0 commit comments

Comments
 (0)