コード例 #1
0
            public override FullNamedExpression Resolve(IResolveContext rc)
            {
                if (resolved != null || value == null)
                {
                    return(resolved);
                }

                resolved = value.GetTypeExpression().ResolveAsTypeStep(rc, false);
                if (resolved == null)
                {
                    value = null;
                    return(null);
                }

                TypeExpr te = resolved as TypeExpr;

                if (te != null)
                {
                    if (!te.CheckAccessLevel(rc.DeclContainer))
                    {
                        Report.SymbolRelatedToPreviousError(te.Type);
                        Expression.ErrorIsInaccesible(resolved.Location, resolved.GetSignatureForError());
                    }
                }

                return(resolved);
            }