diff options
author | Dan Liew <daniel.liew@imperial.ac.uk> | 2014-11-25 16:28:05 +0000 |
---|---|---|
committer | Dan Liew <daniel.liew@imperial.ac.uk> | 2014-11-25 16:28:05 +0000 |
commit | 072b57b44df4fd1d512cca59fa678c4f16671e31 (patch) | |
tree | bc00fe78d9bd92024de47a0172e23f16fe06c5fd /Source/Core/AbsyExpr.cs | |
parent | ffbb6393d647d6879c1c9edcc6c36f796906bac5 (diff) |
Fix bug in FunctionCall that caused the ExprTypeChecking.FunctionCall()
unit test to fail.
The issue was that one of FunctionCall constructors created a new IdentifierExpr
without associating a type with it. To fix this we now set the type of
the IdentifierExpr to the return type of the Function passed into the
constructor.
Diffstat (limited to 'Source/Core/AbsyExpr.cs')
-rw-r--r-- | Source/Core/AbsyExpr.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/Core/AbsyExpr.cs b/Source/Core/AbsyExpr.cs index 4c590ddb..c157c50f 100644 --- a/Source/Core/AbsyExpr.cs +++ b/Source/Core/AbsyExpr.cs @@ -1770,6 +1770,10 @@ namespace Microsoft.Boogie { Contract.Requires(f != null);
this.Func = f;
this.name = new IdentifierExpr(Token.NoToken, f.Name);
+
+ // We need set the type of this IdentifierExpr so ShallowType() works
+ Debug.Assert(f.OutParams.Count > 0);
+ this.name.Type = f.OutParams[0].TypedIdent.Type;
}
public string/*!*/ FunctionName {
get {
|