diff options
author | Dan Liew <daniel.liew@imperial.ac.uk> | 2014-11-25 18:34:25 +0000 |
---|---|---|
committer | Dan Liew <daniel.liew@imperial.ac.uk> | 2014-11-25 18:34:25 +0000 |
commit | 00e9da91103bec5253b05a7e67bf3d81a0888e43 (patch) | |
tree | 6be6c72d4de88c057ef7a5b52e8349b2d478f4b1 /Source/Core/AbsyExpr.cs | |
parent | 177aad9ff997f38056d2dc352c73b531e5822e22 (diff) |
Fix FunctionCall.Resolve() so that when the function is resolved the type becomes availble via ShallowType().
This fixes the ExprTypeChecking.FunctionCallTypeResolved() unit test.
Diffstat (limited to 'Source/Core/AbsyExpr.cs')
-rw-r--r-- | Source/Core/AbsyExpr.cs | 6 |
1 files changed, 6 insertions, 0 deletions
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 {
|