1 write to Type
Microsoft.CodeAnalysis.CSharp (1)
Generated\BoundNodes.xml.Generated.cs (1)
5246this.Type = type;
62 references to Type
Microsoft.CodeAnalysis.CSharp (62)
Binder\DecisionDagBuilder_CheckOrReachability.cs (2)
427var normalizedPattern = PatternNormalizer.Rewrite(pattern, rootIdentifier.Type); 441var normalizedNegatedPattern = PatternNormalizer.Rewrite(negated, rootIdentifier.Type);
Binder\DecisionDagBuilder.cs (36)
358public TypeSymbol GetInputType() => UnionValue?.Type ?? DagTemp.Type; 374(pattern.HasErrors || pattern.InputType.Equals(input.DagTemp.Type, TypeCompareKind.AllIgnoreOptions) || pattern.InputType.IsErrorType()) : 461Type.SpecialType: SpecialType.System_Object 487propertyInput.Type is NamedTypeSymbol { IsUnionType: true } match && 542while (input.Source is BoundDagTypeEvaluation source && isDerivedType(source.Input.Type, symbol.ContainingType)) 602Debug.Assert(variableAccess.Type!.Equals(input.Type, TypeCompareKind.AllIgnoreOptions) || variableAccess.Type.IsErrorType()); 632if (input.Type.CanContainNull() && 680tryGetValueInput.Type is NamedTypeSymbol { IsUnionType: true } match) 732Type.SpecialType: SpecialType.System_Boolean, 739propertyInput.Type is NamedTypeSymbol { IsUnionType: true } match && 752if (inputInfo.UnionValue is { } unionValue && ((NamedTypeSymbol)inputInfo.DagTemp.Type).UnionHasValueProperty() is PropertySymbol hasValue) 795if (((NamedTypeSymbol)inputInfo.DagTemp.Type).GetUnionTypeTryGetValueMethod(_conversions, type) is MethodSymbol tryGetValue) 815var typeEvaluation = new BoundDagTypeEvaluation(syntax, outParameterTemp.Type.StrippedType(), outParameterTemp); 819if (!typeEvaluationTemp.Type.Equals(type, TypeCompareKind.AllIgnoreOptions)) 839if (!input.Type.Equals(type, TypeCompareKind.AllIgnoreOptions)) 841TypeSymbol inputType = input.Type.StrippedType(); // since a null check has already been done 848if (input.Type.IsDynamic() ? type.SpecialType == SpecialType.System_Object : conversion.IsImplicit) 893if (constantValue.IsString && (inputInfo.UnionValue?.Type ?? inputInfo.DagTemp.Type).IsSpanOrReadOnlySpanChar()) 1011if ((receiver is null ? input.Type : receiver.Type.StrippedType()) is NamedTypeSymbol { IsUnionType: true } unionType && 1172outputInfo.DagTemp.Type.Equals(bin.NarrowedType, TypeCompareKind.AllIgnoreOptions) : 2225if (!testUnionInstance.Type.Equals(otherUnionInstance.Type, TypeCompareKind.AllIgnoreOptions)) 2423!test.Input.Type.Equals(other.Input.Type, TypeCompareKind.AllIgnoreOptions)) 2455if (s1UnionInstance.Type.Equals(s2UnionInstance.Type, TypeCompareKind.AllIgnoreOptions)) 2594return s1.Input.Type.Equals(s2.Input.Type, TypeCompareKind.AllIgnoreOptions) && s1Input.Equals(s2Input); 2626if (!s1.Type.Equals(s2Source.MakeResultTemp().Type, TypeCompareKind.AllIgnoreOptions)) 2638if (!s2.Type.Equals(s1Source.MakeResultTemp().Type, TypeCompareKind.AllIgnoreOptions)) 3762Debug.Assert(oldTemp.Type.Equals(newTemp.Type, TypeCompareKind.AllIgnoreOptions)); 3812if (!typeEvalInput.Type.Equals(e1Input.Type, TypeCompareKind.AllIgnoreOptions)) 4118!test.Input.Type.Equals(valueSetInput.Type, TypeCompareKind.AllIgnoreOptions))
Binder\PatternExplainer.cs (11)
392return !sense ? "null" : requireExactType ? input.Type.ToDisplayString() : "not null"; 394return sense ? "null" : requireExactType ? input.Type.ToDisplayString() : "not null"; 440input.Type.IsNullableType() && input.Type.GetNullableUnderlyingType().Equals(evaluationType, TypeCompareKind.AllIgnoreOptions)) 552if (input.Type.IsTupleType && 556var elements = input.Type.TupleElements; 597return SampleValueString(remainingValues, input.Type, requireExactType: requireExactType, unnamedEnumValue: ref unnamedEnumValue); 614var conversions = input.Type.ContainingAssembly.TypeConversions; 733e.Input.Type is NamedTypeSymbol { IsUnionType: true } unionType && 747string typeName = requireExactType ? input.Type.ToDisplayString() : null; 757return requireExactType ? input.Type.ToDisplayString() : "_";
BoundTree\BoundDagTemp.cs (3)
43this.Type.Equals(other.Type, TypeCompareKind.AllIgnoreOptions) && 49return Hash.Combine(this.Type.GetHashCode(), Hash.Combine(this.Source?.GetHashCode() ?? 0, this.Index));
FlowAnalysis\NullableWalker_Patterns.cs (1)
712switch (_conversions.WithNullability(false).ClassifyConversionFromType(e.Input.Type, e.Type, isChecked: false, ref discardedUseSiteInfo).Kind)
Generated\BoundNodes.xml.Generated.cs (3)
5260if (!TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything) || source != this.Source || index != this.Index) 11986TypeSymbol? type = this.VisitType(node.Type); 16678new TreeDumperNode("type", node.Type, null),
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (1)
538if (t1.Input.Type.SpecialType is SpecialType.System_Double or SpecialType.System_Single)
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (2)
99LocalSymbol temp = _factory.SynthesizedLocal(dagTemp.Type, syntax: _node, kind: kind); 519_factory.Compilation.Conversions.ClassifyBuiltInConversion(test.Input.Type, typeEvaluation2.Type, isChecked: false, ref useSiteInfo) is Conversion conv &&
Utilities\ValueSetFactory.cs (3)
69return ForType(input.Type); 76var unionType = (NamedTypeSymbol)unionInstance.Type; 86&& input.Type is (NamedTypeSymbol { IsClosed: true } or TypeParameterSymbol { EffectiveBaseClassNoUseSiteDiagnostics.IsClosed: true }) and var closedClassOrTypeParameter)