439 references to Create
Microsoft.CodeAnalysis.CSharp (311)
Binder\Binder_AnonymousTypes.cs (1)
95TypeWithAnnotations.Create(fieldType),
Binder\Binder_Conversions.cs (1)
877stackAllocType = new PointerTypeSymbol(TypeWithAnnotations.Create(elementType));
Binder\Binder_Crefs.cs (1)
940parameterBuilder.Add(new SignatureOnlyParameterSymbol(TypeWithAnnotations.Create(type), ImmutableArray<CustomModifier>.Empty, isParams: 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)
365var type = new PointerTypeSymbol(TypeWithAnnotations.Create(boundStackAlloc.ElementType)); 905declTypeWithAnnotations = declTypeWithAnnotations.HasType ? declTypeWithAnnotations : TypeWithAnnotations.Create(CreateErrorType("var")); 944subExpressions.SelectAsArray(e => TypeWithAnnotations.Create(e.Type)), 1011var elementTypeWithAnnotations = TypeWithAnnotations.Create(boundArgument.Type); 3430var arrayType = ArrayTypeSymbol.CreateCSharpArray(Compilation.Assembly, TypeWithAnnotations.Create(bestType), rank); 3459type: GetStackAllocType(node, TypeWithAnnotations.Create(bestType), diagnostics, out bool hasErrors), 7235typeWithAnnotations: TypeWithAnnotations.Create(type));
Binder\Binder_Invocation.cs (2)
1731newArguments[i] = ((OutVariablePendingInference)argument).SetInferredTypeWithAnnotations(TypeWithAnnotations.Create(candidateType), null); 1742newArguments[i] = ((BoundDiscardExpression)argument).SetInferredTypeWithAnnotations(TypeWithAnnotations.Create(candidateType));
Binder\Binder_Operators.cs (1)
2522TypeSymbol pointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(operandType));
Binder\Binder_Patterns.cs (2)
332declType: TypeWithAnnotations.Create(narrowedType, NullableAnnotation.NotAnnotated), 933return TypeWithAnnotations.Create(inputType.StrippedType(), NullableAnnotation.NotAnnotated);
Binder\Binder_Query.cs (1)
817new AnonymousTypeField(fieldName, fieldValue.Syntax.Location, TypeWithAnnotations.Create(TypeOrError(fieldValue)), RefKind.None, ScopedKind.None);
Binder\Binder_Statements.cs (5)
1026declTypeOpt = TypeWithAnnotations.Create(initializerType); 1031declTypeOpt = TypeWithAnnotations.Create(CreateErrorType("var")); 1046declTypeOpt = TypeWithAnnotations.Create(CreateErrorType("var")); 1374TypeSymbol pointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(elementType)); 1479return op1.SetInferredTypeWithAnnotations(TypeWithAnnotations.Create(inferredType));
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\Binder_TupleOperators.cs (1)
410elementTypesWithAnnotations: convertedTypes.SelectAsArray(t => TypeWithAnnotations.Create(t)),
Binder\ForEachLoopBinder.cs (7)
288declType = inferredType.HasType ? inferredType : TypeWithAnnotations.Create(CreateErrorType("var")); 348iterationVariableType = inferredType.HasType ? inferredType : TypeWithAnnotations.Create(CreateErrorType("var")); 627inferredType = TypeWithAnnotations.Create(DynamicTypeSymbol.Instance); 635inferredType = TypeWithAnnotations.Create(GetSpecialType(SpecialType.System_Char, diagnostics, collectionExpr.Syntax)); 988builder.ElementTypeWithAnnotations = builder.CurrentPropertyGetter?.ReturnTypeWithAnnotations ?? TypeWithAnnotations.Create(GetSpecialType(SpecialType.System_Object, diagnostics, errorLocationSyntax)); 1080builder.ElementTypeWithAnnotations = TypeWithAnnotations.Create( 1088TypeWithAnnotations.Create(GetSpecialType(SpecialType.System_Char, diagnostics, _syntax)) :
Binder\InContainerBinder.cs (1)
94return TypeWithAnnotations.Create(this.Compilation.GetSpecialType(SpecialType.System_Object));
Binder\InMethodBinder.cs (2)
139return !elementType.IsDefault ? elementType : TypeWithAnnotations.Create(CreateErrorType()); 160return TypeWithAnnotations.Create(objectType);
Binder\Semantics\Conversions\Conversions.cs (2)
320TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Object), customModifiers: parameter.TypeWithAnnotations.CustomModifiers), parameter.RefCustomModifiers, parameter.IsParams, parameter.RefKind); 392var sourceAsPointer = new PointerTypeSymbol(TypeWithAnnotations.Create(sourceExpression.ElementType));
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (1)
583var voidPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(Compilation.GetSpecialType(SpecialType.System_Void)));
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);
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1268TypeWithAnnotations.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)
503: 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))); 723returnType = TypeWithAnnotations.Create(Binder.Compilation.GetSpecialType(SpecialType.System_Void)); 924? TypeWithAnnotations.Create(this.Binder.Compilation.GetSpecialType(SpecialType.System_Void)) 925: TypeWithAnnotations.Create(LambdaSymbol.InferenceFailureReturnType); 1174returnType = TypeWithAnnotations.Create(t);
BoundTree\VariablePendingInference.cs (1)
45type = TypeWithAnnotations.Create(binderOpt!.CreateErrorType("var"));
CodeGen\EmitArrayInitializer.cs (1)
663arrayType = arrayType.WithElementType(TypeWithAnnotations.Create(elementType.EnumUnderlyingTypeOrSelf()));
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));
Compiler\MethodBodySynthesizer.cs (1)
430tmps[i] = new SynthesizedLocal(accessor, TypeWithAnnotations.Create(delegateType), SynthesizedLocalKind.LoweringTemp);
Emitter\Model\NamedTypeSymbolAdapter.cs (1)
483var type = TypeWithAnnotations.Create(@interface);
Emitter\Model\PEModuleBuilder.cs (2)
1614var byteArrayType = ArrayTypeSymbol.CreateSZArray(byteType.ContainingAssembly, TypeWithAnnotations.Create(byteType)); 1700var boolArray = ArrayTypeSymbol.CreateSZArray(booleanType.ContainingAssembly, TypeWithAnnotations.Create(booleanType));
Emitter\NoPia\EmbeddedType.cs (1)
137var type = TypeWithAnnotations.Create(@interface);
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);
FlowAnalysis\NullableWalker_Patterns.cs (4)
438outputSlot = makeDagTempSlot(TypeWithAnnotations.Create(e.Type, NullableAnnotation.NotAnnotated), output); 648inferredType = TypeWithAnnotations.Create(inferredType.Type, existingType.NullableAnnotation.Join(inferredType.NullableAnnotation)); 799var type = TypeWithAnnotations.Create(t, NullableAnnotation.Annotated); 912var inferredTypeWithAnnotations = TypeWithAnnotations.Create(inferredType);
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\ClosureConversion\ClosureConversion.cs (3)
651var frameTypeParameters = ImmutableArray.Create(_currentTypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t)), 0, frame.Arity); 655LocalSymbol framePointer = new SynthesizedLocal(_topLevelMethod, TypeWithAnnotations.Create(frameType), SynthesizedLocalKind.LambdaDisplayClass, frame.ScopeSyntaxOpt); 1010var realTypeArguments = ImmutableArray.Create(_currentTypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t)), 0, totalTypeArgumentCount - originalMethod.Arity);
Lowering\ClosureConversion\LambdaCapturedVariable.cs (1)
44return new LambdaCapturedVariable(frame, TypeWithAnnotations.Create(type), fieldName, IsThis(captured));
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)
374var operandType = new PointerTypeSymbol(TypeWithAnnotations.Create(_factory.SpecialType(SpecialType.System_Void)));
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
97var 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\MethodToClassRewriter.cs (1)
112newLocal = new TypeSubstitutedLocalSymbol(local, TypeWithAnnotations.Create(newType), CurrentMethod);
Lowering\StateMachineRewriter\StateMachineFieldSymbol.cs (1)
42this(stateMachineType, TypeWithAnnotations.Create(type), name, slotDebugInfo, slotIndex, isPublic)
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);
Operations\CSharpOperationFactory.cs (1)
1967TypeWithAnnotations.Create(((CSharpCompilation)_semanticModel.Compilation).GetSpecialType(SpecialType.System_Boolean)),
Symbols\AbstractTypeMap.cs (2)
124return TypeWithAnnotations.Create(result); 180return TypeWithAnnotations.Create(typeParameter);
Symbols\AbstractTypeParameterMap.cs (1)
36return TypeWithAnnotations.Create(typeParameter);
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (2)
231var original = TypeWithAnnotations.Create(genericFieldTypes[index].Type); 233var 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)
60new SynthesizedDelegateInvokeMethod.ParameterDescription(TypeWithAnnotations.Create(typeParams[i]), refKinds.IsNull ? RefKind.None : refKinds[i], ScopedKind.None, defaultValue: null, isParams: false, hasUnscopedRefAttribute: false)); 64var returnType = TypeWithAnnotations.Create(voidReturnTypeOpt ?? typeParams[parameterCount]); 126var type = TypeWithAnnotations.Create(typeParams[i]); 131type = TypeWithAnnotations.Create(ArrayTypeSymbol.CreateSZArray(containingType.ContainingAssembly, type)); 139var 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)
730return ArrayTypeSymbol.CreateCSharpArray(this, TypeWithAnnotations.Create(symbol), rank); 740return new PointerTypeSymbol(TypeWithAnnotations.Create(symbol)); 843typeArgumentSymbols.Add(TypeWithAnnotations.Create(argSymbol));
Symbols\Compilation_WellKnownMembers.cs (2)
761var boolArray = ArrayTypeSymbol.CreateSZArray(booleanType.ContainingAssembly, TypeWithAnnotations.Create(booleanType)); 778var stringArray = ArrayTypeSymbol.CreateSZArray(stringType.ContainingAssembly, TypeWithAnnotations.Create(stringType));
Symbols\ErrorMethodSymbol.cs (1)
165get { return TypeWithAnnotations.Create(_returnType); }
Symbols\ErrorPropertySymbol.cs (1)
36_typeWithAnnotations = TypeWithAnnotations.Create(type);
Symbols\ErrorTypeSymbol.cs (1)
42return TypeWithAnnotations.Create(typeMap.SubstituteNamedType(this));
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (3)
33returnType = TypeWithAnnotations.Create(typeBinder.CreateErrorType()); 546var returnType = TypeWithAnnotations.Create(retInfo.Type, customModifiers: CSharpCustomModifier.Convert(retInfo.CustomModifiers)); 566var 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)
316var type = TypeWithAnnotations.Create(typeSymbol, customModifiers: customModifiersArray); 335type = TypeWithAnnotations.Create(new PointerTypeSymbol(TypeWithAnnotations.Create(fixedElementType)));
Symbols\Metadata\PE\PENamedTypeSymbol.cs (2)
509baseType = (NamedTypeSymbol)NullableTypeDecoder.TransformType(TypeWithAnnotations.Create(decodedType), _handle, moduleSymbol, accessSymbol: this, nullableContext: this).Type; 569typeSymbol = NullableTypeDecoder.TransformType(TypeWithAnnotations.Create(typeSymbol), interfaceImpl, moduleSymbol, accessSymbol: this, nullableContext: this).Type;
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
375var typeWithModifiers = TypeWithAnnotations.Create(type, customModifiers: CSharpCustomModifier.Convert(customModifiers));
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
236var propertyTypeWithAnnotations = TypeWithAnnotations.Create(originalPropertyType, customModifiers: typeCustomModifiers);
Symbols\Metadata\PE\PETypeParameterSymbol.cs (1)
302var 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)
844return Construct(typeArguments.SelectAsArray(a => TypeWithAnnotations.Create(a)));
Symbols\NamedTypeSymbol.cs (1)
1182modifiedArguments = 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)
184builder.Add(TypeWithAnnotations.Create(ErrorTypeSymbol.UnknownResultType)); 227(t, tp) => t.HasType ? t : TypeWithAnnotations.Create(tp));
Symbols\Retargeting\RetargetingPropertySymbol.cs (1)
72type = TypeWithAnnotations.Create(asDynamic);
Symbols\Source\GlobalExpressionVariable.cs (1)
112type = TypeWithAnnotations.Create(binder.CreateErrorType("var"));
Symbols\Source\IndexedTypeParameterSymbol.cs (1)
113builder.Add(TypeWithAnnotations.Create(GetTypeParameter(i), NullableAnnotation.Ignored));
Symbols\Source\LambdaSymbol.cs (2)
60_returnType = !returnType.HasType ? TypeWithAnnotations.Create(ReturnTypeIsBeingInferred) : returnType; 351type = 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)
60_lazyReturnType = TypeWithAnnotations.Create(bodyBinder.GetSpecialType(SpecialType.System_Void, diagnostics, syntax));
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\SourceDestructorSymbol.cs (1)
73_lazyReturnType = TypeWithAnnotations.Create(bodyBinder.GetSpecialType(SpecialType.System_Void, diagnostics, syntax));
Symbols\Source\SourceEnumConstantSymbol.cs (1)
63return TypeWithAnnotations.Create(this.ContainingType);
Symbols\Source\SourceEventAccessorSymbol.cs (4)
120_lazyReturnType = TypeWithAnnotations.Create(eventTokenType); 133_lazyReturnType = TypeWithAnnotations.Create(voidType); 136var parameter = new SynthesizedAccessorValueParameterSymbol(this, TypeWithAnnotations.Create(eventTokenType), 0); 147_lazyReturnType = TypeWithAnnotations.Create(voidType);
Symbols\Source\SourceLocalSymbol.cs (4)
372declType = TypeWithAnnotations.Create(typeBinder.CreateErrorType("var")); 546return TypeWithAnnotations.Create(initializerOpt?.Type); 682return TypeWithAnnotations.Create(_nodeBinder.CreateErrorType()); 797SetTypeWithAnnotations(TypeWithAnnotations.Create(_nodeBinder.CreateErrorType("var")));
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\Source\SourceMemberFieldSymbol.cs (4)
469type = TypeWithAnnotations.Create(tokenTableType.Construct(ImmutableArray.Create(@event.TypeWithAnnotations))); 541type = TypeWithAnnotations.Create(initializerOpt.Type); 550type = TypeWithAnnotations.Create(binder.CreateErrorType("var")); 557type = TypeWithAnnotations.Create(new PointerTypeSymbol(type));
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (1)
348return 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)
33=> TypeWithAnnotations.Create(_containingType, NullableAnnotation.NotAnnotated);
Symbols\SymbolExtensions.cs (1)
524returnType = TypeWithAnnotations.Create((TypeSymbol)symbol);
Symbols\Synthesized\Records\SynthesizedRecordBaseEquals.cs (2)
36return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 39TypeWithAnnotations.Create(ContainingType.BaseTypeNoUseSiteDiagnostics, NullableAnnotation.Annotated),
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (1)
42return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Void, location, diagnostics)),
Symbols\Synthesized\Records\SynthesizedRecordEqualityContractProperty.cs (1)
76return (TypeWithAnnotations.Create(Binder.GetWellKnownType(DeclaringCompilation, WellKnownType.System_Type, diagnostics, Location), NullableAnnotation.NotAnnotated),
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperatorBase.cs (3)
69return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 72TypeWithAnnotations.Create(ContainingType, annotation), 75TypeWithAnnotations.Create(ContainingType, annotation),
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (2)
41return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 44TypeWithAnnotations.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)
93return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_Boolean, location, diagnostics)), 96TypeWithAnnotations.Create(Binder.GetWellKnownType(compilation, WellKnownType.System_Text_StringBuilder, diagnostics, location), annotation),
Symbols\Synthesized\Records\SynthesizedRecordToString.cs (1)
44return (ReturnType: TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_String, location, diagnostics), annotation),
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)); 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\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)
205get { return TypeWithAnnotations.Create(_returnType); }
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)
228return TypeWithAnnotations.Create(_returnType); 468) : 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)
65TypeWithAnnotations.Create( 67TypeWithAnnotations.Create(Binder.GetSpecialType(compilation, SpecialType.System_String, NoLocation.Singleton, diagnostics)))), 0, RefKind.None, "args")); 158return 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\SynthesizedThrowIfNullMethod.cs (2)
22SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(argumentParamType), ordinal: 0, RefKind.None, "argument"), 23SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(paramNameParamType), ordinal: 1, RefKind.None, "paramName")));
Symbols\Synthesized\SynthesizedThrowMethod.cs (1)
18this.SetParameters(ImmutableArray.Create<ParameterSymbol>(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(paramType), 0, RefKind.None, "paramName")));
Symbols\Synthesized\SynthesizedThrowSwitchExpressionExceptionMethod.cs (1)
19this.SetParameters(ImmutableArray.Create(SynthesizedParameterSymbol.Create(this, TypeWithAnnotations.Create(paramType), 0, RefKind.None, "unmatchedValue")));
Symbols\Tuples\TupleTypeSymbol.cs (1)
250var chainedTypes = ImmutableArray.Create(elementTypes, (loop - 1) * (ValueTupleRestPosition - 1), ValueTupleRestPosition - 1).Add(TypeWithAnnotations.Create(currentSymbol));
Symbols\TypeMap.cs (3)
28return typeParameters.SelectAsArray(static (tp) => TypeWithAnnotations.Create(tp)); 33return typeParameters.SelectAsArray(static (tp) => TypeWithAnnotations.Create(tp, NullableAnnotation.Ignored)); 130result.Mapping.Add(tp, TypeWithAnnotations.Create(newTp));
Symbols\TypeSymbolExtensions.cs (2)
1866typeWithAnnotations = TypeWithAnnotations.Create(type, customModifiers: typeWithAnnotations.CustomModifiers); 1890typeArgumentsBuilder[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)
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);
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)
7660CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string), refCustomModifiers: default, 7664CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string), refCustomModifiers: default, 7669CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string, customModifiers: ImmutableArray.Create(testMod)), refCustomModifiers: default, 7673CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string), refCustomModifiers: ImmutableArray.Create(testMod), 7745CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string), refCustomModifiers: default, 7749CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string), refCustomModifiers: default, 7754CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string, customModifiers: ImmutableArray.Create(testMod)), refCustomModifiers: default, 7758CallingConvention.Unmanaged, TypeWithAnnotations.Create(@string), refCustomModifiers: ImmutableArray.Create(testMod),
CodeGen\CodeGenTupleTest.cs (6)
13706Add(TypeWithAnnotations.Create(NamedTypeSymbol.CreateTuple(m1Tuple, 13762Add(TypeWithAnnotations.Create(NamedTypeSymbol.CreateTuple(m1Tuple, 13823Add(TypeWithAnnotations.Create(NamedTypeSymbol.CreateTuple(m1Tuple, 29027var obliviousObject = TypeWithAnnotations.Create(@object, NullableAnnotation.Oblivious); 29044var nullableObject = TypeWithAnnotations.Create(@object, NullableAnnotation.Annotated); 29045var nonNullableObject = TypeWithAnnotations.Create(@object, NullableAnnotation.NotAnnotated);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (14)
Attributes\AttributeTests.cs (14)
5196var typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(classW)); 5201typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(classW), rank: 2); 5206typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(classW)); 5207typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(typeArg), rank: 2); 5212NamedTypeSymbol classYOfW = classY.ConstructIfGeneric(ImmutableArray.Create(TypeWithAnnotations.Create(classW))); 5213typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(classYOfW), rank: 2); 5214typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(typeArg)); 5219NamedTypeSymbol classYOfInt = classY.ConstructIfGeneric(ImmutableArray.Create(TypeWithAnnotations.Create(m.ContainingAssembly.GetSpecialType(SpecialType.System_Int32)))); 5221typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(substNestedF), rank: 3); 5222typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(typeArg)); 5223typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(typeArg), rank: 2); 5228NamedTypeSymbol substNestedZ = classYOfInt.GetTypeMember("Z").ConstructIfGeneric(ImmutableArray.Create(TypeWithAnnotations.Create(classW))); 5229typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(substNestedZ)); 5230typeArg = ArrayTypeSymbol.CreateCSharpArray(m.ContainingAssembly, TypeWithAnnotations.Create(typeArg), rank: 2);
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (9)
CSharpEESymbolProvider.cs (1)
44type = new PointerTypeSymbol(TypeWithAnnotations.Create(info.Type));
CSharpInstructionDecoder.cs (1)
123ImmutableArray.CreateRange(typeArguments, 0, methodArgumentStartIndex, t => TypeWithAnnotations.Create(t)));
Rewriters\LocalDeclarationRewriter.cs (1)
140TypeWithAnnotations.Create(compilation.GetSpecialType(SpecialType.System_Byte)));
Symbols\EEDisplayClassFieldLocalSymbol.cs (1)
57get { return TypeWithAnnotations.Create(_variable.Type); }
Symbols\EELocalConstantSymbol.cs (1)
25: this(method, name, TypeWithAnnotations.Create(type), value)
Symbols\EELocalSymbol.cs (1)
40: this(method, locations, nameOpt, ordinal, declarationKind, TypeWithAnnotations.Create(type), refKind, isPinned, isCompilerGenerated, canScheduleToStack)
Symbols\EEMethodSymbol.cs (1)
476_lazyReturnType = TypeWithAnnotations.Create(CalculateReturnType(compilation, body));
Symbols\PlaceholderLocalSymbol.cs (1)
32_type = TypeWithAnnotations.Create(type);
Symbols\PlaceholderMethodSymbol.cs (1)
41_returnType = TypeWithAnnotations.Create(getReturnType(this));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (44)
Semantics\DelegateTypeTests.cs (4)
12256var funcOfObjectNullable = funcOfT.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(objectType, NullableAnnotation.Annotated))); 12257var funcOfStringNullable = funcOfT.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(stringType, NullableAnnotation.Annotated))); 12258var funcOfStringNotNullable = funcOfT.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(stringType, NullableAnnotation.NotAnnotated))); 12274var setNotNullable = (TypeWithAnnotations type) => TypeWithAnnotations.Create(type.Type, NullableAnnotation.NotAnnotated);
Semantics\InterpolationTests.cs (1)
7575var substitutedC = c.WithTypeArguments(ImmutableArray.Create(TypeWithAnnotations.Create(handler)));
Semantics\NullableReferenceTypesTests.cs (31)
13196Assert.False(member.ReturnTypeWithAnnotations.Equals(member.OverriddenMethod.ConstructIfGeneric(member.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).ReturnTypeWithAnnotations, 13314var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 13322var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 13401var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 13676Assert.False(m1.Parameters[0].TypeWithAnnotations.Equals(m1.OverriddenMethod.ConstructIfGeneric(m1.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).Parameters[0].TypeWithAnnotations, 14016Assert.False(member.ReturnTypeWithAnnotations.Equals(member.OverriddenMethod.ConstructIfGeneric(member.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).ReturnTypeWithAnnotations, 14021Assert.True(m3.ReturnTypeWithAnnotations.Equals(m3.OverriddenMethod.ConstructIfGeneric(m3.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).ReturnTypeWithAnnotations, 14123Assert.False(member.Parameters[0].TypeWithAnnotations.Equals(member.OverriddenMethod.ConstructIfGeneric(member.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).Parameters[0].TypeWithAnnotations, 14128Assert.True(m3.Parameters[0].TypeWithAnnotations.Equals(m3.OverriddenMethod.ConstructIfGeneric(m3.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))).Parameters[0].TypeWithAnnotations, 16473var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 16481var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 17694var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 17702var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 17762var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 17770var implemented = member.ConstructIfGeneric(implementing.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 17838var m1Def = m1.ConstructIfGeneric(m1Impl.TypeParameters.SelectAsArray(t => TypeWithAnnotations.Create(t))); 109385m1.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(a, NullableAnnotation.Annotated))), 109386m1.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(a, NullableAnnotation.NotAnnotated))), 109387m1.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(a, NullableAnnotation.Oblivious))) 109392m1.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(a, NullableAnnotation.Annotated))), 109393m1.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(a, NullableAnnotation.NotAnnotated))), 109394m1.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(a, NullableAnnotation.Oblivious))) 112067var c2 = cDefinition.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(cDefinition.TypeParameters.Single(), NullableAnnotation.NotAnnotated))); 112079var c3 = cDefinition.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(cDefinition.TypeParameters.Single(), NullableAnnotation.Annotated))); 112109var i1 = iDefinition.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(iDefinition.TypeParameters.Single(), NullableAnnotation.Annotated))); 112118var c2 = cDefinition.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(cDefinition.TypeParameters.Single(), NullableAnnotation.NotAnnotated))); 112130var i2b = i2.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(iDefinition.TypeParameters.Single(), NullableAnnotation.Annotated))); 112135var i2c = i2.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(i2.TypeParameters.Single(), NullableAnnotation.Annotated))); 112139var c3 = cDefinition.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(cDefinition.TypeParameters.Single(), NullableAnnotation.Annotated))); 112144var i3b = i3.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(i3.TypeParameters.Single(), NullableAnnotation.Annotated))); 112150var c4 = cDefinition.Construct(ImmutableArray.Create(TypeWithAnnotations.Create(cDefinition.TypeParameters.Single(), customModifiers: modifiers)));
Semantics\RawInterpolationTests_Handler.cs (1)
5894var substitutedC = c.WithTypeArguments(ImmutableArray.Create(TypeWithAnnotations.Create(handler)));
Semantics\UnsafeTests.cs (7)
5015var structPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(structType)); 5328var intPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(intType)); 5395var intPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(intType)); 5453var intPointerType = new PointerTypeSymbol(TypeWithAnnotations.Create(intType)); 7382var charPointerSymbol = new PointerTypeSymbol(TypeWithAnnotations.Create(charSymbol)); 7454var charPointerSymbol = new PointerTypeSymbol(TypeWithAnnotations.Create(charSymbol)); 7456var voidPointerSymbol = new PointerTypeSymbol(TypeWithAnnotations.Create(voidSymbol));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (45)
Symbols\CompilationCreationTests.cs (1)
96var arrayOfc107 = ArrayTypeSymbol.CreateCSharpArray(c1.Assembly, TypeWithAnnotations.Create(c107));
Symbols\ExtensionMethodTests.cs (4)
2534var arrayType = ArrayTypeSymbol.CreateCSharpArray(compilation.Assembly, TypeWithAnnotations.Create(stringType), 1); 2548ImmutableArray.Create(TypeWithAnnotations.Create(intType)), 2557ImmutableArray.Create(TypeWithAnnotations.Create(intType), TypeWithAnnotations.Create(arrayType)),
Symbols\FunctionPointerTypeSymbolTests.cs (6)
2048TypeWithAnnotations.Create(returnType, customModifiers: customModifiers), 2057TypeWithAnnotations.Create(returnType), 2115TypeWithAnnotations.Create(returnType, customModifiers: customModifiers), 2124TypeWithAnnotations.Create(returnType), 2174TypeWithAnnotations.Create(returnType, customModifiers: typeCustomModifiers), 2183TypeWithAnnotations.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));