Binder\Binder_Symbols.cs (9)
341return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(GetContainingNamespaceOrType(symbol.Symbol), symbol.Symbol, LookupResultKind.NotATypeOrNamespace, diagnosticInfo));
459return TypeWithAnnotations.Create(
584return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(left, LookupResultKind.NotATypeOrNamespace, diagnostics.Add(ErrorCode.ERR_ColColWithTypeAlias, node.Alias.Location, node.Alias.Identifier.Text)));
601return TypeWithAnnotations.Create(new PointerTypeSymbol(elementType));
607return TypeWithAnnotations.Create(CreateErrorType());
834return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(qualifierOpt ?? this.Compilation.Assembly.GlobalNamespace, string.Empty, arity: 0, errorInfo: null));
860return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(
868return TypeWithAnnotations.Create(errorResult);
1363? TypeWithAnnotations.Create(UnboundArgumentErrorTypeSymbol.Instance)
Compilation\CSharpCompilation.cs (5)
2380return ArrayTypeSymbol.CreateCSharpArray(this.Assembly, TypeWithAnnotations.Create(elementType, elementNullableAnnotation), rank);
2393return new PointerTypeSymbol(TypeWithAnnotations.Create(elementType, elementNullableAnnotation));
4072var returnTypeWithAnnotations = TypeWithAnnotations.Create(returnType.EnsureCSharpSymbolOrNull(nameof(returnType)), returnType.NullableAnnotation.ToInternalAnnotation());
4128typesBuilder.Add(TypeWithAnnotations.Create(elementType, annotation));
4196fields.Add(new AnonymousTypeField(name, location, TypeWithAnnotations.Create(type, nullableAnnotation), RefKind.None, ScopedKind.None));
FlowAnalysis\NullableWalker.cs (36)
129LValueType = TypeWithAnnotations.Create(type, annotation);
3036type = TypeWithAnnotations.Create(node.Type, type.NullableAnnotation);
3759var resultType = TypeWithAnnotations.Create(node.Type);
4468return GetOrCreatePlaceholderSlot(node, TypeWithAnnotations.Create(node.Type, NullableAnnotation.NotAnnotated));
4623: TypeWithAnnotations.Create(bestType);
4738var bestTypeWithObliviousAnnotation = TypeWithAnnotations.Create(bestType);
4750inferredType = TypeWithAnnotations.Create(bestType, BestTypeInferrer.GetNullableAnnotation(resultTypes));
4801result = TypeWithAnnotations.Create(type);
4828type = TypeWithAnnotations.Create(((NamedTypeSymbol)node.Type).OriginalDefinition.Construct(ImmutableArray.Create(type)));
5119targetTypeWithNullability = TypeWithAnnotations.Create(MakeNullableOf(targetTypeWithNullability));
5164TypeWithAnnotations.Create(expr.Type),
5568targetType = TypeWithAnnotations.Create(node.Type, NullableAnnotation.NotAnnotated);
5659TypeWithAnnotations.Create(rightType),
5697TypeWithAnnotations targetType = fromExplicitCast ? explicitType : TypeWithAnnotations.Create(boundConversion.Type);
5912var refResultTypeWithAnnotations = TypeWithAnnotations.Create(refResultType, lValueAnnotation);
5921SetResult(node, TypeWithState.Create(refResultType, rValueState), TypeWithAnnotations.Create(refResultType, lValueAnnotation));
5993resultTypeWithAnnotations = TypeWithAnnotations.Create(resultType);
7077completion(TypeWithAnnotations.Create(argument.Type));
7882return TypeWithAnnotations.Create(expr.GetTypeOrFunctionType(), GetNullableAnnotation(expr));
8269TypeWithAnnotations targetType = fromExplicitCast ? explicitType : TypeWithAnnotations.Create(node.Type);
9362TypeWithAnnotations.Create(conversion.BestUserDefinedConversionAnalysis!.FromType),
9433TypeWithAnnotations.Create(conversion.BestUserDefinedConversionAnalysis!.ToType),
9730var argTypeWithAnnotations = TypeWithAnnotations.Create(argType, NullableAnnotation.NotAnnotated);
9917var lvalueResult = TypeWithAnnotations.Create(node.Type, NullableAnnotation.NotAnnotated);
10929targetTypeWithAnnotations = TypeWithAnnotations.Create(collectionExpression.Type);
10936targetTypeWithAnnotations = TypeWithAnnotations.Create(ForEachLoopBinder.GetIEnumerableOfT(resultType, isAsync, compilation, ref discardedUseSiteInfo, out bool foundMultiple, needSupportForRefStructInterfaces: out _));
10987TypeWithAnnotations.Create(enumeratorInfoOpt.ElementType, NullableAnnotation.NotAnnotated).ToTypeWithState();
11195var type = TypeWithAnnotations.Create(node.Type);
11296var type = TypeWithAnnotations.Create(node.Type);
11304var type = TypeWithAnnotations.Create(node.Type);
11326var type = TypeWithAnnotations.Create(node.Type, node.NullableAnnotation);
11654var result = TypeWithAnnotations.Create(node.Type);
11674var result = TypeWithAnnotations.Create(node.Type, NullableAnnotation.Oblivious);
11780var result = TypeWithAnnotations.Create(node.Type, NullableAnnotation.Oblivious);
11951var result = TypeWithAnnotations.Create(node.Type, node.IsInferred ? NullableAnnotation.Annotated : node.NullableAnnotation);
12048var 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 (6)
181var result = new StateMachineFieldSymbol(CurrentType, TypeWithAnnotations.Create(type), name, isPublic, isThis);
595return new SynthesizedLocal(CurrentFunction, TypeWithAnnotations.Create(type), kind, syntax, isPinned,
615TypeWithAnnotations.Create(type),
626return SynthesizedParameterSymbol.Create(container, TypeWithAnnotations.Create(type), ordinal, RefKind.None, name);
1682TypeWithAnnotations.Create(type),
1721temp = new SynthesizedLocal(this.CurrentFunction, TypeWithAnnotations.Create(node.Type), SynthesizedLocalKind.LoweringTemp);
Symbols\Source\SourceDelegateMethodSymbol.cs (5)
59var voidType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_Void, diagnostics, syntax));
61var objectType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_Object, diagnostics, syntax));
62var intPtrType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_IntPtr, diagnostics, syntax));
84var iAsyncResultType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_IAsyncResult, diagnostics, syntax));
85var asyncCallbackType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_AsyncCallback, diagnostics, syntax));
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (5)
44return new ScriptEntryPoint(containingType, TypeWithAnnotations.Create(systemVoid));
392public override TypeWithAnnotations ReturnTypeWithAnnotations => TypeWithAnnotations.Create(_getAwaiterGetResultCall.Type);
484new SynthesizedLocal(this, TypeWithAnnotations.Create(_containingType), SynthesizedLocalKind.LoweringTemp),
541TypeWithAnnotations.Create(submissionArrayType), 0, RefKind.None, "submissionArray"));
576new SynthesizedLocal(this, TypeWithAnnotations.Create(_containingType), SynthesizedLocalKind.LoweringTemp),
Symbols\TypeWithAnnotations.cs (7)
82return Create(typeSymbol, nullableAnnotation: isAnnotated ? NullableAnnotation.Annotated : isNullableEnabled ? NullableAnnotation.NotAnnotated : NullableAnnotation.Oblivious);
115return Create(Type, NullableAnnotation.Annotated, CustomModifiers);
125return Create(Type, NullableAnnotation.NotAnnotated, CustomModifiers);
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);