Skip to content

Enable nullable reference types in AidlCompiler.cs#11403

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/enable-nullable-reference-types
Draft

Enable nullable reference types in AidlCompiler.cs#11403
Copilot wants to merge 2 commits into
mainfrom
copilot/enable-nullable-reference-types

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 18, 2026

AidlCompiler.cs had several fields, parameters, and an event typed as non-nullable despite accepting null values, hiding potential null reference issues at compile time.

  • Add #nullable enable directive
  • Annotate output_path, output_ns as string?
  • Make FileWritten event nullable; use null-conditional invoke to prevent NullReferenceException when no subscribers are attached:
    FileWritten?.Invoke (file, csharp);
  • Fix Run test overload signature: out string? output, AssemblyDefinition[]? references
  • No ! (null-forgiving) operator used

Agent-Logs-Url: https://github.com/dotnet/android/sessions/8b2f0a2c-02ea-4b56-80aa-5893f0840057

Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Copilot AI changed the title [WIP] Enable nullable reference types in AidlCompiler.cs Enable nullable reference types in AidlCompiler.cs May 18, 2026
Copilot AI requested a review from jonathanpeppers May 18, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix-finder] Enable nullable reference types in AidlCompiler.cs

2 participants