130 references to Type
Microsoft.CodeAnalysis.CSharp (130)
Binder\Binder.ValueChecks.cs (1)
3227Debug.Assert(field.Type != (object)null);
Binder\Binder_Attributes.cs (2)
574lvalue = new BoundFieldAccess(nameSyntax, null, fieldSymbol, ConstantValue.NotAvailable, resultKind, fieldSymbol.Type); 630namedArgumentType = fieldSymbol.Type;
Binder\Binder_Conversions.cs (1)
481CheckInlineArrayTypeIsSupported(syntax, source.Type, elementField.Type, diagnostics);
Binder\Binder_Expressions.cs (4)
5873if (isRhsNestedInitializer && fieldSymbol.IsReadOnly && fieldSymbol.Type.IsValueType) 5878Error(diagnostics, ErrorCode.ERR_ReadonlyValueTypeInObjectInitializer, leftSyntax, fieldSymbol, fieldSymbol.Type); 9182CheckInlineArrayTypeIsSupported(node, expr.Type, elementField.Type, diagnostics); 9203resultType = elementField.Type;
Binder\Binder_Patterns.cs (1)
1531FieldSymbol field => field.Type,
Binder\DecisionDagBuilder.cs (1)
565var element = new BoundDagTemp(syntax, field.Type, evaluation);
Binder\ForEachLoopBinder.cs (1)
887CheckInlineArrayTypeIsSupported(collectionExpr.Syntax, collectionExpr.Type, elementField.Type, diagnostics);
Binder\PatternExplainer.cs (2)
479var elementTemp = new BoundDagTemp(e.Syntax, e.Field.Type, e); 566var subInput = new BoundDagTemp(e.Syntax, e.Field.Type, e);
BoundTree\BoundInlineArrayAccess.cs (1)
70Debug.Assert(Type.Equals(Expression.Type?.TryGetInlineArrayElementField()?.Type, TypeCompareKind.ConsiderEverything));
BoundTree\Constructors.cs (1)
20: this(syntax, receiver, fieldSymbol, constantValueOpt, LookupResultKind.Viable, fieldSymbol.Type, hasErrors)
CodeGen\EmitExpression.cs (3)
1146EmitLoadIndirect(field.Type, fieldAccess.Syntax); 1170TypeSymbol fieldType = field.Type; 3286EmitIndirectStore(field.Type, fieldAccess.Syntax);
Compilation\SyntaxTreeSemanticModel.cs (1)
380result = fieldSymbol.Type;
Compiler\AnonymousTypeMethodBodySynthesizer.cs (1)
268type: property.BackingField.Type), manager.System_Object__ToString),
Compiler\ClsComplianceChecker.cs (1)
721type = ((FieldSymbol)symbol).Type;
Compiler\MethodBodySynthesizer.cs (4)
133hostObjectField.Type 135hostObjectField.Type) 142var targetScriptType = (ImplicitNamedTypeSymbol)field.Type; 242NamedTypeSymbol fieldType = (NamedTypeSymbol)field.Type;
Compiler\MethodCompiler.cs (2)
1679awaiters[index] = moduleBuilder.EncTranslateLocalVariableType(field.Type, diagnostics.DiagnosticBag); 1691hoistedVariables[index] = new EncHoistedLocalInfo(field.SlotDebugInfo, moduleBuilder.EncTranslateLocalVariableType(field.Type, diagnostics.DiagnosticBag));
Emitter\EditAndContinue\CSharpDefinitionMap.cs (2)
83awaiters[(Cci.ITypeReference)field.Type.GetCciAdapter()] = slotIndex; 105var key = new EncHoistedLocalInfo(localSlotDebugInfo[slotIndex], (Cci.ITypeReference)field.Type.GetCciAdapter());
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (2)
588return _comparer.Equals(field.Type, other.Type);
Emitter\Model\AttributeDataAdapter.cs (1)
167type = fieldSymbol.Type;
Emitter\Model\FieldSymbolAdapter.cs (1)
162return ((PEModuleBuilder)context.Module).CreateConstant(AdaptedFieldSymbol.Type, AdaptedFieldSymbol.ConstantValue,
FlowAnalysis\DefiniteAssignment.cs (7)
478if (_emptyStructTypeCache.IsEmptyStructType(field.Type)) continue; 858read: read && WriteConsideredUse(field.Type, value), 970read: value == null || WriteConsideredUse(fieldAccess.FieldSymbol.Type, value), 999_sourceAssembly.NoteFieldAccess(field, read: value == null || WriteConsideredUse(associatedField.Type, value), write: true); 1265if (_emptyStructTypeCache.IsEmptyStructType(field.Type)) 1702if (_emptyStructTypeCache.IsEmptyStructType(field.Type)) continue; 2663MarkFieldsUsed(field.Type);
FlowAnalysis\EmptyStructTypeCache.cs (2)
147var actualFieldType = field.Type; 205return (field.IsFixedSizeBuffer || ShouldIgnoreStructField(field, field.Type)) ? null : field.AsMember(type);
FlowAnalysis\FlowAnalysisPass.cs (1)
145F.Default(field.Type))));
FlowAnalysis\LocalDataFlowPass.cs (1)
197containingType = restField.Type;
FlowAnalysis\NullableWalker.cs (7)
3604originalField.Type.Equals(updatedField.Type, TypeCompareKind.AllNullableIgnoreOptions | TypeCompareKind.IgnoreTupleNames) && oi == ui, 8576TrackNullableStateOfTupleConversion(conversionOpt, convertedNode, conversion, targetField.Type, valueField.Type, targetFieldSlot, valueFieldSlot, assignmentKind, parameterOpt, reportWarnings); 8584if (AreNullableAndUnderlyingTypes(targetField.Type, valueField.Type, out _)) 8593TrackNullableStateOfNullableValue(targetFieldSlot, targetField.Type, null, valueField.TypeWithAnnotations.ToTypeWithState(), valueFieldSlot);
FlowAnalysis\NullableWalker_Patterns.cs (1)
203LearnFromAnyNullPatterns(GetOrCreateSlot(element, inputSlot), element.Type, item.Pattern);
Lowering\AsyncRewriter\AsyncIteratorMethodToStateMachineRewriter.cs (2)
150return F.Assignment(F.InstanceField(currentField), F.Default(currentField.Type)); 335bool isManaged = field.Type.IsManagedType(ref useSiteInfo);
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (5)
273var isManagedType = hoistedLocal.Type.IsManagedType(ref useSiteInfo); 280builder.Add(F.Assignment(F.Field(F.This(), hoistedLocal), F.NullOrDefault(hoistedLocal.Type))); 486(TypeSymbol.Equals(awaiterField.Type, awaiterTemp.Type, TypeCompareKind.ConsiderEverything2)) 518TypeSymbol.Equals(awaiterTemp.Type, awaiterField.Type, TypeCompareKind.ConsiderEverything2) 523F.Assignment(F.Field(F.This(), awaiterField), F.NullOrDefault(awaiterField.Type)));
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (14)
299.Construct(_currentField.Type); 304var promiseType = (NamedTypeSymbol)_promiseOfValueOrEndField.Type; 379.SymbolAsMember((NamedTypeSymbol)_promiseOfValueOrEndField.Type); 401.AsMember((NamedTypeSymbol)_promiseOfValueOrEndField.Type); 479.Construct(_currentField.Type); 505.AsMember((NamedTypeSymbol)_promiseOfValueOrEndField.Type); 530.AsMember((NamedTypeSymbol)_promiseOfValueOrEndField.Type); 556.AsMember((NamedTypeSymbol)_promiseOfValueOrEndField.Type); 583.AsMember((NamedTypeSymbol)_promiseOfValueOrEndField.Type); 607.AsMember((NamedTypeSymbol)_promiseOfValueOrEndField.Type); 629.AsMember((NamedTypeSymbol)_promiseOfValueOrEndField.Type); 652.Construct(_currentField.Type); 686setResultMethod = (MethodSymbol)setResultMethod.SymbolAsMember((NamedTypeSymbol)_promiseOfValueOrEndField.Type); 692setExceptionMethod = (MethodSymbol)setExceptionMethod.SymbolAsMember((NamedTypeSymbol)_promiseOfValueOrEndField.Type);
Lowering\ClosureConversion\ClosureConversion.cs (2)
694BoundExpression right = FrameOfType(syntax, frameParent.Type as NamedTypeSymbol); 700Debug.Assert(capturedFrame.Type.IsReferenceType); // Make sure we're not accidentally capturing a struct by value
Lowering\DiagnosticsPass_Warnings.cs (1)
89if (IsNonAgileFieldAccess(fieldAccess, _compilation) && !fieldSymbol.Type.IsReferenceType)
Lowering\InitializerRewriter.cs (1)
105field.Type,
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.cs (1)
172var stateLocal = F.SynthesizedLocal(stateField.Type);
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (2)
143var outputTemp = new BoundDagTemp(f.Syntax, field.Type, f); 145BoundExpression access = _localRewriter.MakeFieldAccess(f.Syntax, input, field, null, LookupResultKind.Viable, field.Type);
Lowering\LocalRewriter\LocalRewriter_Event.cs (1)
237NamedTypeSymbol fieldType = (NamedTypeSymbol)fieldSymbol.Type;
Lowering\LocalRewriter\LocalRewriter_Field.cs (3)
63return _factory.BadExpression(tupleField.Type); 69return new BoundDefaultExpression(syntax, tupleField.Type); 80return _factory.BadExpression(tupleField.Type);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
785elementRef = elementRef.Construct(inlineArrayType, inlineArrayType.TryGetInlineArrayElementField()!.Type);
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (3)
335return createSpan.Construct(node.Expression.Type, node.Expression.Type.TryGetInlineArrayElementField()!.Type); 362elementRef = elementRef.Construct(node.Expression.Type, node.Expression.Type.TryGetInlineArrayElementField()!.Type); 381elementRef = elementRef.Construct(node.Expression.Type, node.Expression.Type.TryGetInlineArrayElementField()!.Type);
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (1)
676return MakeFieldAccess(rewrittenLeft.Syntax, rewrittenReceiver, fieldSymbol, null, rewrittenLeft.ResultKind, fieldSymbol.Type);
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (2)
649var nullCallSite = _factory.Null(callSiteField.Type); 655callSiteField.Type);
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (4)
437bool isManaged = field.Type.IsManagedType(ref useSiteInfo); 441cleanup.Add(F.AssignmentExpression(F.Field(F.This(), field), F.NullOrDefault(field.Type))); 495if (_lazyAvailableReusableHoistedFields == null || !_lazyAvailableReusableHoistedFields.TryGetValue(field.Type, out fields)) 502_lazyAvailableReusableHoistedFields.Add(field.Type, fields = new ArrayBuilder<StateMachineFieldSymbol>());
Lowering\SyntheticBoundNodeFactory.cs (2)
167return new BoundHoistedFieldAccess(Syntax, field, field.Type); 243return new BoundFieldAccess(Syntax, receiver, f, ConstantValue.NotAvailable, LookupResultKind.Viable, f.Type) { WasCompilerGenerated = true };
Operations\CSharpOperationFactory.cs (1)
2902createReceiver(), _semanticModel, nameSyntax, type: field.Type.GetPublicSymbol(), constantValue, isImplicit: false);
Symbols\BaseTypeAnalysis.cs (1)
260field.HasPointerType ? null : field.Type;
Symbols\Compilation_WellKnownMembers.cs (1)
1087return field.Type;
Symbols\ConstantValueUtils.cs (1)
49var value = GetAndValidateConstantValue(boundValue.Value, symbol, symbol.Type, equalsValueNode.Value, diagnostics);
Symbols\FieldSymbol.cs (3)
142get { return this.IsConst && (this.Type.SpecialType != SpecialType.System_Decimal); } 293return this.Type.IsPointerOrFunctionPointer(); 506ITypeSymbolInternal IFieldSymbolInternal.Type => Type;
Symbols\Metadata\PE\PEEventSymbol.cs (1)
164TypeSymbol candidateAssociatedFieldType = candidateAssociatedField.Type;
Symbols\Metadata\PE\PEFieldSymbol.cs (3)
495if (this.Type.SpecialType == SpecialType.System_Decimal) 602return this.Type.SpecialType == SpecialType.System_Decimal && 637(IsFixedSizeBuffer || Type.IsRefLikeOrAllowsRefLikeType()))
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (1)
274if (this.Type.SpecialType == SpecialType.System_Decimal)
Symbols\Source\SourceAssemblySymbol.cs (1)
2749diagnostics.Add(ErrorCode.WRN_UnassignedInternalField, field.GetFirstLocationOrNone(), field, DefaultValue(field.Type));
Symbols\Source\SourceFieldSymbol.cs (1)
144if (compilation.ShouldEmitNativeIntegerAttributes(Type))
Symbols\Source\SourceFixedFieldSymbol.cs (4)
47var item1 = new TypedConstant(systemType, TypedConstantKind.Type, ((PointerTypeSymbol)this.Type).PointedAtType); 109TypeSymbol elementType = ((PointerTypeSymbol)this.Type).PointedAtType; 160_internalField = new SynthesizedFieldSymbol(this, ((PointerTypeSymbol)field.Type).PointedAtType, FixedElementFieldName, isPublic: true); 183var elementType = ((PointerTypeSymbol)_field.Type).PointedAtType;
Symbols\Source\SourceMemberContainerSymbol.cs (4)
2699if (f is null || !f.IsStatic || f.Type.TypeKind != TypeKind.Struct) continue; 2700var type = (NamedTypeSymbol)f.Type; 2728if (f is null || !f.IsStatic || f.Type.TypeKind != TypeKind.Struct) continue; 2729var type = (NamedTypeSymbol)f.Type;
Symbols\Source\SourceMemberFieldSymbol.cs (3)
112&& this.Type.SpecialType == SpecialType.System_Decimal) 136if (IsConst && Type.SpecialType == SpecialType.System_Decimal && 654Type.CheckAllConstraints(DeclaringCompilation, conversions, ErrorLocation, diagnostics);
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1441static (m, systemType) => m is FieldSymbol { Type: ArrayTypeSymbol { ElementType: NamedTypeSymbol elementType } } && elementType.Equals(systemType, TypeCompareKind.ConsiderEverything),
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (4)
262private bool IsSingleElement => _field.Type.IsTypeParameter(); 263private bool IsArray => _field.Type.IsArray(); 773Debug.Assert(_field.Type.OriginalDefinition.Equals(symbol.ContainingType, TypeCompareKind.AllIgnoreOptions)); 775return symbol.SymbolAsMember((NamedTypeSymbol)_field.Type);
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (1)
69FieldSymbol field => field.Type,
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
138var parameterType = f.Type;
Symbols\Synthesized\SynthesizedFieldSymbolBase.cs (1)
78compilation.SynthesizeTupleNamesAttribute(Type));