C#: Modify compiler generated strip logic to also take generated ToString calls into account.

This commit is contained in:
Michael Nebel
2025-01-09 11:36:17 +01:00
parent 8bf67e37fe
commit a4049b1d9a
8 changed files with 24 additions and 12 deletions

View File

@@ -11,7 +11,7 @@ import csharp
from ConditionalExpr e
where
e.getThen().stripImplicitCasts() != e.getElse().stripImplicitCasts() and
e.getThen().stripImplicit() != e.getElse().stripImplicit() and
not e.getThen().getType() instanceof NullType and
not e.getElse().getType() instanceof NullType
select e