Skip to content

Commit af63420

Browse files
matelqclaude
andcommitted
Mono: Fix nullable annotation CI failure in ScriptPathAttribute
Remove nullable annotation from SourceFile property since the project does not enable nullable context. Use plain string with set accessor. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2db6b50 commit af63420

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

modules/mono/csharp_script.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2847,7 +2847,7 @@ Ref<Resource> ResourceFormatLoaderCSharpScript::load(const String &p_path, const
28472847
// TODO ignore anything inside bin/ and obj/ in tools builds?
28482848

28492849
String real_path = p_path;
2850-
bool is_assembly_backed = false;
2850+
[[maybe_unused]] bool is_assembly_backed = false;
28512851
if (p_path.begins_with("csharp://")) {
28522852
String virtual_suffix = p_path.trim_prefix("csharp://");
28532853
int colon_idx = virtual_suffix.find(":");

modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/ScriptPathAttribute.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ public sealed class ScriptPathAttribute : Attribute
1414
public string Path { get; }
1515

1616
/// <summary>
17-
/// Absolute path to the original source file on disk. Only set for assembly-backed
18-
/// scripts (csharp:// paths) where the source file exists outside the Godot project.
19-
/// Null for res:// scripts and NuGet packages (where source is not available).
17+
/// Absolute path to the original source file on disk.
18+
/// Null for res:// scripts and NuGet packages.
2019
/// </summary>
21-
public string? SourceFile { get; init; }
20+
public string SourceFile { get; set; }
2221

2322
/// <summary>
2423
/// Constructs a new ScriptPathAttribute instance.

0 commit comments

Comments
 (0)