public virtual void VisitGlobalConstUse(BoundGlobalConst x) { }
public virtual void VisitGlobalConstUse(BoundGlobalConst x) { }
public virtual TResult VisitGlobalConstUse(BoundGlobalConst x) => DefaultVisitOperation(x);
public override void VisitGlobalConstUse(BoundGlobalConst x) { // TODO: check constant name // bind to app-wide constant if possible var constant = (FieldSymbol)_model.ResolveConstant(x.Name); if (!BindConstantValue(x, constant)) { if (constant != null && constant.IsStatic && constant.IsReadOnly) { x._boundExpressionOpt = new BoundFieldPlace(null, constant, x); x.TypeRefMask = constant.GetResultType(TypeCtx); } else { x.TypeRefMask = TypeRefMask.AnyType; // only scalars ? } } }