コード例 #1
0
        public override object VisitErrorType(ErrorTypeSymbol symbol, StringBuilder builder)
        {
            builder.Append("!:");
            PartVisitor.Instance.Visit(symbol, builder);

            return(null);
        }
コード例 #2
0
            public static ErrorTypeSymbol Retarget(ErrorTypeSymbol type)
            {
                // TODO: if it is a missing symbol error but no longer missing in the target assembly, then we can resolve it here.

                var useSiteDiagnostic = type.GetUseSiteDiagnostic();

                if (useSiteDiagnostic != null)
                {
                    return(type);
                }

                // A retargeted error symbol must trigger an error on use so that a dependent compilation won't
                // improperly succeed. We therefore ensure we have a use-site diagnostic.
                return
                    ((type as ExtendedErrorTypeSymbol)?.AsUnreported() ?? // preserve diagnostic information if possible
                     new ExtendedErrorTypeSymbol(type, type.ResultKind,
                                                 type.ErrorInfo ?? new LanguageDiagnosticInfo(InternalErrorCode.ERR_ErrorInReferencedAssembly, type.ContainingAssembly?.Identity.GetDisplayName() ?? string.Empty), true));
            }
コード例 #3
0
 public virtual TResult VisitErrorType(ErrorTypeSymbol symbol, TArgument argument)
 {
     return(DefaultVisit(symbol, argument));
 }
 public override object VisitErrorType(ErrorTypeSymbol symbol, StringBuilder builder)
 {
     return(VisitNamedType(symbol, builder));
 }
コード例 #5
0
 public ErrorTypeParameterSymbol(ErrorTypeSymbol container, string name, int ordinal)
 {
     _container = container;
     _name = name;
     _ordinal = ordinal;
 }
コード例 #6
0
 public ErrorTypeParameterSymbol(ErrorTypeSymbol container, string name, int ordinal)
 {
     this.container = container;
     this.name = name;
     this.ordinal = ordinal;
 }
コード例 #7
0
 public override Symbol VisitErrorType(ErrorTypeSymbol symbol, RetargetOptions options)
 {
     return(Retarget(symbol));
 }