mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-05 02:43:32 +00:00
- Remove dead replayPendingItems array and inert if-block in type-env.ts - Add nullable_type fallback in extractKotlinDeclaration for val x: User? local vars - Tighten isCSharpNullableDecl to avoid substring false positives on type names - Add missing scope boundaries: function_expression (TS), constructor_declaration/ local_function_statement/lambda_expression (C#) in null-check narrowing walkers - Extend null-check narrowing fixtures and add 4 integration tests covering: Kotlin local variable nullable, C# constructor + lambda, TS function expression
44 lines
775 B
C#
44 lines
775 B
C#
using NullCheck.Models;
|
|
using System;
|
|
|
|
namespace NullCheck.Services
|
|
{
|
|
public class App
|
|
{
|
|
public App(User? x)
|
|
{
|
|
if (x != null)
|
|
{
|
|
x.Save();
|
|
}
|
|
}
|
|
|
|
public void ProcessInequality(User x)
|
|
{
|
|
if (x != null)
|
|
{
|
|
x.Save();
|
|
}
|
|
}
|
|
|
|
public void ProcessIsNotNull(User x)
|
|
{
|
|
if (x is not null)
|
|
{
|
|
x.Save();
|
|
}
|
|
}
|
|
|
|
public void ProcessInLambda(User? x)
|
|
{
|
|
Action act = () =>
|
|
{
|
|
if (x != null)
|
|
{
|
|
x.Save();
|
|
}
|
|
};
|
|
act();
|
|
}
|
|
}
|
|
}
|