From bb28e4711754e569d5f7193006311a746e3aa4ad Mon Sep 17 00:00:00 2001 From: arookas Date: Mon, 1 Feb 2016 06:02:21 -0500 Subject: [PATCH] Fixed: const callables still flagged expressions as dynamic --- ssc/ast/nodes.functions.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ssc/ast/nodes.functions.cs b/ssc/ast/nodes.functions.cs index b56c535..d0994e0 100644 --- a/ssc/ast/nodes.functions.cs +++ b/ssc/ast/nodes.functions.cs @@ -59,7 +59,12 @@ namespace arookas { } sunExpressionFlags sunTerm.GetExpressionFlags(sunContext context) { - return sunExpressionFlags.Calls | sunExpressionFlags.Dynamic; + var symbol = context.MustResolveCallable(this); + var flags = sunExpressionFlags.Calls; + if ((symbol.Modifiers & sunSymbolModifiers.Constant) == 0) { + flags |= sunExpressionFlags.Dynamic; + } + return flags; } }