110 references to Type
Microsoft.CodeAnalysis.CSharp (49)
Binder\Binder.ValueChecks.cs (1)
2268return property.Type.IsRefLikeType;
Binder\Binder_Attributes.cs (1)
619namedArgumentType = propertySymbol.Type;
Binder\Binder_Await.cs (1)
393if (isCompletedProperty.Type.SpecialType != SpecialType.System_Boolean)
Binder\Binder_Expressions.cs (5)
5125if (propertySymbol.Type.IsValueType) 5130Error(diagnostics, ErrorCode.ERR_ValueTypePropertyInObjectInitializer, memberNameSyntax, propertySymbol, propertySymbol.Type); 7108resultType = ((PropertySymbol)symbolOpt).Type; 7605return new BoundPropertyAccess(node, receiver, propertySymbol, lookupResult, propertySymbol.Type, hasErrors: (hasErrors || hasError)); 8512property.Type,
Binder\Binder_Lookup.cs (1)
1741type = ((PropertySymbol)symbol).Type;
Binder\Binder_Patterns.cs (2)
366lengthAccess = new BoundPropertyAccess(node, receiverPlaceholder, lengthProperty, LookupResultKind.Viable, lengthProperty.Type) { WasCompilerGenerated = true }; 1523PropertySymbol property => property.Type,
Binder\DecisionDagBuilder.cs (1)
325RoslynDebug.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)
234type: indexer.Type,
Compiler\ClsComplianceChecker.cs (1)
718type = ((PropertySymbol)symbol).Type;
Compiler\MethodBodySynthesizer.cs (1)
204property.Type)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (2)
920return _comparer.Equals(property.Type, other.Type) &&
Emitter\Model\AttributeDataAdapter.cs (1)
171type = ((PropertySymbol)symbol).Type;
Emitter\Model\PropertySymbolAdapter.cs (1)
206return ((PEModuleBuilder)context.Module).Translate(AdaptedPropertySymbol.Type,
FlowAnalysis\NullableWalker.cs (2)
4099if (property.Type.SpecialType != SpecialType.System_Void) 9044left = new BoundPropertyAccess(fieldAccess.Syntax, fieldAccess.ReceiverOpt, autoProperty, LookupResultKind.Viable, autoProperty.Type, fieldAccess.HasErrors);
FlowAnalysis\NullableWalker_Patterns.cs (1)
514addTemp(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); 155return _factory.AssignmentExpression(output, _localRewriter.MakePropertyAccess(_factory.Syntax, input, property, LookupResultKind.Viable, property.Type, isLeftOfAssignment: false));
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (2)
530type: propertySymbol.Type, 541propertySymbol.Type,
Lowering\LocalRewriter\LocalRewriter_PropertyAccess.cs (2)
84oldNodeOpt.Update(rewrittenReceiver, property, LookupResultKind.Viable, property.Type) : 85new BoundPropertyAccess(syntax, rewrittenReceiver, property, LookupResultKind.Viable, property.Type);
Operations\CSharpOperationFactory.cs (1)
2763createReceiver(), _semanticModel, nameSyntax, type: property.Type.GetPublicSymbol(), isImplicit: false);
Operations\CSharpOperationFactory_Methods.cs (1)
367type: property.Type.GetPublicSymbol(),
Symbols\Attributes\AttributeData.cs (2)
581if (property.TypeWithAnnotations.HasType && property.Type.SpecialType == SpecialType.System_String && 670if (member is PropertySymbol { Type: { SpecialType: SpecialType.System_String } })
Symbols\Compilation_WellKnownMembers.cs (1)
1064return property.Type;
Symbols\MemberSymbolExtensions.cs (1)
574return ((PropertySymbol)member).Type.ContainsTupleNames();
Symbols\Source\SourceMemberContainerSymbol.cs (4)
4416if (!equalityContract.Type.Equals(targetProperty.Type, TypeCompareKind.AllIgnoreOptions)) 4418if (!equalityContract.Type.IsErrorType()) 4420diagnostics.Add(ErrorCode.ERR_SignatureMismatchInRecord, equalityContract.Locations[0], equalityContract, targetProperty.Type);
Symbols\Source\SourcePropertySymbolBase.cs (3)
821if (compilation.ShouldEmitNativeIntegerAttributes(Type)) 1493this.Type.CheckAllConstraints(DeclaringCompilation, conversions, Location, diagnostics); 1525var type = this.Type;
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (1)
78PropertySymbol property => property.Type,
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
83if (_equalityContract.IsStatic || !_equalityContract.Type.Equals(DeclaringCompilation.GetWellKnownType(WellKnownType.System_Type), TypeCompareKind.AllIgnoreOptions))
Symbols\TypeSymbol.cs (1)
1972interfaceMemberReturnType = property.Type;
Symbols\VarianceSafety.cs (1)
197property.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)
1280Assert.Equal(SpecialType.System_String, p.Type.SpecialType);
Microsoft.CodeAnalysis.CSharp.Emit2.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)
3363Assert.Equal("System.Int32", property0.Type.ToTestDisplayString());
Semantics\Utf8StringsLiteralsTests.cs (1)
636var type = (ArrayTypeSymbol)p.Type;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (51)
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)
179Assert.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); 1069Assert.Equal(property.Type, accessor.ReturnType); 1077Assert.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)
203Assert.Equal(retargetedClassCProperty1Impl.Type.ToTestDisplayString(), interfaceV1Property1.Type.ToTestDisplayString()); 230Assert.Equal(retargetedClassCProperty4Impl.Type.ToTestDisplayString(), interfaceV1Property4.Type.ToTestDisplayString()); 241Assert.Equal(retargetedClassCIndexer1Impl.Type.ToTestDisplayString(), interfaceV1Indexer1.Type.ToTestDisplayString()); 268Assert.Equal(retargetedClassCIndexer4Impl.Type.ToTestDisplayString(), interfaceV1Indexer4.Type.ToTestDisplayString());
Symbols\Source\CustomModifierCopyTests.cs (8)
349CheckCustomModifier(inType, ((ArrayTypeSymbol)property.Type).ElementTypeWithAnnotations.CustomModifiers); 999((NamedTypeSymbol)interfaceProperty1.Type).TupleUnderlyingType.ToTestDisplayString()); 1005((NamedTypeSymbol)classProperty1.Type).TupleUnderlyingType.ToTestDisplayString()); 1019Assert.Equal("(System.Object, System.Object)", ((NamedTypeSymbol)classProperty2.Type).TupleUnderlyingType.ToTestDisplayString()); 1033Assert.Equal("(System.Object, System.Object)", ((NamedTypeSymbol)classProperty3.Type).TupleUnderlyingType.ToTestDisplayString()); 1155((NamedTypeSymbol)baseProperty1.Type).TupleUnderlyingType.ToTestDisplayString()); 1162((NamedTypeSymbol)classProperty1.Type).TupleUnderlyingType.ToTestDisplayString()); 1190((NamedTypeSymbol)classProperty2.Type).TupleUnderlyingType.ToTestDisplayString());
Symbols\Source\EventTests.cs (1)
352Assert.Equal("System.Action<dynamic>", p.Type.ToTestDisplayString());
Symbols\Source\PropertyTests.cs (14)
453NamedTypeSymbol dout = (NamedTypeSymbol)ein.Type; 1929Assert.Equal(a, (x as PropertySymbol).Type); // duplicate, but all the same. 2619Assert.False(iap.Type.IsDynamic()); 2624Assert.Equal(SpecialType.System_String, iap2.Type.SpecialType); 2637Assert.False(iap.Type.IsDynamic()); 2642Assert.Equal(SpecialType.System_String, iap2.Type.SpecialType); 2655Assert.True(iap.Type.IsDynamic()); 2660Assert.Equal(SpecialType.System_String, iap2.Type.SpecialType); 2673Assert.True(iap.Type.IsDynamic()); 2678Assert.Equal(SpecialType.System_String, iap2.Type.SpecialType); 2712Assert.Equal(SpecialType.System_Object, iap.Type.SpecialType); 2717Assert.Equal(SpecialType.System_String, iap2.Type.SpecialType); 2730Assert.Equal(SpecialType.System_Object, iap.Type.SpecialType); 2735Assert.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)
1524memType = (mem as PropertySymbol).Type; 1533memType = (mem as PropertySymbol).Type;