From 00e9da91103bec5253b05a7e67bf3d81a0888e43 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Tue, 25 Nov 2014 18:34:25 +0000 Subject: Fix FunctionCall.Resolve() so that when the function is resolved the type becomes availble via ShallowType(). This fixes the ExprTypeChecking.FunctionCallTypeResolved() unit test. --- Source/Core/AbsyExpr.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Source/Core/AbsyExpr.cs') diff --git a/Source/Core/AbsyExpr.cs b/Source/Core/AbsyExpr.cs index c157c50f..646b7182 100644 --- a/Source/Core/AbsyExpr.cs +++ b/Source/Core/AbsyExpr.cs @@ -1836,6 +1836,12 @@ namespace Microsoft.Boogie { if (Func == null) { rc.Error(this.name, "use of undeclared function: {0}", name.Name); } + else { + // We need set the type of this IdentifierExpr so ShallowType() works + Debug.Assert(name.Type == null); + Debug.Assert(Func.OutParams.Count > 0); + name.Type = Func.OutParams[0].TypedIdent.Type; + } } public virtual int ArgumentCount { get { -- cgit v1.2.3