Binder\Binder_Patterns.cs (8)
1043return new BoundDeclarationPattern(node, boundDeclType, isVar: false, unionMatchingMode: unionMatchingMode, variableSymbol, variableAccess, inputType: inputType, narrowedType: boundDeclType.Type, hasErrors);
1276narrowedType: boundDeclType?.Type ?? inputType.StrippedType(), hasErrors);
1940bool instanceTypeMatchHasErrors = CheckValidPatternType(typeSyntax, inputType, patternType.Type, diagnostics: instanceTypeMatchDiagnostics, ref useSiteInfo, out Conversion conversion) ||
1941(unionType is not null && CheckValidPatternTypeForUnionCases(typeSyntax, unionType, patternType.Type, diagnostics: instanceTypeMatchDiagnostics, ref useSiteInfo));
1955bool unionValueTypeMatchHasErrors = CheckValidPatternType(typeSyntax, newInputType, patternType.Type, diagnostics: unionValueTypeMatchDiagnostics, ref useSiteInfo, conversion: out _) ||
1956(newUnionType is not null && CheckValidPatternTypeForUnionCases(typeSyntax, newUnionType, patternType.Type, diagnostics: unionValueTypeMatchDiagnostics, ref useSiteInfo));
2034bool isExplicitNotNullTest = patternType.Type.SpecialType == SpecialType.System_Object;
2040return new BoundTypePattern(node, patternType, isExplicitNotNullTest, unionMatchingMode: unionMatchingMode, inputType: inputType, patternType.Type, hasErrors);
Generated\BoundNodes.xml.Generated.cs (4)
1102if (!Symbols.SymbolEqualityComparer.ConsiderEverything.Equals(aliasOpt, this.AliasOpt) || boundContainingTypeOpt != this.BoundContainingTypeOpt || boundDimensionsOpt != this.BoundDimensionsOpt || typeWithAnnotations != this.TypeWithAnnotations || !TypeSymbol.Equals(type, this.Type, TypeCompareKind.ConsiderEverything))
11239TypeSymbol? type = this.VisitType(node.Type);
12990updatedNode = node.Update(node.AliasOpt, boundContainingTypeOpt, boundDimensionsOpt, node.TypeWithAnnotations, node.Type);
15665new TreeDumperNode("type", node.Type, null),