Binder\Binder_Symbols.cs (9)
339return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(GetContainingNamespaceOrType(symbol.Symbol), symbol.Symbol, LookupResultKind.NotATypeOrNamespace, diagnosticInfo));
457return TypeWithAnnotations.Create(
582return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(left, LookupResultKind.NotATypeOrNamespace, diagnostics.Add(ErrorCode.ERR_ColColWithTypeAlias, node.Alias.Location, node.Alias.Identifier.Text)));
599return TypeWithAnnotations.Create(new PointerTypeSymbol(elementType));
605return TypeWithAnnotations.Create(CreateErrorType());
832return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(qualifierOpt ?? this.Compilation.Assembly.GlobalNamespace, string.Empty, arity: 0, errorInfo: null));
858return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(
866return TypeWithAnnotations.Create(errorResult);
1361? TypeWithAnnotations.Create(UnboundArgumentErrorTypeSymbol.Instance)
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (5)
104return TypeWithAnnotations.Create(expr.GetTypeOrFunctionType());
466_fixedResults[i] = (TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(_constructedContainingTypeOfMethod, _methodTypeParameters[i].Name, 0, null, false)), false);
543static (typeParameter, i, self) => self.IsUnfixed(i) ? TypeWithAnnotations.Create(typeParameter) : self._fixedResults[i].Type,
2770best = TypeWithAnnotations.Create(resultType, best.NullableAnnotation);
3180var newBound = TypeWithAnnotations.Create(oldBound.Type, newAnnotation);
Compilation\CSharpCompilation.cs (7)
2202return ArrayTypeSymbol.CreateCSharpArray(this.Assembly, TypeWithAnnotations.Create(elementType, elementNullableAnnotation), rank);
2215return new PointerTypeSymbol(TypeWithAnnotations.Create(elementType, elementNullableAnnotation));
3778var returnTypeWithAnnotations = TypeWithAnnotations.Create(returnType.EnsureCSharpSymbolOrNull(nameof(returnType)), returnType.NullableAnnotation.ToInternalAnnotation());
3780type => TypeWithAnnotations.Create(type.EnsureCSharpSymbolOrNull(nameof(parameterTypes)), type.NullableAnnotation.ToInternalAnnotation()));
3834typesBuilder.Add(TypeWithAnnotations.Create(elementType, annotation));
3872(t, a) => TypeWithAnnotations.Create(t.Type, a.ToInternalAnnotation())));
3902fields.Add(new AnonymousTypeField(name, location, TypeWithAnnotations.Create(type, nullableAnnotation), RefKind.None, ScopedKind.None));
FlowAnalysis\NullableWalker.cs (35)
114LValueType = TypeWithAnnotations.Create(type, annotation);
2958type = TypeWithAnnotations.Create(node.Type, type.NullableAnnotation);
4061return GetOrCreatePlaceholderSlot(node, TypeWithAnnotations.Create(node.Type, NullableAnnotation.NotAnnotated));
4216: TypeWithAnnotations.Create(bestType);
4334var bestTypeWithObliviousAnnotation = TypeWithAnnotations.Create(bestType);
4346inferredType = TypeWithAnnotations.Create(bestType, BestTypeInferrer.GetNullableAnnotation(resultTypes));
4397result = TypeWithAnnotations.Create(type);
4626SetResult(binary, TypeWithState.ForType(binary.Type), TypeWithAnnotations.Create(binary.Type));
4676targetTypeWithNullability = TypeWithAnnotations.Create(MakeNullableOf(targetTypeWithNullability));
4717TypeWithAnnotations.Create(expr.Type),
5110targetType = TypeWithAnnotations.Create(node.Type, NullableAnnotation.NotAnnotated);
5198TypeWithAnnotations.Create(rightType),
5236TypeWithAnnotations targetType = fromExplicitCast ? explicitType : TypeWithAnnotations.Create(boundConversion.Type);
5447SetResult(node, TypeWithState.Create(refResultType, rValueState), TypeWithAnnotations.Create(refResultType, lValueAnnotation));
5507resultTypeWithAnnotations = TypeWithAnnotations.Create(resultType);
7081return TypeWithAnnotations.Create(expr.GetTypeOrFunctionType(), GetNullableAnnotation(expr));
7429TypeWithAnnotations targetType = fromExplicitCast ? explicitType : TypeWithAnnotations.Create(node.Type);
8468TypeWithAnnotations.Create(conversion.BestUserDefinedConversionAnalysis!.FromType),
8539TypeWithAnnotations.Create(conversion.BestUserDefinedConversionAnalysis!.ToType),
8611TypeWithAnnotations.Create(newType, visitResult.LValueType.NullableAnnotation));
8833var argTypeWithAnnotations = TypeWithAnnotations.Create(argType, NullableAnnotation.NotAnnotated);
9020var lvalueResult = TypeWithAnnotations.Create(node.Type, NullableAnnotation.NotAnnotated);
9649TypeWithAnnotations.Create(node.Operator.LeftType),
10030targetTypeWithAnnotations = TypeWithAnnotations.Create(node.Expression.Type);
10037targetTypeWithAnnotations = TypeWithAnnotations.Create(ForEachLoopBinder.GetIEnumerableOfT(resultType, isAsync, compilation, ref discardedUseSiteInfo, out bool foundMultiple));
10088TypeWithAnnotations.Create(node.EnumeratorInfoOpt.ElementType, NullableAnnotation.NotAnnotated).ToTypeWithState();
10277var type = TypeWithAnnotations.Create(node.Type);
10378var type = TypeWithAnnotations.Create(node.Type);
10386var type = TypeWithAnnotations.Create(node.Type);
10408var type = TypeWithAnnotations.Create(node.Type, node.NullableAnnotation);
10738var result = TypeWithAnnotations.Create(node.Type);
10758var result = TypeWithAnnotations.Create(node.Type, NullableAnnotation.Oblivious);
10864var result = TypeWithAnnotations.Create(node.Type, NullableAnnotation.Oblivious);
11035var result = TypeWithAnnotations.Create(node.Type, node.IsInferred ? NullableAnnotation.Annotated : node.NullableAnnotation);
11132var typeWithAnnotations = TypeWithAnnotations.Create(node.Type, node.NullableAnnotation);
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (5)
175var pendingExceptionLocal = new SynthesizedLocal(_F.CurrentFunction, TypeWithAnnotations.Create(exceptionType), SynthesizedLocalKind.TryAwaitPendingException, tryStatementSyntax);
177var pendingBranchVar = new SynthesizedLocal(_F.CurrentFunction, TypeWithAnnotations.Create(_F.SpecialType(SpecialType.System_Int32)), SynthesizedLocalKind.TryAwaitPendingBranch, tryStatementSyntax);
975this.returnValue = returnValue = new SynthesizedLocal(containingMethod, TypeWithAnnotations.Create(valueOpt.Type), SynthesizedLocalKind.AsyncMethodReturnValue, _syntaxOpt);
1009this.pendingCaughtException = new SynthesizedLocal(F.CurrentFunction, TypeWithAnnotations.Create(F.SpecialType(SpecialType.System_Object)), SynthesizedLocalKind.TryAwaitPendingCaughtException, tryStatementSyntax);
1010this.pendingCatch = new SynthesizedLocal(F.CurrentFunction, TypeWithAnnotations.Create(F.SpecialType(SpecialType.System_Int32)), SynthesizedLocalKind.TryAwaitPendingCatch, tryStatementSyntax);
Lowering\SyntheticBoundNodeFactory.cs (7)
118typeArgs: typeArgs.IsDefault ? default(ImmutableArray<TypeWithAnnotations>) : typeArgs.SelectAsArray(t => TypeWithAnnotations.Create(t)),
228var result = new StateMachineFieldSymbol(CurrentType, TypeWithAnnotations.Create(type), name, isPublic, isThis);
563return new SynthesizedLocal(CurrentFunction, TypeWithAnnotations.Create(type), kind, syntax, isPinned,
583TypeWithAnnotations.Create(type),
594return SynthesizedParameterSymbol.Create(container, TypeWithAnnotations.Create(type), ordinal, RefKind.None, name);
1558TypeWithAnnotations.Create(type),
1597temp = new SynthesizedLocal(this.CurrentFunction, TypeWithAnnotations.Create(node.Type), SynthesizedLocalKind.LoweringTemp);
Symbols\Source\SourceDelegateMethodSymbol.cs (5)
56var voidType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_Void, diagnostics, syntax));
58var objectType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_Object, diagnostics, syntax));
59var intPtrType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_IntPtr, diagnostics, syntax));
81var iAsyncResultType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_IAsyncResult, diagnostics, syntax));
82var asyncCallbackType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_AsyncCallback, diagnostics, syntax));
Symbols\Source\SourceMemberContainerSymbol.cs (13)
4035TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Void)),
4074TypeWithAnnotations.Create(this),
4082TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Void)),
4122TypeWithAnnotations.Create(compilation.GetWellKnownType(WellKnownType.System_Text_StringBuilder)),
4129returnType: TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Boolean)),
4184returnType: TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_String)),
4358TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Int32)),
4387TypeWithAnnotations.Create(compilation.GetWellKnownType(WellKnownType.System_Type)),
4448TypeWithAnnotations.Create(this),
4456TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Boolean)),
5017builder.AddValue(TypeWithAnnotations.Create(baseType));
5021builder.AddValue(TypeWithAnnotations.Create(@interface));
5081AddSynthesizedAttribute(ref attributes, moduleBuilder.SynthesizeNullableAttributeIfNecessary(this, nullableContextValue, TypeWithAnnotations.Create(baseType)));
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (5)
44return new ScriptEntryPoint(containingType, TypeWithAnnotations.Create(systemVoid));
379public override TypeWithAnnotations ReturnTypeWithAnnotations => TypeWithAnnotations.Create(_getAwaiterGetResultCall.Type);
471new SynthesizedLocal(this, TypeWithAnnotations.Create(_containingType), SynthesizedLocalKind.LoweringTemp),
528TypeWithAnnotations.Create(submissionArrayType), 0, RefKind.None, "submissionArray"));
563new SynthesizedLocal(this, TypeWithAnnotations.Create(_containingType), SynthesizedLocalKind.LoweringTemp),
Symbols\TypeWithAnnotations.cs (8)
79return Create(typeSymbol, nullableAnnotation: isAnnotated ? NullableAnnotation.Annotated : isNullableEnabled ? NullableAnnotation.NotAnnotated : NullableAnnotation.Oblivious);
112return Create(Type, NullableAnnotation.Annotated, CustomModifiers);
122return Create(Type, NullableAnnotation.NotAnnotated, CustomModifiers);
215=> Create(compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(ImmutableArray.Create(typeSymbol)));
239return Create(type, nullableAnnotation, CustomModifiers);
454return Create(newTypeWithModifiers.Type, NullableAnnotation, newCustomModifiers);
987return TypeWithAnnotations.Create(resolvedType, type.NullableAnnotation, customModifiers: customModifiers);
997return TypeWithAnnotations.Create(typeSymbol, type.NullableAnnotation, customModifiers: customModifiers);