Problem
Two error messages in LlvmIrInstructions.cs have broken string interpolation, causing exception messages to display incorrect text when thrown. One is missing interpolation braces (printing literal cond.Type instead of the actual type), and the other is missing a closing quote character.
Location
- File:
src/Xamarin.Android.Build.Tasks/Utilities/LlvmIrGenerator/LlvmIrInstructions.cs
- Lines: 163, 221
Current Code
Line 163 — Br constructor: missing { } around cond.Type (prints literal text instead of the variable value):
throw new ArgumentException ($"Internal error: condition must refer to a variable of type 'bool', was 'cond.Type' instead", nameof (cond));
Line 221 — Call constructor: missing closing ' after {function.Signature.ReturnType}:
throw new ArgumentNullException ($"Internal error: function '{function.Signature.Name}' returns '{function.Signature.ReturnType} and thus requires a result variable", nameof (result));
Suggested Fix
Line 163 — Add interpolation braces around cond.Type:
throw new ArgumentException ($"Internal error: condition must refer to a variable of type 'bool', was '{cond.Type}' instead", nameof (cond));
Line 221 — Add the missing closing ' after the interpolation expression:
throw new ArgumentNullException ($"Internal error: function '{function.Signature.Name}' returns '{function.Signature.ReturnType}' and thus requires a result variable", nameof (result));
Reference
Line 445 in the same file shows the correct pattern for comparison:
throw new ArgumentException ($"Internal error: result must be a variable of type 'bool', was '{result.Type}' instead", nameof (result));
Guidelines
- Preserve existing formatting (tabs, spaces before parentheses)
- Minimal diff — only change the two affected string literals
Acceptance Criteria
Generated by Nightly Fix Finder · ● 2.6M · ◷
Problem
Two error messages in
LlvmIrInstructions.cshave broken string interpolation, causing exception messages to display incorrect text when thrown. One is missing interpolation braces (printing literalcond.Typeinstead of the actual type), and the other is missing a closing quote character.Location
src/Xamarin.Android.Build.Tasks/Utilities/LlvmIrGenerator/LlvmIrInstructions.csCurrent Code
Line 163 —
Brconstructor: missing{}aroundcond.Type(prints literal text instead of the variable value):Line 221 —
Callconstructor: missing closing'after{function.Signature.ReturnType}:Suggested Fix
Line 163 — Add interpolation braces around
cond.Type:Line 221 — Add the missing closing
'after the interpolation expression:Reference
Line 445 in the same file shows the correct pattern for comparison:
Guidelines
Acceptance Criteria
'cond.Type'→'{cond.Type}'(add interpolation braces)'{function.Signature.ReturnType}→'{function.Signature.ReturnType}'(add closing quote)dotnet build src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj)