459 references to Create
Microsoft.CodeAnalysis.CSharp (340)
Binder\Binder.ValueChecks.cs (5)
3107=> TypeWithAnnotations.Create(_type, NullableAnnotation.NotAnnotated); 5672TypeWithAnnotations.Create(elementAccess.Expression.Type), 5681returnType: TypeWithAnnotations.Create(elementAccess.Type), 5712TypeWithAnnotations.Create(inlineArray.Type), 5721returnType: TypeWithAnnotations.Create(resultType),
Binder\Binder_AnonymousTypes.cs (1)
95TypeWithAnnotations.Create(fieldType),
Binder\Binder_Conversions.cs (1)
2426stackAllocType = new PointerTypeSymbol(TypeWithAnnotations.Create(elementType));
Binder\Binder_Crefs.cs (1)
1128parameterBuilder.Add(new SignatureOnlyParameterSymbol(TypeWithAnnotations.Create(type), ImmutableArray<CustomModifier>.Empty, isParamsArray: false, isParamsCollection: false, refKind: refKind));
Binder\Binder_Deconstruct.cs (4)
374return pending.SetInferredTypeWithAnnotations(TypeWithAnnotations.Create(type), this, diagnostics); 380return pending.SetInferredTypeWithAnnotations(TypeWithAnnotations.Create(type)); 518typesWithAnnotationsBuilder.Add(TypeWithAnnotations.Create(mergedType)); 569typesWithAnnotationsBuilder.Add(TypeWithAnnotations.Create(value.Type));
Binder\Binder_Expressions.cs (7)
373var type = new PointerTypeSymbol(TypeWithAnnotations.Create(boundStackAlloc.ElementType)); 948declTypeWithAnnotations = declTypeWithAnnotations.HasType ? declTypeWithAnnotations : TypeWithAnnotations.Create(CreateErrorType("var")); 987subExpressions.SelectAsArray(e => TypeWithAnnotations.Create(e.Type)), 1054var elementTypeWithAnnotations = TypeWithAnnotations.Create(boundArgument.Type); 4140var arrayType = ArrayTypeSymbol.CreateCSharpArray(Compilation.Assembly, TypeWithAnnotations.Create(bestType), rank); 4169type: GetStackAllocType(node, TypeWithAnnotations.Create(bestType), diagnostics, out bool hasErrors), 8478typeWithAnnotations: TypeWithAnnotations.Create(type));
Binder\Binder_Invocation.cs (2)
2150newArguments[i] = ((OutVariablePendingInference)argument).SetInferredTypeWithAnnotations(TypeWithAnnotations.Create(candidateType), null); 2161newArguments[i] = ((BoundDiscardExpression)argument).SetInferredTypeWithAnnotations(TypeWithAnnotations.Create(candidateType));
Binder\Binder_Operators.cs (1)
3980TypeSymbol pointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(operandType));
Binder\Binder_Patterns.cs (2)
333declType: TypeWithAnnotations.Create(narrowedType, NullableAnnotation.NotAnnotated), 943return TypeWithAnnotations.Create(inputType.StrippedType(), NullableAnnotation.NotAnnotated);
Binder\Binder_Query.cs (1)
818new AnonymousTypeField(fieldName, fieldValue.Syntax.Location, TypeWithAnnotations.Create(TypeOrError(fieldValue)), RefKind.None, ScopedKind.None);
Binder\Binder_Statements.cs (5)
1025declTypeOpt = TypeWithAnnotations.Create(initializerType); 1030declTypeOpt = TypeWithAnnotations.Create(CreateErrorType("var")); 1045declTypeOpt = TypeWithAnnotations.Create(CreateErrorType("var")); 1365TypeSymbol pointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(elementType)); 1470return op1.SetInferredTypeWithAnnotations(TypeWithAnnotations.Create(inferredType));
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\Binder_TupleOperators.cs (1)
410elementTypesWithAnnotations: convertedTypes.SelectAsArray(t => TypeWithAnnotations.Create(t)),
Binder\ForEachLoopBinder.cs (7)
311declType = inferredType.HasType ? inferredType : TypeWithAnnotations.Create(CreateErrorType("var")); 380iterationVariableType = inferredType.HasType ? inferredType : TypeWithAnnotations.Create(CreateErrorType("var")); 695inferredType = TypeWithAnnotations.Create(DynamicTypeSymbol.Instance); 703inferredType = TypeWithAnnotations.Create(GetSpecialType(SpecialType.System_Char, diagnostics, collectionExpr.Syntax)); 1192builder.ElementTypeWithAnnotations = builder.CurrentPropertyGetter?.ReturnTypeWithAnnotations ?? TypeWithAnnotations.Create(GetSpecialType(SpecialType.System_Object, diagnostics, errorLocationSyntax)); 1314builder.ElementTypeWithAnnotations = TypeWithAnnotations.Create( 1322TypeWithAnnotations.Create(GetSpecialType(SpecialType.System_Char, diagnostics, syntax)) :
Binder\InContainerBinder.cs (1)
102return TypeWithAnnotations.Create(this.Compilation.GetSpecialType(SpecialType.System_Object));
Binder\InMethodBinder.cs (2)
140return !elementType.IsDefault ? elementType : TypeWithAnnotations.Create(CreateErrorType()); 161return TypeWithAnnotations.Create(objectType);
Binder\Semantics\Conversions\Conversions.cs (2)
437TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Object), customModifiers: parameter.TypeWithAnnotations.CustomModifiers), parameter.RefCustomModifiers, 514var sourceAsPointer = new PointerTypeSymbol(TypeWithAnnotations.Create(sourceExpression.ElementType));
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (3)
595var voidPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(Compilation.GetSpecialType(SpecialType.System_Void))); 1533[TypeWithAnnotations.Create(candidate.LeftType), TypeWithAnnotations.Create(candidate.RightType)],
Binder\Semantics\Operators\UnaryOperatorOverloadResolution.cs (1)
182[TypeWithAnnotations.Create(candidate.OperandType)],
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);
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
4493paramsElementTypeOpt = TypeWithAnnotations.Create(ErrorTypeSymbol.EmptyParamsCollectionElementTypeSentinel);
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1339TypeWithAnnotations.Create(argType),
Binder\WithLambdaParametersBinder.cs (1)
75return TypeWithAnnotations.Create(CreateErrorType());
BoundTree\BoundDiscardExpression.cs (1)
33return new DiscardSymbol(TypeWithAnnotations.Create(this.Type, this.TopLevelNullability.Annotation.ToInternalAnnotation()));
BoundTree\Constructors.cs (1)
489: this(syntax, aliasOpt, null, TypeWithAnnotations.Create(type), hasErrors)
BoundTree\OutDeconstructVarPendingInference.cs (1)
24return SetInferredTypeWithAnnotations(TypeWithAnnotations.Create(binder.CreateErrorType()), success: false);
BoundTree\UnboundLambda.cs (9)
278bestResultType = TypeWithAnnotations.Create(bestType); 290bestResultType = TypeWithAnnotations.Create(bestType); 320return TypeWithAnnotations.Create(resultType); 335return TypeWithAnnotations.Create(taskTypeT.Construct(ImmutableArray.Create(bestResultType))); 380_builder.Add((node, TypeWithAnnotations.Create(type))); 782returnType = TypeWithAnnotations.Create(Binder.Compilation.GetSpecialType(SpecialType.System_Void)); 985? TypeWithAnnotations.Create(this.Binder.Compilation.GetSpecialType(SpecialType.System_Void)) 986: TypeWithAnnotations.Create(LambdaSymbol.InferenceFailureReturnType); 1235returnType = TypeWithAnnotations.Create(t);
BoundTree\VariablePendingInference.cs (1)
45type = TypeWithAnnotations.Create(binderOpt!.CreateErrorType("var"));
CodeGen\EmitArrayInitializer.cs (1)
647arrayType = arrayType.WithElementType(TypeWithAnnotations.Create(elementType.EnumUnderlyingTypeOrSelf()));
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));
Compiler\MethodBodySynthesizer.cs (1)
434tmps[i] = new SynthesizedLocal(accessor, TypeWithAnnotations.Create(delegateType), SynthesizedLocalKind.LoweringTemp);
Emitter\Model\NamedTypeSymbolAdapter.cs (1)
496var type = TypeWithAnnotations.Create(@interface);
Emitter\Model\PEModuleBuilder.cs (2)
1579var byteArrayType = ArrayTypeSymbol.CreateSZArray(byteType.ContainingAssembly, TypeWithAnnotations.Create(byteType)); 1665var boolArray = ArrayTypeSymbol.CreateSZArray(booleanType.ContainingAssembly, TypeWithAnnotations.Create(booleanType));
Emitter\NoPia\EmbeddedType.cs (1)
136var type = TypeWithAnnotations.Create(@interface);
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);
FlowAnalysis\NullableWalker_Patterns.cs (4)
476outputSlot = makeDagTempSlot(TypeWithAnnotations.Create(e.Type, NullableAnnotation.NotAnnotated), output); 688inferredType = TypeWithAnnotations.Create(inferredType.Type, existingType.NullableAnnotation.Join(inferredType.NullableAnnotation)); 839var type = TypeWithAnnotations.Create(t, NullableAnnotation.Annotated); 955var inferredTypeWithAnnotations = TypeWithAnnotations.Create(inferredType);
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\BoundTreeToDifferentEnclosingContextRewriter.cs (1)
70newLocal = new TypeSubstitutedLocalSymbol(local, TypeWithAnnotations.Create(newType), CurrentMethod);
Lowering\ClosureConversion\ClosureConversion.cs (3)
667var frameTypeParameters = ImmutableArray.Create(_currentTypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t)), 0, frame.Arity); 671LocalSymbol framePointer = new SynthesizedLocal(_topLevelMethod, TypeWithAnnotations.Create(frameType), SynthesizedLocalKind.LambdaDisplayClass, frame.ScopeSyntaxOpt); 1030var realTypeArguments = ImmutableArray.Create(_currentTypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t)), 0, totalTypeArgumentCount - originalMethod.Arity);
Lowering\ClosureConversion\LambdaCapturedVariable.cs (2)
54new LambdaCapturedVariableForRegularParameter(frame, TypeWithAnnotations.Create(type), fieldName, parameter) : 55new LambdaCapturedVariable(frame, TypeWithAnnotations.Create(type), fieldName, isThis);
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (2)
117_payloadType = ArrayTypeSymbol.CreateCSharpArray(methodBodyFactory.Compilation.Assembly, TypeWithAnnotations.Create(payloadElementType)); 253ArrayTypeSymbol.CreateCSharpArray(_methodBodyFactory.Compilation.Assembly, TypeWithAnnotations.Create(_payloadType));
Lowering\IteratorRewriter\IteratorConstructor.cs (1)
28SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(intType), 0, RefKind.None, GeneratedNames.MakeStateMachineStateFieldName()));
Lowering\IteratorRewriter\IteratorFinallyMethodSymbol.cs (1)
147get { return TypeWithAnnotations.Create(ContainingAssembly.GetSpecialType(SpecialType.System_Void)); }
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
378var operandType = new PointerTypeSymbol(TypeWithAnnotations.Create(_factory.SpecialType(SpecialType.System_Void)));
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (3)
62return VisitArrayOrSpanCollectionExpression(node, collectionTypeKind, node.Type, TypeWithAnnotations.Create(elementType)); 575Construct(ImmutableArray.Create(TypeWithAnnotations.Create(inlineArrayType), elementType)); 604inlineArrayAsSpan = inlineArrayAsSpan.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(inlineArrayType), elementType));
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
104var byteArray = ArrayTypeSymbol.CreateSZArray(_compilation.Assembly, TypeWithAnnotations.Create(byteType));
Lowering\LocalRewriter\LocalRewriter_DeconstructionAssignmentOperator.cs (2)
264var tupleType = NamedTypeSymbol.CreateTuple(locationOpt: null, elementTypesWithAnnotations: builder!.SelectAsArray(e => TypeWithAnnotations.Create(e.Type)), 390var localSymbol = new SynthesizedLocal(_factory.CurrentFunction, TypeWithAnnotations.Create(outputPlaceholder.Type), SynthesizedLocalKind.LoweringTemp);
Lowering\StateMachineRewriter\StateMachineFieldSymbol.cs (1)
44this(stateMachineType, TypeWithAnnotations.Create(type), name, slotDebugInfo, slotIndex, isPublic)
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);
Operations\CSharpOperationFactory.cs (1)
2078TypeWithAnnotations.Create(((CSharpCompilation)_semanticModel.Compilation).GetSpecialType(SpecialType.System_Boolean)),
Symbols\AbstractTypeMap.cs (2)
125return TypeWithAnnotations.Create(result); 181return TypeWithAnnotations.Create(typeParameter);
Symbols\AbstractTypeParameterMap.cs (1)
36return TypeWithAnnotations.Create(typeParameter);
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (2)
236var original = TypeWithAnnotations.Create(genericFieldTypes[index].Type); 238var replacement = TypeWithAnnotations.Create(((ArrayTypeSymbol)lastParam.Type).WithElementType(original));
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.ConstructorSymbol.cs (1)
60get { return TypeWithAnnotations.Create(this.Manager.System_Void); }
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (5)
61new SynthesizedDelegateInvokeMethod.ParameterDescription(TypeWithAnnotations.Create(typeParams[i]), refKinds.IsNull ? RefKind.None : refKinds[i], ScopedKind.None, defaultValue: null, isParams: false, hasUnscopedRefAttribute: false)); 65var returnType = TypeWithAnnotations.Create(voidReturnTypeOpt ?? typeParams[parameterCount]); 131var type = TypeWithAnnotations.Create(typeParams[i]); 138type = TypeWithAnnotations.Create(ArrayTypeSymbol.CreateSZArray(containingType.ContainingAssembly, type)); 146var returnType = TypeWithAnnotations.Create(returnsVoid ? returnParameter.Type : typeParams[parameterCount]);
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.EqualsMethodSymbol.cs (2)
25SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(this.Manager.System_Object), 0, RefKind.None, "value")); 45get { return TypeWithAnnotations.Create(this.Manager.System_Boolean); }
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.GetHashCodeMethodSymbol.cs (1)
49get { return TypeWithAnnotations.Create(this.Manager.System_Int32); }
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TemplateSymbol.cs (1)
63AnonymousTypePropertySymbol property = new AnonymousTypePropertySymbol(this, field, TypeWithAnnotations.Create(typeParameter), fieldIndex);
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.ToStringMethodSymbol.cs (1)
49get { return TypeWithAnnotations.Create(this.Manager.System_String, NullableAnnotation.NotAnnotated); }
Symbols\AssemblySymbol.cs (3)
767return ArrayTypeSymbol.CreateCSharpArray(this, TypeWithAnnotations.Create(symbol), rank); 777return new PointerTypeSymbol(TypeWithAnnotations.Create(symbol)); 880typeArgumentSymbols.Add(TypeWithAnnotations.Create(argSymbol));
Symbols\Compilation_WellKnownMembers.cs (2)
791var boolArray = ArrayTypeSymbol.CreateSZArray(booleanType.ContainingAssembly, TypeWithAnnotations.Create(booleanType)); 808var stringArray = ArrayTypeSymbol.CreateSZArray(stringType.ContainingAssembly, TypeWithAnnotations.Create(stringType));
Symbols\ErrorMethodSymbol.cs (1)
167get { return TypeWithAnnotations.Create(_returnType); }
Symbols\ErrorPropertySymbol.cs (1)
36_typeWithAnnotations = TypeWithAnnotations.Create(type);
Symbols\ErrorTypeSymbol.cs (1)
45return TypeWithAnnotations.Create(typeMap.SubstituteNamedType(this));
Symbols\Extensions\SynthesizedExtensionMarker.cs (1)
53return (TypeWithAnnotations.Create(Binder.GetSpecialType(DeclaringCompilation, SpecialType.System_Void, GetFirstLocation(), diagnostics)),
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (3)
33returnType = TypeWithAnnotations.Create(typeBinder.CreateErrorType()); 548var returnType = TypeWithAnnotations.Create(retInfo.Type, customModifiers: CSharpCustomModifier.Convert(retInfo.CustomModifiers)); 568var paramType = TypeWithAnnotations.Create(param.Type, customModifiers: CSharpCustomModifier.Convert(param.CustomModifiers));
Symbols\Metadata\PE\PEEventSymbol.cs (2)
86_eventTypeWithAnnotations = TypeWithAnnotations.Create(new UnsupportedMetadataTypeSymbol(mrEx)); 101var type = TypeWithAnnotations.Create(typeSymbol);
Symbols\Metadata\PE\PEFieldSymbol.cs (3)
318var type = TypeWithAnnotations.Create(typeSymbol, customModifiers: customModifiersArray); 337type = TypeWithAnnotations.Create(new PointerTypeSymbol(TypeWithAnnotations.Create(fixedElementType)));
Symbols\Metadata\PE\PENamedTypeSymbol.cs (2)
717baseType = (NamedTypeSymbol)NullableTypeDecoder.TransformType(TypeWithAnnotations.Create(decodedType), _handle, moduleSymbol, accessSymbol: this, nullableContext: this).Type; 777typeSymbol = NullableTypeDecoder.TransformType(TypeWithAnnotations.Create(typeSymbol), interfaceImpl, moduleSymbol, accessSymbol: this, nullableContext: this).Type;
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
390var typeWithModifiers = TypeWithAnnotations.Create(type, customModifiers: CSharpCustomModifier.Convert(customModifiers));
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
303var propertyTypeWithAnnotations = TypeWithAnnotations.Create(originalPropertyType, customModifiers: typeCustomModifiers);
Symbols\Metadata\PE\PETypeParameterSymbol.cs (1)
303var type = TypeWithAnnotations.Create(typeSymbol);
Symbols\Metadata\PE\SymbolFactory.cs (1)
170return TypeWithAnnotations.Create(type, NullableAnnotation.Oblivious, CSharpCustomModifier.Convert(customModifiers));
Symbols\Metadata\PE\TupleTypeDecoder.cs (3)
114return TypeWithAnnotations.Create(new UnsupportedMetadataTypeSymbol()); 121TypeWithAnnotations.Create(decoded, metadataType.NullableAnnotation, metadataType.CustomModifiers); 346TypeWithAnnotations.Create(decoded, typeWithAnnotations.NullableAnnotation, typeWithAnnotations.CustomModifiers);
Symbols\MethodSymbol.cs (1)
858return Construct(typeArguments.SelectAsArray(a => TypeWithAnnotations.Create(a)));
Symbols\NamedTypeSymbol.cs (1)
1191modifiedArguments = typeArguments.SelectAsArray(t => TypeWithAnnotations.Create(t));
Symbols\NullableAnnotationExtensions.cs (1)
104var flowState = TypeWithAnnotations.Create(type, annotation).ToTypeWithState().State;
Symbols\PlaceholderTypeArgumentSymbol.cs (1)
18private static readonly TypeWithAnnotations s_instance = TypeWithAnnotations.Create(new PlaceholderTypeArgumentSymbol());
Symbols\PublicModel\Symbol.cs (2)
25builder.Add(TypeWithAnnotations.Create(type, (typeArg?.NullableAnnotation.ToInternalAnnotation() ?? NullableAnnotation.NotAnnotated))); 49builder.Add(TypeWithAnnotations.Create(type, annotation));
Symbols\ReducedExtensionMethodSymbol.cs (2)
190builder.Add(TypeWithAnnotations.Create(ErrorTypeSymbol.UnknownResultType)); 235(t, tp) => t.HasType ? t : TypeWithAnnotations.Create(tp));
Symbols\Retargeting\RetargetingPropertySymbol.cs (1)
72type = TypeWithAnnotations.Create(asDynamic);
Symbols\Source\GlobalExpressionVariable.cs (1)
114type = TypeWithAnnotations.Create(binder.CreateErrorType("var"));
Symbols\Source\IndexedTypeParameterSymbol.cs (1)
113builder.Add(TypeWithAnnotations.Create(GetTypeParameter(i), NullableAnnotation.Ignored));
Symbols\Source\LambdaSymbol.cs (2)
63_returnType = !returnType.HasType ? TypeWithAnnotations.Create(ReturnTypeIsBeingInferred) : returnType; 362: TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(compilation, name: string.Empty, arity: 0, errorInfo: null));
Symbols\Source\LocalFunctionOrSourceMemberMethodSymbol.cs (1)
33elementType = TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(DeclaringCompilation, name: "", arity: 0, errorInfo: null, unreported: false));
Symbols\Source\SourceConstructorSymbolBase.cs (1)
59_lazyReturnType = TypeWithAnnotations.Create(bodyBinder.GetSpecialType(SpecialType.System_Void, diagnostics, syntax));
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\SourceDestructorSymbol.cs (1)
86_lazyReturnType = TypeWithAnnotations.Create(bodyBinder.GetSpecialType(SpecialType.System_Void, diagnostics, syntax));
Symbols\Source\SourceEnumConstantSymbol.cs (1)
63return TypeWithAnnotations.Create(this.ContainingType);
Symbols\Source\SourceEventAccessorSymbol.cs (3)
122_lazyReturnType = TypeWithAnnotations.Create(eventTokenType); 133_lazyReturnType = TypeWithAnnotations.Create(voidType); 144_lazyReturnType = TypeWithAnnotations.Create(voidType);
Symbols\Source\SourceLocalSymbol.cs (4)
371declType = TypeWithAnnotations.Create(typeBinder.CreateErrorType("var")); 564return TypeWithAnnotations.Create(initializerOpt?.Type); 698return TypeWithAnnotations.Create(_nodeBinder.CreateErrorType()); 813SetTypeWithAnnotations(TypeWithAnnotations.Create(_nodeBinder.CreateErrorType("var")));
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\Source\SourceMemberFieldSymbol.cs (4)
484type = TypeWithAnnotations.Create(tokenTableType.Construct(ImmutableArray.Create(@event.TypeWithAnnotations))); 556type = TypeWithAnnotations.Create(initializerOpt.Type); 565type = TypeWithAnnotations.Create(binder.CreateErrorType("var")); 572type = TypeWithAnnotations.Create(new PointerTypeSymbol(type));
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (1)
349return TypeWithAnnotations.Create(type).VisitType(
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
388var type = TypeWithAnnotations.Create(binder.GetSpecialType(SpecialType.System_Void, diagnostics, this.GetSyntax()));
Symbols\Source\ThisParameterSymbol.cs (1)
146=> TypeWithAnnotations.Create(_containingType, NullableAnnotation.NotAnnotated);
Symbols\SymbolExtensions.cs (1)
517returnType = TypeWithAnnotations.Create((TypeSymbol)symbol);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListConstructor.cs (1)
15SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(parameterType), ordinal: 0, RefKind.None, parameterName));
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorConstructor.cs (1)
15SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(parameterType), ordinal: 0, RefKind.None, "item"));
Symbols\Synthesized\Records\SynthesizedRecordBaseEquals.cs (2)
29return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 32TypeWithAnnotations.Create(ContainingType.BaseTypeNoUseSiteDiagnostics, NullableAnnotation.Annotated),
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (1)
35return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Void, location, diagnostics)),
Symbols\Synthesized\Records\SynthesizedRecordEqualityContractProperty.cs (1)
83return (TypeWithAnnotations.Create(Binder.GetWellKnownType(DeclaringCompilation, WellKnownType.System_Type, diagnostics, Location), NullableAnnotation.NotAnnotated),
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperatorBase.cs (3)
71return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 74TypeWithAnnotations.Create(ContainingType, annotation), 77TypeWithAnnotations.Create(ContainingType, annotation),
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (2)
37return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 40TypeWithAnnotations.Create(ContainingType, annotation),
Symbols\Synthesized\Records\SynthesizedRecordGetHashCode.cs (1)
34return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Int32, location, diagnostics)),
Symbols\Synthesized\Records\SynthesizedRecordObjEquals.cs (2)
32return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 35TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Object, location, diagnostics), annotation),
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (2)
94return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 97TypeWithAnnotations.Create(Binder.GetWellKnownType(compilation, WellKnownType.System_Text_StringBuilder, diagnostics, location), annotation),
Symbols\Synthesized\Records\SynthesizedRecordToString.cs (1)
43return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_String, location, diagnostics), annotation),
Symbols\Synthesized\SynthesizedAccessorValueParameterSymbol.cs (1)
141return TypeWithAnnotations.Create(eventTokenType);
Symbols\Synthesized\SynthesizedDelegateSymbol.cs (2)
21SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(objectType), 0, RefKind.None, "object"), 22SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(intPtrType), 1, RefKind.None, "method"));
Symbols\Synthesized\SynthesizedEmbeddedNativeIntegerAttributeSymbol.cs (2)
32var boolArrayType = TypeWithAnnotations.Create( 35TypeWithAnnotations.Create(boolType)));
Symbols\Synthesized\SynthesizedEmbeddedNullableAttributeSymbol.cs (2)
34var annotatedByteType = TypeWithAnnotations.Create(systemByteType); 36var byteArrayType = TypeWithAnnotations.Create(
Symbols\Synthesized\SynthesizedEmbeddedNullableContextAttributeSymbol.cs (1)
41m => ImmutableArray.Create(SynthesizedParameterSymbol.Create(m, TypeWithAnnotations.Create(systemByteType), 0, RefKind.None)),
Symbols\Synthesized\SynthesizedEmbeddedNullablePublicOnlyAttributeSymbol.cs (1)
41m => ImmutableArray.Create(SynthesizedParameterSymbol.Create(m, TypeWithAnnotations.Create(systemBooleanType), 0, RefKind.None)),
Symbols\Synthesized\SynthesizedEmbeddedRefSafetyRulesAttributeSymbol.cs (1)
39m => ImmutableArray.Create(SynthesizedParameterSymbol.Create(m, TypeWithAnnotations.Create(int32Type), 0, RefKind.None)),
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\Synthesized\SynthesizedEnumValueFieldSymbol.cs (1)
35return TypeWithAnnotations.Create(((SourceNamedTypeSymbol)ContainingType).EnumUnderlyingType);
Symbols\Synthesized\SynthesizedFieldSymbol.cs (1)
33_type = TypeWithAnnotations.Create(type);
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (1)
213get { return TypeWithAnnotations.Create(_returnType); }
Symbols\Synthesized\SynthesizedHotReloadExceptionConstructorSymbol.cs (2)
19SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(stringType), ordinal: 0, RefKind.None), 20SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(intType), ordinal: 1, RefKind.None)
Symbols\Synthesized\SynthesizedInlineArrayAsReadOnlySpanMethod.cs (2)
17this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(TypeParameters[0]), 0, RefKind.In, "buffer"), 18SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(intType), 1, RefKind.None, "length")));
Symbols\Synthesized\SynthesizedInlineArrayAsSpanMethod.cs (2)
17this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(TypeParameters[0]), 0, RefKind.Ref, "buffer"), 18SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(intType), 1, RefKind.None, "length")));
Symbols\Synthesized\SynthesizedInlineArrayElementRefMethod.cs (2)
17this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(TypeParameters[0]), 0, RefKind.Ref, "buffer"), 18SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(intType), 1, RefKind.None, "index")));
Symbols\Synthesized\SynthesizedInlineArrayElementRefReadOnlyMethod.cs (2)
17this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(TypeParameters[0]), 0, RefKind.In, "buffer"), 18SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(intType), 1, RefKind.None, "index")));
Symbols\Synthesized\SynthesizedInlineArrayFirstElementRefMethod.cs (1)
17this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(TypeParameters[0]), 0, RefKind.Ref, "buffer")));
Symbols\Synthesized\SynthesizedInlineArrayFirstElementRefReadOnlyMethod.cs (1)
17this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(TypeParameters[0]), 0, RefKind.In, "buffer")));
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (1)
156get { return TypeWithAnnotations.Create(ContainingAssembly.GetSpecialType(SpecialType.System_Void)); }
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (1)
146get { return TypeWithAnnotations.Create(_returnType); }
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (2)
229return TypeWithAnnotations.Create(_returnType); 471) : base(container, TypeWithAnnotations.Create(type), ordinal, RefKind.None, ScopedKind.None, name)
Symbols\Synthesized\SynthesizedLambdaCacheFieldSymbol.cs (1)
24_type = TypeWithAnnotations.Create(type);
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (3)
57TypeWithAnnotations.Create( 59TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_String, NoLocation.Singleton, diagnostics)))), 0, RefKind.None, "args")); 159return TypeWithAnnotations.Create(_returnType);
Symbols\Synthesized\SynthesizedStaticConstructor.cs (1)
139return TypeWithAnnotations.Create(ContainingAssembly.GetSpecialType(SpecialType.System_Void));
Symbols\Synthesized\SynthesizedStringHashFunctionSymbol.cs (2)
21this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(paramType), 0, RefKind.None, "s"))); 31this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(paramType), 0, RefKind.None, "s")));
Symbols\Synthesized\SynthesizedSubmissionConstructor.cs (1)
29SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(submissionArrayType), 0, RefKind.None, "submissionArray"));
Symbols\Synthesized\SynthesizedThrowSwitchExpressionExceptionMethod.cs (1)
19this.SetParameters(ImmutableArray.Create(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(paramType), 0, RefKind.None, "unmatchedValue")));
Symbols\Tuples\TupleTypeSymbol.cs (1)
243var chainedTypes = ImmutableArray.Create(elementTypes, (loop - 1) * (ValueTupleRestPosition - 1), ValueTupleRestPosition - 1).Add(TypeWithAnnotations.Create(currentSymbol));
Symbols\TypeMap.cs (3)
27return typeParameters.SelectAsArray(static (tp) => TypeWithAnnotations.Create(tp)); 32return typeParameters.SelectAsArray(static (tp) => TypeWithAnnotations.Create(tp, NullableAnnotation.Ignored)); 129result.Mapping.Add(tp, TypeWithAnnotations.Create(newTp));
Symbols\TypeSymbolExtensions.cs (2)
1958typeWithAnnotations = TypeWithAnnotations.Create(type, customModifiers: typeWithAnnotations.CustomModifiers); 1982typeArgumentsBuilder[i] = TypeWithAnnotations.Create(typeArgNormalized, customModifiers: typeWithModifier.CustomModifiers);
Symbols\TypeUnification.cs (7)
30var substituted1 = SubstituteAllTypeParameters(substitution, TypeWithAnnotations.Create(t1)); 31var substituted2 = SubstituteAllTypeParameters(substitution, TypeWithAnnotations.Create(t2)); 59return CanUnifyHelper(TypeWithAnnotations.Create(t1), TypeWithAnnotations.Create(t2), ref substitution); 207AddSubstitution(ref substitution, tp1, TypeWithAnnotations.Create(t2.Type)); 215TypeWithAnnotations.Create(t2.Type, 234TypeWithAnnotations.Create(t1.Type,
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);
Symbols\TypeWithState.cs (2)
89var type = TypeWithAnnotations.Create(Type, NullableAnnotation.NotAnnotated); 95return TypeWithAnnotations.Create(this.Type, annotation);
Symbols\UnboundGenericType.cs (1)
55result.Add(TypeWithAnnotations.Create(new UnboundArgumentErrorTypeSymbol(name, errorInfo)));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (15)
CodeGen\CodeGenDeconstructTests.cs (1)
6047IDiscardSymbol symbolClone = new DiscardSymbol(TypeWithAnnotations.Create(symbol.Type.GetSymbol())).GetPublicSymbol();
CodeGen\CodeGenFunctionPointersTests.cs (8)
7673CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string), refCustomModifiers: default, 7677CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string), refCustomModifiers: default, 7682CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string, customModifiers: ImmutableArray.Create(testMod)), refCustomModifiers: default, 7686CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string), refCustomModifiers: ImmutableArray.Create(testMod), 7758CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string), refCustomModifiers: default, 7762CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string), refCustomModifiers: default, 7767CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string, customModifiers: ImmutableArray.Create(testMod)), refCustomModifiers: default, 7771CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string), refCustomModifiers: ImmutableArray.Create(testMod),
CodeGen\CodeGenTupleTest.cs (6)
13700Add(TypeWithAnnotations.Create(NamedTypeSymbol.CreateTuple(m1Tuple, 13756Add(TypeWithAnnotations.Create(NamedTypeSymbol.CreateTuple(m1Tuple, 13817Add(TypeWithAnnotations.Create(NamedTypeSymbol.CreateTuple(m1Tuple, 28989var obliviousObject = TypeWithAnnotations.Create(@object, NullableAnnotation.Oblivious); 29006var nullableObject = TypeWithAnnotations.Create(@object, NullableAnnotation.Annotated); 29007var nonNullableObject = TypeWithAnnotations.Create(@object, NullableAnnotation.NotAnnotated);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (14)
Attributes\AttributeTests.cs (14)
5494var typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(classW)); 5499typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(classW), rank: 2); 5504typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(classW)); 5505typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(typeArg), rank: 2); 5510NamedTypeSymbol classYOfW = classY.ConstructIfGeneric(ImmutableArray.Create(TypeWithAnnotations.Create(classW))); 5511typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(classYOfW), rank: 2); 5512typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(typeArg)); 5517NamedTypeSymbol classYOfInt = classY.ConstructIfGeneric(ImmutableArray.Create(TypeWithAnnotations.Create(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int32)))); 5519typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(substNestedF), rank: 3); 5520typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(typeArg)); 5521typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(typeArg), rank: 2); 5526NamedTypeSymbol substNestedZ = classYOfInt.GetTypeMember("Z").ConstructIfGeneric(ImmutableArray.Create(TypeWithAnnotations.Create(classW))); 5527typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(substNestedZ)); 5528typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(typeArg), rank: 2);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (44)
Semantics\DelegateTypeTests.cs (4)
15692var funcOfObjectNullable = funcOfT.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(objectType, NullableAnnotation.Annotated))); 15693var funcOfStringNullable = funcOfT.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(stringType, NullableAnnotation.Annotated))); 15694var funcOfStringNotNullable = funcOfT.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(stringType, NullableAnnotation.NotAnnotated))); 15710var setNotNullable = (TypeWithAnnotations type) => TypeWithAnnotations.Create(type.Type, NullableAnnotation.NotAnnotated);
Semantics\InterpolationTests.cs (1)
7616var substitutedC = c.WithTypeArguments(ImmutableArray.Create(TypeWithAnnotations.Create(handler)));
Semantics\NullableReferenceTypesTests.cs (31)
13208Assert.False(member.ReturnTypeWithAnnotations.Equals(member.OverriddenMethod.ConstructIfGeneric(member.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).ReturnTypeWithAnnotations, 13326var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 13334var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 13413var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 13688Assert.False(m1.Parameters[0].TypeWithAnnotations.Equals(m1.OverriddenMethod.ConstructIfGeneric(m1.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).Parameters[0].TypeWithAnnotations, 14028Assert.False(member.ReturnTypeWithAnnotations.Equals(member.OverriddenMethod.ConstructIfGeneric(member.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).ReturnTypeWithAnnotations, 14033Assert.True(m3.ReturnTypeWithAnnotations.Equals(m3.OverriddenMethod.ConstructIfGeneric(m3.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).ReturnTypeWithAnnotations, 14135Assert.False(member.Parameters[0].TypeWithAnnotations.Equals(member.OverriddenMethod.ConstructIfGeneric(member.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).Parameters[0].TypeWithAnnotations, 14140Assert.True(m3.Parameters[0].TypeWithAnnotations.Equals(m3.OverriddenMethod.ConstructIfGeneric(m3.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).Parameters[0].TypeWithAnnotations, 16503var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 16511var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 17733var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 17741var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 17801var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 17809var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 17877var m1Def = m1.ConstructIfGeneric(m1Impl.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 113155m1.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(a, NullableAnnotation.Annotated))), 113156m1.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(a, NullableAnnotation.NotAnnotated))), 113157m1.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(a, NullableAnnotation.Oblivious))) 113162m1.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(a, NullableAnnotation.Annotated))), 113163m1.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(a, NullableAnnotation.NotAnnotated))), 113164m1.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(a, NullableAnnotation.Oblivious))) 115837var c2 = cDefinition.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(cDefinition.TypeParameters.Single(), NullableAnnotation.NotAnnotated))); 115849var c3 = cDefinition.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(cDefinition.TypeParameters.Single(), NullableAnnotation.Annotated))); 115879var i1 = iDefinition.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(iDefinition.TypeParameters.Single(), NullableAnnotation.Annotated))); 115888var c2 = cDefinition.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(cDefinition.TypeParameters.Single(), NullableAnnotation.NotAnnotated))); 115900var i2b = i2.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(iDefinition.TypeParameters.Single(), NullableAnnotation.Annotated))); 115905var i2c = i2.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(i2.TypeParameters.Single(), NullableAnnotation.Annotated))); 115909var c3 = cDefinition.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(cDefinition.TypeParameters.Single(), NullableAnnotation.Annotated))); 115914var i3b = i3.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(i3.TypeParameters.Single(), NullableAnnotation.Annotated))); 115920var c4 = cDefinition.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(cDefinition.TypeParameters.Single(), customModifiers: modifiers)));
Semantics\RawInterpolationTests_Handler.cs (1)
5905var substitutedC = c.WithTypeArguments(ImmutableArray.Create(TypeWithAnnotations.Create(handler)));
Semantics\UnsafeTests.cs (7)
7853var structPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(structType)); 8166var intPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(intType)); 8233var intPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(intType)); 8291var intPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(intType)); 10220var charPointerSymbol = new PointerTypeSymbol(TypeWithAnnotations.Create(charSymbol)); 10292var charPointerSymbol = new PointerTypeSymbol(TypeWithAnnotations.Create(charSymbol)); 10294var voidPointerSymbol = new PointerTypeSymbol(TypeWithAnnotations.Create(voidSymbol));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (45)
Symbols\CompilationCreationTests.cs (1)
97var arrayOfc107 = ArrayTypeSymbol.CreateCSharpArray(c1.Assembly, TypeWithAnnotations.Create(c107));
Symbols\ExtensionMethodTests.cs (4)
2528var arrayType = ArrayTypeSymbol.CreateCSharpArray(compilation.Assembly, TypeWithAnnotations.Create(stringType), 1); 2542ImmutableArray.Create(TypeWithAnnotations.Create(intType)), 2551ImmutableArray.Create(TypeWithAnnotations.Create(intType), TypeWithAnnotations.Create(arrayType)),
Symbols\FunctionPointerTypeSymbolTests.cs (6)
2047TypeWithAnnotations.Create(returnType, customModifiers: customModifiers), 2056TypeWithAnnotations.Create(returnType), 2114TypeWithAnnotations.Create(returnType, customModifiers: customModifiers), 2123TypeWithAnnotations.Create(returnType), 2173TypeWithAnnotations.Create(returnType, customModifiers: typeCustomModifiers), 2182TypeWithAnnotations.Create(returnType, customModifiers: typeCustomModifiers),
Symbols\Metadata\PE\DynamicTransformsTests.cs (23)
76var arrayOfT = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(t)); 80var arrayOfInnerInnerOfInt = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(memberInnerInnerOfInt)); 135var arrayOfDynamic = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(s_dynamicType), 1); 140var arrayOfArrayOfDynamic = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(arrayOfDynamic), 1); 222var complicatedInnerInnerArray = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(complicatedInnerInner), 1); 233complicatedInnerInnerArray = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(complicatedInnerInner), 1); 234var complicatedInnerInnerArrayOfArray = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(complicatedInnerInnerArray), 1); 240var arrayOfDerivedTypeParam = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(derivedTypeParam), 1); 246complicatedInnerInnerArray = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(complicatedInnerInner), 1); 252complicatedInnerInnerArray = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(complicatedInnerInner), 1); 253complicatedInnerInnerArrayOfArray = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(complicatedInnerInnerArray), 1); 280var arrayOfDynamic = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(s_dynamicType)); 286var arrayOfDerivedTypeParam = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(derivedTypeParam)); 294var complicatedInnerInnerArray = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(complicatedInnerInner)); 300complicatedInnerInnerArray = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(complicatedInnerInner)); 301var complicatedInnerInnerArrayOfArray = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(complicatedInnerInnerArray)); 334var arrayOfDerivedTypeParam = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(unsafeClassTypeParam), 1); 340var pointerToInt = new PointerTypeSymbol(TypeWithAnnotations.Create(_intType)); 341var arrayOfPointerToInt = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(pointerToInt), 1); 343var arrayOfArrayOfPointerToInt = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(arrayOfPointerToInt), 1); 347var complicatedInnerInnerArray = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(complicatedInnerInner), 1); 353complicatedInnerInnerArray = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(complicatedInnerInner), 1); 354var complicatedInnerInnerArrayOfArray = ArrayTypeSymbol.CreateCSharpArray(_assembly, TypeWithAnnotations.Create(complicatedInnerInnerArray), 1);
Symbols\MockSymbolTests.cs (4)
28ArrayTypeSymbol ats1 = ArrayTypeSymbol.CreateCSharpArray(compilation.Assembly, TypeWithAnnotations.Create(elementType), rank: 1); 37ArrayTypeSymbol ats2 = ArrayTypeSymbol.CreateCSharpArray(compilation.Assembly, TypeWithAnnotations.Create(elementType), rank: 2); 45ArrayTypeSymbol ats3 = ArrayTypeSymbol.CreateCSharpArray(compilation.Assembly, TypeWithAnnotations.Create(elementType), rank: 3); 55PointerTypeSymbol pts1 = new PointerTypeSymbol(TypeWithAnnotations.Create(pointedAtType));
Symbols\Source\ModifierTests.cs (3)
158var pointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(typeParamType, customModifiers: customModifiers)); // NOTE: We're constructing this manually, since it's illegal. 159var arrayType = ArrayTypeSymbol.CreateCSharpArray(comp.Assembly, TypeWithAnnotations.Create(typeParamType, customModifiers: customModifiers)); // This is legal, but we're already manually constructing types. 161var typeMap = new TypeMap(ImmutableArray.Create(typeParamType), ImmutableArray.Create(TypeWithAnnotations.Create(intType)));
Symbols\Source\TypeMapTests.cs (1)
97return new TypeMap(allTypeParameters.ToImmutableAndFree(), typeArguments.SelectAsArray(t => TypeWithAnnotations.Create(t))).SubstituteNamedType(type);
Symbols\Source\UpdatedContainingSymbolAndNullableAnntotationTests.cs (3)
43var wrappedLocal1 = UpdatedContainingSymbolAndNullableAnnotationLocal.CreateForTest(local1, m2, TypeWithAnnotations.Create(local1.Type, NullableAnnotation.Annotated)); 44var wrappedLocal1a = UpdatedContainingSymbolAndNullableAnnotationLocal.CreateForTest(local1, m2, TypeWithAnnotations.Create(local1.Type, NullableAnnotation.Annotated)); 45var wrappedLocal2 = UpdatedContainingSymbolAndNullableAnnotationLocal.CreateForTest(local2, m2, TypeWithAnnotations.Create(local1.Type, NullableAnnotation.NotAnnotated));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Diagnostics\DiagnosticTest.cs (1)
113var type = TypeWithAnnotations.Create(comp.GetSpecialType(SpecialType.System_Object));