Skip to content

Commit aecb4b4

Browse files
C#: Use safe pattern-match in CSharpVisitor for VisitExpression/VisitStatement (#7133)
* C#: Use safe pattern-match in CSharpVisitor for VisitExpression/VisitStatement Replace unsafe direct casts with pattern-match early returns in all CSharpVisitor methods that call VisitExpression() or VisitStatement(), matching the established pattern in JavaVisitor.cs. * C#: Add tests for safe VisitStatement/VisitExpression type replacement Verify that when VisitStatement or VisitExpression returns a different type, the visitor method returns that result gracefully instead of throwing a ClassCastException. * C#: Add JavaVisitor tests for safe VisitStatement/VisitExpression type replacement
1 parent 48d403b commit aecb4b4

File tree

3 files changed

+851
-505
lines changed

3 files changed

+851
-505
lines changed

0 commit comments

Comments
 (0)