Skip to content

Commit

Permalink
Fixed unions as an input to a function
Browse files Browse the repository at this point in the history
  • Loading branch information
TheUnlocked committed Sep 27, 2018
1 parent 1e8fe1d commit 5ba35b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion FAILang/Types/Unevaluated/FunctionExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public IType Evaluate(Dictionary<string, IType> lookups)
args.Add(arg);
}
}
if (args.Any(x => x is IUnevaluated))
if (args.Any(x => x is IUnevaluated && !(x is Union)))
return new BakedExpression(new FunctionExpression(func, args.Select(x => (x, false)).ToArray()), lookups);
return f.Evaluate(args.ToArray());
}
Expand Down

0 comments on commit 5ba35b5

Please sign in to comment.