Skip to content

Commit a41d44b

Browse files
authored
WI #1990 Fix type comparison in procedure call checker (#1993)
1 parent 1a29d24 commit a41d44b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

TypeCobol/Compiler/Diagnostics/TypeCobolChecker.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,8 @@ private static void Check(Node node, [NotNull] FunctionCall call, [NotNull] IPro
377377
TypeDefinition calleeType = expected.TypeDefinition;
378378
if (callerType != null && calleeType != null)
379379
{
380-
//Compare references of TypeDefinition
381-
if (callerType != calleeType)
380+
//Compare TypeDefinitions
381+
if (!callerType.Equals(calleeType))
382382
{
383383
var m = string.Format(
384384
"Function '{0}' expected parameter '{1}' of type {2} and received '{3}' of type {4} ",

0 commit comments

Comments
 (0)