111 references to Type
Microsoft.CodeAnalysis.CSharp (48)
Binder\Binder.ValueChecks.cs (1)
2609return property.Type.IsRefLikeOrAllowsRefLikeType();
Binder\Binder_Attributes.cs (1)
637namedArgumentType = propertySymbol.Type;
Binder\Binder_Await.cs (1)
394if (isCompletedProperty.Type.SpecialType != SpecialType.System_Boolean)
Binder\Binder_Expressions.cs (5)
6049if (propertySymbol.Type.IsValueType) 6054Error(diagnostics, ErrorCode.ERR_ValueTypePropertyInObjectInitializer, memberNameSyntax, propertySymbol, propertySymbol.Type); 8330resultType = ((PropertySymbol)symbolOpt).Type; 9076return new BoundPropertyAccess(node, receiver, initialBindingReceiverIsSubjectToCloning: ReceiverIsSubjectToCloning(receiver, propertySymbol), propertySymbol, autoPropertyAccessorKind: AccessorKind.Unknown, lookupResult, propertySymbol.Type, hasErrors: (hasErrors || hasError)); 10262property.Type,
Binder\Binder_Lookup.cs (1)
1833type = ((PropertySymbol)symbol).Type;
Binder\Binder_Patterns.cs (2)
367lengthAccess = new BoundPropertyAccess(node, receiverPlaceholder, initialBindingReceiverIsSubjectToCloning: ThreeState.False, lengthProperty, autoPropertyAccessorKind: AccessorKind.Unknown, LookupResultKind.Viable, lengthProperty.Type) { WasCompilerGenerated = true }; 1533PropertySymbol property => property.Type,
Binder\DecisionDagBuilder.cs (1)
328RoslynDebug.Assert(getLengthProperty.Type.SpecialType == SpecialType.System_Int32);
Binder\PatternExplainer.cs (2)
403var lengthTemp = new BoundDagTemp(lengthOrCount.Syntax, lengthOrCount.Property.Type, lengthOrCount); 573var subInput = new BoundDagTemp(e.Syntax, e.Property.Type, e);
BoundTree\Constructors.cs (1)
287type: indexer.Type,
Compiler\ClsComplianceChecker.cs (1)
725type = ((PropertySymbol)symbol).Type;
Compiler\MethodBodySynthesizer.cs (1)
205property.Type)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (2)
726return _comparer.Equals(property.Type, other.Type) &&
Emitter\Model\AttributeDataAdapter.cs (1)
171type = ((PropertySymbol)symbol).Type;
Emitter\Model\PropertySymbolAdapter.cs (1)
209return ((PEModuleBuilder)context.Module).Translate(AdaptedPropertySymbol.Type,
FlowAnalysis\NullableWalker.cs (1)
4722if (property.Type.SpecialType != SpecialType.System_Void)
FlowAnalysis\NullableWalker_Patterns.cs (1)
554addTemp(e, e.Property.Type);
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (2)
516if (!property.Type.Equals(returnType, TypeCompareKind.AllIgnoreOptions)) 519new CSDiagnosticInfo(ErrorCode.ERR_BadAsyncMethodBuilderTaskProperty, builderType, returnType, property.Type),
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (2)
153var outputTemp = new BoundDagTemp(p.Syntax, property.Type, p); 157return _factory.AssignmentExpression(output, _localRewriter.MakePropertyAccess(_factory.Syntax, input, property, LookupResultKind.Viable, property.Type, isLeftOfAssignment: false));
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (1)
118TypeSymbol type = indexer.Type;
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (1)
739propertySymbol.Type,
Lowering\LocalRewriter\LocalRewriter_PropertyAccess.cs (2)
86oldNodeOpt.Update(rewrittenReceiver, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, property, autoPropertyAccessorKind: AccessorKind.Unknown, LookupResultKind.Viable, property.Type) : 87new BoundPropertyAccess(syntax, rewrittenReceiver, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, property, autoPropertyAccessorKind: AccessorKind.Unknown, LookupResultKind.Viable, property.Type);
Operations\CSharpOperationFactory.cs (1)
2908createReceiver(), _semanticModel, nameSyntax, type: property.Type.GetPublicSymbol(), isImplicit: false);
Operations\CSharpOperationFactory_Methods.cs (1)
447type: property.Type.GetPublicSymbol(),
Symbols\Attributes\AttributeData.cs (2)
559if (property.TypeWithAnnotations.HasType && property.Type.SpecialType == SpecialType.System_String && 653if (member is PropertySymbol { Type: { SpecialType: SpecialType.System_String } })
Symbols\Compilation_WellKnownMembers.cs (1)
1094return property.Type;
Symbols\MemberSymbolExtensions.cs (1)
852return ((PropertySymbol)member).Type.ContainsTupleNames();
Symbols\Source\SourceMemberContainerSymbol.cs (4)
5302if (!equalityContract.Type.Equals(targetProperty.Type, TypeCompareKind.AllIgnoreOptions)) 5304if (!equalityContract.Type.IsErrorType()) 5306diagnostics.Add(ErrorCode.ERR_SignatureMismatchInRecord, equalityContract.GetFirstLocation(), equalityContract, targetProperty.Type);
Symbols\Source\SourcePropertySymbolBase.cs (3)
1049if (compilation.ShouldEmitNativeIntegerAttributes(Type)) 1835this.Type.CheckAllConstraints(DeclaringCompilation, conversions, Location, diagnostics); 1868var type = this.Type;
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (1)
68PropertySymbol property => property.Type,
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
77if (_equalityContract.IsStatic || !_equalityContract.Type.Equals(DeclaringCompilation.GetWellKnownType(WellKnownType.System_Type), TypeCompareKind.AllIgnoreOptions))
Symbols\TypeSymbol.cs (1)
2032interfaceMemberReturnType = property.Type;
Symbols\VarianceSafety.cs (1)
200property.Type,
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\CodeGenFunctionPointersTests.cs (3)
798verifier(property.Type); 987VerifyFunctionPointerSymbol(prop.Type, CallingConvention.ExtraArguments, 990Assert.True(prop.Type.HasUseSiteError);
Emit\EmitMetadataTests.cs (1)
1281Assert.Equal(SpecialType.System_String, p.Type.SpecialType);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (4)
Attributes\AttributeTests_IsByRefLike.cs (2)
594AssertReferencedIsByRefLike(property.Type); 623AssertNotReferencedIsByRefLikeAttribute(property.Type.GetAttributes());
Attributes\AttributeTests_ReadOnlyStruct.cs (1)
615AssertNotReferencedIsReadOnlyAttribute(property.Type.GetAttributes());
Attributes\AttributeTests_Tuples.cs (1)
293typeSymbols.Add(((PropertySymbol)symbol).Type);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\InitOnlyMemberTests.cs (1)
3368Assert.Equal("System.Int32", property0.Type.ToTestDisplayString());
Semantics\Utf8StringsLiteralsTests.cs (1)
637var type = (ArrayTypeSymbol)p.Type;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (53)
Symbols\AnonymousTypesSymbolTests.cs (1)
1095Assert.Equal(propType, property.Type);
Symbols\CovariantReturnTests.cs (4)
303var isCovariant = !property.Type.Equals(overriddenProperty.Type, TypeCompareKind.AllIgnoreOptions); 307var checkMetadata = hasReturnConversion(property.Type, overriddenProperty.Type);
Symbols\IndexerTests.cs (1)
181Assert.Equal(property.Type.SpecialType, expectedType);
Symbols\Metadata\PE\DynamicTransformsTests.cs (2)
311Assert.Equal(s_dynamicType, prop1.Type); 316Assert.Equal(complicatedInnerInnerArrayOfArray, prop2.Type);
Symbols\Metadata\PE\LoadCustomModifiers.cs (1)
166var propertyType = property.Type;
Symbols\Metadata\PE\LoadingIndexers.cs (3)
722Assert.NotEqual(returnTypeIndexer.Type, returnTypeIndexer.GetMethod.ReturnType); 1079Assert.Equal(property.Type, accessor.ReturnType); 1087Assert.Equal(property.Type, accessor.Parameters.Last().Type);
Symbols\Metadata\PE\NoPiaInstantiationOfGenericClassAndStruct.cs (2)
203Assert.Equal(SymbolKind.ErrorType, importedProperty.Type.Kind); 204Assert.IsType<NoPiaIllegalGenericInstantiationSymbol>(importedProperty.Type);
Symbols\Metadata\PE\NoPiaLocalHideAndTypeSubstitutionTests.cs (2)
275Assert.IsAssignableFrom<PENamedTypeSymbol>(methodSymbol.Type); 304var missing = (NamedTypeSymbol)methodSymbol.Type;
Symbols\Retargeting\RetargetExplicitInterfaceImplementation.cs (8)
202Assert.Equal(retargetedClassCProperty1Impl.Type.ToTestDisplayString(), interfaceV1Property1.Type.ToTestDisplayString()); 229Assert.Equal(retargetedClassCProperty4Impl.Type.ToTestDisplayString(), interfaceV1Property4.Type.ToTestDisplayString()); 240Assert.Equal(retargetedClassCIndexer1Impl.Type.ToTestDisplayString(), interfaceV1Indexer1.Type.ToTestDisplayString()); 267Assert.Equal(retargetedClassCIndexer4Impl.Type.ToTestDisplayString(), interfaceV1Indexer4.Type.ToTestDisplayString());
Symbols\Source\CustomModifierCopyTests.cs (8)
468CheckCustomModifier(inType, ((ArrayTypeSymbol)property.Type).ElementTypeWithAnnotations.CustomModifiers); 1142((NamedTypeSymbol)interfaceProperty1.Type).TupleUnderlyingType.ToTestDisplayString()); 1148((NamedTypeSymbol)classProperty1.Type).TupleUnderlyingType.ToTestDisplayString()); 1162Assert.Equal("(System.Object, System.Object)", ((NamedTypeSymbol)classProperty2.Type).TupleUnderlyingType.ToTestDisplayString()); 1176Assert.Equal("(System.Object, System.Object)", ((NamedTypeSymbol)classProperty3.Type).TupleUnderlyingType.ToTestDisplayString()); 1298((NamedTypeSymbol)baseProperty1.Type).TupleUnderlyingType.ToTestDisplayString()); 1305((NamedTypeSymbol)classProperty1.Type).TupleUnderlyingType.ToTestDisplayString()); 1333((NamedTypeSymbol)classProperty2.Type).TupleUnderlyingType.ToTestDisplayString());
Symbols\Source\EventTests.cs (1)
352Assert.Equal("System.Action<dynamic>", p.Type.ToTestDisplayString());
Symbols\Source\FileModifierTests.cs (2)
2461verifyConstructedFileType(comp.GetMember<PropertySymbol>("C1.P").Type); 2462verifyConstructedFileType(comp.GetMember<PropertySymbol>("C1.this[]").Type);
Symbols\Source\PropertyTests.cs (14)
454NamedTypeSymbol dout = (NamedTypeSymbol)ein.Type; 1930Assert.Equal(a, (x as PropertySymbol).Type); // duplicate, but all the same. 2620Assert.False(iap.Type.IsDynamic()); 2625Assert.Equal(SpecialType.System_String, iap2.Type.SpecialType); 2638Assert.False(iap.Type.IsDynamic()); 2643Assert.Equal(SpecialType.System_String, iap2.Type.SpecialType); 2656Assert.True(iap.Type.IsDynamic()); 2661Assert.Equal(SpecialType.System_String, iap2.Type.SpecialType); 2674Assert.True(iap.Type.IsDynamic()); 2679Assert.Equal(SpecialType.System_String, iap2.Type.SpecialType); 2713Assert.Equal(SpecialType.System_Object, iap.Type.SpecialType); 2718Assert.Equal(SpecialType.System_String, iap2.Type.SpecialType); 2731Assert.Equal(SpecialType.System_Object, iap.Type.SpecialType); 2736Assert.Equal(SpecialType.System_String, iap2.Type.SpecialType);
Symbols\Source\RecordTests.cs (2)
154Assert.Equal(SpecialType.System_Int32, x.Type.SpecialType); 188Assert.Equal(SpecialType.System_Int32, y.Type.SpecialType);
Symbols\TypeTests.cs (2)
1525memType = (mem as PropertySymbol).Type; 1534memType = (mem as PropertySymbol).Type;