Skip to content

Commit 656ece8

Browse files
committed
Correct check of function parameter patterns and arguments, fixes #762
1 parent b42facd commit 656ece8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/typechecker/src/main/java/org/overture/typechecker/utilities/pattern/AllDefinitionLocator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public List<PDefinition> caseARecordPattern(ARecordPattern pattern,
200200

201201
ARecordInvariantType pattype = af.createPTypeAssistant().getRecord(type, pattern.getLocation().getModule());
202202

203-
if (!af.createPTypeAssistant().isType(question.ptype, pattype.getClass()))
203+
if (!af.getTypeComparator().compatible(pattype, question.ptype))
204204
{
205205
TypeCheckerErrors.report(3201, "Matching expression is not a compatible record type", pattern.getLocation(), pattern);
206206
TypeCheckerErrors.detail2("Pattern type", type, "Expression type", question.ptype);

0 commit comments

Comments
 (0)