Binder\Binder_Symbols.cs (9)
341return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(GetContainingNamespaceOrNonExtensionType(symbol.Symbol), symbol.Symbol, LookupResultKind.NotATypeOrNamespace, diagnosticInfo));
467return TypeWithAnnotations.Create(
592return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(left, LookupResultKind.NotATypeOrNamespace, diagnostics.Add(ErrorCode.ERR_ColColWithTypeAlias, node.Alias.Location, node.Alias.Identifier.Text)));
609return TypeWithAnnotations.Create(new PointerTypeSymbol(elementType));
615return TypeWithAnnotations.Create(CreateErrorType());
842return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(qualifierOpt ?? this.Compilation.Assembly.GlobalNamespace, string.Empty, arity: 0, errorInfo: null));
868return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(
876return TypeWithAnnotations.Create(errorResult);
1371? TypeWithAnnotations.Create(UnboundArgumentErrorTypeSymbol.Instance)
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (5)
105return TypeWithAnnotations.Create(expr.GetTypeOrFunctionType());
483_fixedResults[i] = (TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(_constructedContainingTypeOfMethod, _methodTypeParameters[i].Name, 0, null, false)), false);
570static (typeParameter, i, self) => self.IsUnfixed(i) ? TypeWithAnnotations.Create(typeParameter) : self._fixedResults[i].Type,
2995best = TypeWithAnnotations.Create(resultType, best.NullableAnnotation);
3462var newBound = TypeWithAnnotations.Create(oldBound.Type, newAnnotation);
Compilation\CSharpCompilation.cs (7)
2404return ArrayTypeSymbol.CreateCSharpArray(this.Assembly, TypeWithAnnotations.Create(elementType, elementNullableAnnotation), rank);
2417return new PointerTypeSymbol(TypeWithAnnotations.Create(elementType, elementNullableAnnotation));
4140var returnTypeWithAnnotations = TypeWithAnnotations.Create(returnType.EnsureCSharpSymbolOrNull(nameof(returnType)), returnType.NullableAnnotation.ToInternalAnnotation());
4142type => TypeWithAnnotations.Create(type.EnsureCSharpSymbolOrNull(nameof(parameterTypes)), type.NullableAnnotation.ToInternalAnnotation()));
4196typesBuilder.Add(TypeWithAnnotations.Create(elementType, annotation));
4234(t, a) => TypeWithAnnotations.Create(t.Type, a.ToInternalAnnotation())));
4264fields.Add(new AnonymousTypeField(name, location, TypeWithAnnotations.Create(type, nullableAnnotation), RefKind.None, ScopedKind.None));
FlowAnalysis\NullableWalker.cs (39)
129LValueType = TypeWithAnnotations.Create(type, annotation);
2887typeWithAnnotations = TypeWithAnnotations.Create(typeWithAnnotations.Type, nullableAnnotation);
3194type = TypeWithAnnotations.Create(node.Type, type.NullableAnnotation);
3874var resultType = TypeWithAnnotations.Create(node.Type);
4684return GetOrCreatePlaceholderSlot(node, TypeWithAnnotations.Create(node.Type, NullableAnnotation.NotAnnotated));
4839: TypeWithAnnotations.Create(bestType);
4955var bestTypeWithObliviousAnnotation = TypeWithAnnotations.Create(bestType);
4967inferredType = TypeWithAnnotations.Create(bestType, BestTypeInferrer.GetNullableAnnotation(resultTypes));
5018result = TypeWithAnnotations.Create(type);
5045type = TypeWithAnnotations.Create(((NamedTypeSymbol)node.Type).OriginalDefinition.Construct(ImmutableArray.Create(type)));
5270SetResult(binary, TypeWithState.ForType(binary.Type), TypeWithAnnotations.Create(binary.Type));
5345TypeWithAnnotations.Create(expr.Type),
5451targetTypeWithNullability = TypeWithAnnotations.Create(MakeNullableOf(targetTypeWithNullability));
5842targetType = TypeWithAnnotations.Create(node.Type, NullableAnnotation.NotAnnotated);
5933TypeWithAnnotations.Create(rightType),
5971TypeWithAnnotations targetType = fromExplicitCast ? explicitType : TypeWithAnnotations.Create(boundConversion.Type);
6187var refResultTypeWithAnnotations = TypeWithAnnotations.Create(refResultType, lValueAnnotation);
6196SetResult(node, TypeWithState.Create(refResultType, rValueState), TypeWithAnnotations.Create(refResultType, lValueAnnotation));
6268resultTypeWithAnnotations = TypeWithAnnotations.Create(resultType);
7521completion(TypeWithAnnotations.Create(argument.Type));
8343return TypeWithAnnotations.Create(expr.GetTypeOrFunctionType(), GetNullableAnnotation(expr));
8764TypeWithAnnotations targetType = fromExplicitCast ? explicitType : TypeWithAnnotations.Create(node.Type);
9857TypeWithAnnotations.Create(conversion.BestUserDefinedConversionAnalysis!.FromType),
9928TypeWithAnnotations.Create(conversion.BestUserDefinedConversionAnalysis!.ToType),
10225var argTypeWithAnnotations = TypeWithAnnotations.Create(argType, NullableAnnotation.NotAnnotated);
10424var lvalueResult = TypeWithAnnotations.Create(node.Type, NullableAnnotation.NotAnnotated);
11036targetTypeOfOperandConversion = TypeWithAnnotations.Create(MakeNullableOf(targetTypeOfOperandConversion));
11621targetTypeWithAnnotations = TypeWithAnnotations.Create(collectionExpression.Type);
11628targetTypeWithAnnotations = TypeWithAnnotations.Create(ForEachLoopBinder.GetIEnumerableOfT(resultType, isAsync, compilation, ref discardedUseSiteInfo, out bool foundMultiple, needSupportForRefStructInterfaces: out _));
11679TypeWithAnnotations.Create(enumeratorInfoOpt.ElementType, NullableAnnotation.NotAnnotated).ToTypeWithState();
11887var type = TypeWithAnnotations.Create(node.Type);
12027var type = TypeWithAnnotations.Create(node.Type);
12035var type = TypeWithAnnotations.Create(node.Type);
12057var type = TypeWithAnnotations.Create(node.Type, node.NullableAnnotation);
12450var result = TypeWithAnnotations.Create(node.Type);
12470var result = TypeWithAnnotations.Create(node.Type, NullableAnnotation.Oblivious);
12576var result = TypeWithAnnotations.Create(node.Type, NullableAnnotation.Oblivious);
12747var result = TypeWithAnnotations.Create(node.Type, node.IsInferred ? NullableAnnotation.Annotated : node.NullableAnnotation);
12844var typeWithAnnotations = TypeWithAnnotations.Create(node.Type, node.NullableAnnotation);
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (5)
187var pendingExceptionLocal = new SynthesizedLocal(_F.CurrentFunction, TypeWithAnnotations.Create(exceptionType), SynthesizedLocalKind.TryAwaitPendingException, tryStatementSyntax);
189var pendingBranchVar = new SynthesizedLocal(_F.CurrentFunction, TypeWithAnnotations.Create(_F.SpecialType(SpecialType.System_Int32)), SynthesizedLocalKind.TryAwaitPendingBranch, tryStatementSyntax);
1008this.returnValue = returnValue = new SynthesizedLocal(containingMethod, TypeWithAnnotations.Create(valueOpt.Type), SynthesizedLocalKind.AsyncMethodReturnValue, _syntaxOpt);
1044this.pendingCaughtException = new SynthesizedLocal(F.CurrentFunction, TypeWithAnnotations.Create(F.SpecialType(SpecialType.System_Object)), SynthesizedLocalKind.TryAwaitPendingCaughtException, tryStatementSyntax);
1045this.pendingCatch = new SynthesizedLocal(F.CurrentFunction, TypeWithAnnotations.Create(F.SpecialType(SpecialType.System_Int32)), SynthesizedLocalKind.TryAwaitPendingCatch, tryStatementSyntax);
Lowering\SyntheticBoundNodeFactory.cs (7)
181var result = new StateMachineFieldSymbol(CurrentType, TypeWithAnnotations.Create(type), name, isPublic, isThis);
189var result = new StateMachineFieldSymbolForRegularParameter(CurrentType, TypeWithAnnotations.Create(type), name, parameter, isPublic);
608return new SynthesizedLocal(CurrentFunction, TypeWithAnnotations.Create(type), kind, syntax, isPinned,
628TypeWithAnnotations.Create(type),
639return SynthesizedParameterSymbol.Create(container, TypeWithAnnotations.Create(type), ordinal, RefKind.None, name);
1700TypeWithAnnotations.Create(type),
1739temp = new SynthesizedLocal(this.CurrentFunction, TypeWithAnnotations.Create(node.Type), SynthesizedLocalKind.LoweringTemp);
Symbols\Source\SourceDelegateMethodSymbol.cs (5)
60var voidType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_Void, diagnostics, syntax));
62var objectType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_Object, diagnostics, syntax));
63var intPtrType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_IntPtr, diagnostics, syntax));
85var iAsyncResultType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_IAsyncResult, diagnostics, syntax));
86var asyncCallbackType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_AsyncCallback, diagnostics, syntax));
Symbols\Source\SourceMemberContainerSymbol.cs (13)
4915TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Void)),
4954TypeWithAnnotations.Create(this),
4963TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Void)),
5007TypeWithAnnotations.Create(compilation.GetWellKnownType(WellKnownType.System_Text_StringBuilder)),
5015returnType: TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Boolean)),
5070returnType: TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_String)),
5244TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Int32)),
5273TypeWithAnnotations.Create(compilation.GetWellKnownType(WellKnownType.System_Type)),
5334TypeWithAnnotations.Create(this),
5343TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Boolean)),
5906builder.AddValue(TypeWithAnnotations.Create(baseType));
5910builder.AddValue(TypeWithAnnotations.Create(@interface));
5970AddSynthesizedAttribute(ref attributes, moduleBuilder.SynthesizeNullableAttributeIfNecessary(this, nullableContextValue, TypeWithAnnotations.Create(baseType)));
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (5)
44return new ScriptEntryPoint(containingType, TypeWithAnnotations.Create(systemVoid));
394public override TypeWithAnnotations ReturnTypeWithAnnotations => TypeWithAnnotations.Create(_getAwaiterGetResultCall.Type);
486new SynthesizedLocal(this, TypeWithAnnotations.Create(_containingType), SynthesizedLocalKind.LoweringTemp),
543TypeWithAnnotations.Create(submissionArrayType), 0, RefKind.None, "submissionArray"));
578new SynthesizedLocal(this, TypeWithAnnotations.Create(_containingType), SynthesizedLocalKind.LoweringTemp),
Symbols\TypeWithAnnotations.cs (8)
82return Create(typeSymbol, nullableAnnotation: isAnnotated ? NullableAnnotation.Annotated : isNullableEnabled ? NullableAnnotation.NotAnnotated : NullableAnnotation.Oblivious);
115return Create(Type, NullableAnnotation.Annotated, CustomModifiers);
125return Create(Type, NullableAnnotation.NotAnnotated, CustomModifiers);
223=> Create(compilation.GetSpecialType(SpecialType.System_Nullable_T).Construct(ImmutableArray.Create(typeSymbol)));
247return Create(type, nullableAnnotation, CustomModifiers);
465return Create(newTypeWithModifiers.Type, NullableAnnotation, newCustomModifiers);
1122return TypeWithAnnotations.Create(resolvedType, type.NullableAnnotation, customModifiers: customModifiers);
1132return TypeWithAnnotations.Create(typeSymbol, type.NullableAnnotation, customModifiers: customModifiers);