You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following test fails on net472 with System.FormatException : Input string was not in a correct format..
The problem is with the format string passed to string.Format, where the open brace (first character) isn't escaped: IL_000a: ldstr "{\r\n // Code size ....
[Fact]
public void TODO2()
{
int count = 31;
string op = "shl";
var value = $$"""
{
// Code size 5 (0x5)
.maxstack 2
IL_0000: ldarg.0
IL_0001: ldc.i4.s {{count}}
IL_0003: {{op}}
IL_0004: ret
}
""";
}
Message:
System.FormatException : Input string was not in a correct format.
Stack Trace:
StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
String.Format(String format, Object arg0, Object arg1)
NativeIntegerTests.TODO2() line 14939
From offline investigation with @CyrusNajmabadi, we found the problem was using an old toolset compiler (Compiler version: '4.2.0-1.22108.11 (a29b6ae8)'). We couldn't repro with new bits (in unittest).
Closing
The following test fails on net472 with
System.FormatException : Input string was not in a correct format.
.The problem is with the format string passed to
string.Format
, where the open brace (first character) isn't escaped:IL_000a: ldstr "{\r\n // Code size ...
.Relates to test plan #55306
The text was updated successfully, but these errors were encountered: