Skip to content

Avoid checking array/stackalloc creation syntax in NullableWalker #60376

@jcouv

Description

@jcouv

Syntax is not supposed to convey semantic information. We should avoid doing analysis based on that.
Instead we should store this information in the initial bound tree.

        public override BoundNode? VisitArrayCreation(BoundArrayCreation node)
        {
...
            bool isInferred = node.Syntax.Kind() == SyntaxKind.ImplicitArrayCreationExpression;
...
        }
        private BoundNode? VisitStackAllocArrayCreationBase(BoundStackAllocArrayCreationBase node)
        {
...
            bool isInferred = node.Syntax.Kind() == SyntaxKind.ImplicitStackAllocArrayCreationExpression;
...
        }

Metadata

Metadata

Assignees

Labels

4 - In ReviewA fix for the issue is submitted for review.Area-CompilersConcept-Design DebtEngineering Debt, Design Debt, or poor product code quality

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions