Binder\Binder_Symbols.cs (9)
345return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(GetContainingNamespaceOrNonExtensionType(symbol.Symbol), symbol.Symbol, LookupResultKind.NotATypeOrNamespace, diagnosticInfo));
471return TypeWithAnnotations.Create(
596return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(left, LookupResultKind.NotATypeOrNamespace, diagnostics.Add(ErrorCode.ERR_ColColWithTypeAlias, node.Alias.Location, node.Alias.Identifier.Text)));
613return TypeWithAnnotations.Create(new PointerTypeSymbol(elementType));
619return TypeWithAnnotations.Create(CreateErrorType());
846return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(qualifierOpt ?? this.Compilation.Assembly.GlobalNamespace, string.Empty, arity: 0, errorInfo: null));
872return TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(
880return TypeWithAnnotations.Create(errorResult);
1386? TypeWithAnnotations.Create(UnboundArgumentErrorTypeSymbol.Instance)
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (5)
105return TypeWithAnnotations.Create(expr.GetTypeOrFunctionType());
485_fixedResults[i] = (TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(_constructedContainingTypeOfMethod, _methodTypeParameters[i].Name, 0, null, false)), false);
572static (typeParameter, i, self) => self.IsUnfixed(i) ? TypeWithAnnotations.Create(typeParameter) : self._fixedResults[i].Type,
2998best = TypeWithAnnotations.Create(resultType, best.NullableAnnotation);
3463var newBound = TypeWithAnnotations.Create(oldBound.Type, newAnnotation);
Compilation\CSharpCompilation.cs (7)
2483return ArrayTypeSymbol.CreateCSharpArray(this.Assembly, TypeWithAnnotations.Create(elementType, elementNullableAnnotation), rank);
2496return new PointerTypeSymbol(TypeWithAnnotations.Create(elementType, elementNullableAnnotation));
4304var returnTypeWithAnnotations = TypeWithAnnotations.Create(returnType.EnsureCSharpSymbolOrNull(nameof(returnType)), returnType.NullableAnnotation.ToInternalAnnotation());
4306type => TypeWithAnnotations.Create(type.EnsureCSharpSymbolOrNull(nameof(parameterTypes)), type.NullableAnnotation.ToInternalAnnotation()));
4360typesBuilder.Add(TypeWithAnnotations.Create(elementType, annotation));
4398(t, a) => TypeWithAnnotations.Create(t.Type, a.ToInternalAnnotation())));
4428fields.Add(new AnonymousTypeField(name, location, TypeWithAnnotations.Create(type, nullableAnnotation), RefKind.None, ScopedKind.None));
FlowAnalysis\NullableWalker.cs (41)
148LValueType = TypeWithAnnotations.Create(type, annotation);
2944typeWithAnnotations = TypeWithAnnotations.Create(typeWithAnnotations.Type, nullableAnnotation);
3250type = TypeWithAnnotations.Create(node.Type, type.NullableAnnotation);
3965var resultType = TypeWithAnnotations.Create(node.Type);
4996return GetOrCreatePlaceholderSlot(node, TypeWithAnnotations.Create(node.Type, NullableAnnotation.NotAnnotated));
5151: TypeWithAnnotations.Create(bestType);
5267var bestTypeWithObliviousAnnotation = TypeWithAnnotations.Create(bestType);
5279inferredType = TypeWithAnnotations.Create(bestType, BestTypeInferrer.GetNullableAnnotation(resultTypes));
5330result = TypeWithAnnotations.Create(type);
5357type = TypeWithAnnotations.Create(((NamedTypeSymbol)node.Type).OriginalDefinition.Construct(ImmutableArray.Create(type)));
5582SetResult(binary, TypeWithState.ForType(binary.Type), TypeWithAnnotations.Create(binary.Type));
5657TypeWithAnnotations.Create(expr.Type),
5763targetTypeWithNullability = TypeWithAnnotations.Create(MakeNullableOf(targetTypeWithNullability));
6154targetType = TypeWithAnnotations.Create(node.Type, NullableAnnotation.NotAnnotated);
6247TypeWithAnnotations.Create(rightType),
6285TypeWithAnnotations targetType = fromExplicitCast ? explicitType : TypeWithAnnotations.Create(boundConversion.Type);
6501var refResultTypeWithAnnotations = TypeWithAnnotations.Create(refResultType, lValueAnnotation);
6510SetResult(node, TypeWithState.Create(refResultType, rValueState), TypeWithAnnotations.Create(refResultType, lValueAnnotation));
6582resultTypeWithAnnotations = TypeWithAnnotations.Create(resultType);
6910var type = TypeWithAnnotations.Create(node.Type);
7909completion(TypeWithAnnotations.Create(argument.Type));
8815return TypeWithAnnotations.Create(expr.GetTypeOrFunctionType(), GetNullableAnnotation(expr));
9248TypeWithAnnotations targetType = fromExplicitCast ? explicitType : TypeWithAnnotations.Create(node.Type);
10466TypeWithAnnotations.Create(conversion.BestUserDefinedConversionAnalysis!.FromType),
10524TypeWithAnnotations.Create(conversion.BestUserDefinedConversionAnalysis!.ToType),
11010var argTypeWithAnnotations = TypeWithAnnotations.Create(argType, NullableAnnotation.NotAnnotated);
11209var lvalueResult = TypeWithAnnotations.Create(node.Type, NullableAnnotation.NotAnnotated);
11825targetTypeOfOperandConversion = TypeWithAnnotations.Create(node.OperandConversion.Type, nullableAnnotation: NullableAnnotation.NotAnnotated);
11834targetTypeOfOperandConversion = TypeWithAnnotations.Create(MakeNullableOf(targetTypeOfOperandConversion));
12505targetTypeWithAnnotations = TypeWithAnnotations.Create(collectionExpression.Type);
12512targetTypeWithAnnotations = TypeWithAnnotations.Create(ForEachLoopBinder.GetIEnumerableOfT(resultType, isAsync, compilation, ref discardedUseSiteInfo, out bool foundMultiple, needSupportForRefStructInterfaces: out _));
12566TypeWithAnnotations.Create(enumeratorInfoOpt.ElementType, NullableAnnotation.NotAnnotated).ToTypeWithState();
12754var type = TypeWithAnnotations.Create(node.Type);
12911var type = TypeWithAnnotations.Create(node.Type);
12919var type = TypeWithAnnotations.Create(node.Type);
12941var type = TypeWithAnnotations.Create(node.Type, node.NullableAnnotation);
13332var result = TypeWithAnnotations.Create(node.Type);
13352var result = TypeWithAnnotations.Create(node.Type, NullableAnnotation.Oblivious);
13458var result = TypeWithAnnotations.Create(node.Type, NullableAnnotation.Oblivious);
13629var result = TypeWithAnnotations.Create(node.Type, node.IsInferred ? NullableAnnotation.Annotated : node.NullableAnnotation);
13728var typeWithAnnotations = TypeWithAnnotations.Create(node.Type, node.NullableAnnotation);
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (5)
224var pendingExceptionLocal = new SynthesizedLocal(_F.CurrentFunction, TypeWithAnnotations.Create(exceptionType), SynthesizedLocalKind.TryAwaitPendingException, tryStatementSyntax);
226var pendingBranchVar = new SynthesizedLocal(_F.CurrentFunction, TypeWithAnnotations.Create(_F.SpecialType(SpecialType.System_Int32)), SynthesizedLocalKind.TryAwaitPendingBranch, tryStatementSyntax);
1095this.returnValue = returnValue = new SynthesizedLocal(containingMethod, TypeWithAnnotations.Create(valueOpt.Type), SynthesizedLocalKind.AsyncMethodReturnValue, _syntaxOpt);
1131this.pendingCaughtException = new SynthesizedLocal(F.CurrentFunction, TypeWithAnnotations.Create(F.SpecialType(SpecialType.System_Object)), SynthesizedLocalKind.TryAwaitPendingCaughtException, tryStatementSyntax);
1132this.pendingCatch = new SynthesizedLocal(F.CurrentFunction, TypeWithAnnotations.Create(F.SpecialType(SpecialType.System_Int32)), SynthesizedLocalKind.TryAwaitPendingCatch, tryStatementSyntax);
Lowering\SyntheticBoundNodeFactory.cs (7)
186var result = new StateMachineFieldSymbol(CurrentType, TypeWithAnnotations.Create(type), name, isPublic, isThis);
194var result = new StateMachineFieldSymbolForRegularParameter(CurrentType, TypeWithAnnotations.Create(type), name, parameter, isPublic);
614return new SynthesizedLocal(CurrentFunction, TypeWithAnnotations.Create(type), kind, syntax, isPinned,
634TypeWithAnnotations.Create(type),
645return SynthesizedParameterSymbol.Create(container, TypeWithAnnotations.Create(type), ordinal, RefKind.None, name);
1701TypeWithAnnotations.Create(type),
1740temp = new SynthesizedLocal(this.CurrentFunction, TypeWithAnnotations.Create(node.Type), SynthesizedLocalKind.LoweringTemp);
Symbols\Source\SourceDelegateMethodSymbol.cs (5)
61var voidType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_Void, diagnostics, syntax));
63var objectType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_Object, diagnostics, syntax));
64var intPtrType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_IntPtr, diagnostics, syntax));
86var iAsyncResultType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_IAsyncResult, diagnostics, syntax));
87var asyncCallbackType = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_AsyncCallback, diagnostics, syntax));
Symbols\Source\SourceMemberContainerSymbol.cs (13)
5187TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Void)),
5226TypeWithAnnotations.Create(this),
5235TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Void)),
5279TypeWithAnnotations.Create(compilation.GetWellKnownType(WellKnownType.System_Text_StringBuilder)),
5287returnType: TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Boolean)),
5342returnType: TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_String)),
5516TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Int32)),
5545TypeWithAnnotations.Create(compilation.GetWellKnownType(WellKnownType.System_Type)),
5606TypeWithAnnotations.Create(this),
5615TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Boolean)),
6188builder.AddValue(TypeWithAnnotations.Create(baseType));
6192builder.AddValue(TypeWithAnnotations.Create(@interface));
6252AddSynthesizedAttribute(ref attributes, moduleBuilder.SynthesizeNullableAttributeIfNecessary(this, nullableContextValue, TypeWithAnnotations.Create(baseType)));
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (5)
44return new ScriptEntryPoint(containingType, TypeWithAnnotations.Create(systemVoid));
432public override TypeWithAnnotations ReturnTypeWithAnnotations => TypeWithAnnotations.Create(_userEntryPointInvocation.Type);
524new SynthesizedLocal(this, TypeWithAnnotations.Create(_containingType), SynthesizedLocalKind.LoweringTemp),
582TypeWithAnnotations.Create(submissionArrayType), 0, RefKind.None, "submissionArray"));
617new 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);