Fixed: const callables still flagged expressions as dynamic

This commit is contained in:
arookas 2016-02-01 06:02:21 -05:00
parent 4aebe57432
commit bb28e47117

View file

@ -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;
}
}