Skip to content

Commit

Permalink
Fix bootstrap build
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekseyTs committed Feb 3, 2022
1 parent 2da0033 commit 5a41f5a
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions src/Compilers/Core/CodeAnalysisTest/ObjectSerializationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -952,10 +952,23 @@ private static void TestWritingPrimitiveValues(ObjectWriter writer)
writer.WriteValue(Double.MaxValue);
writer.WriteValue(Single.MaxValue);
writer.WriteValue('X');
writer.WriteValue("YYY");
writer.WriteValue("\uD800\uDC00"); // valid surrogate pair
writer.WriteValue("\uDC00\uD800"); // invalid surrogate pair
writer.WriteValue("\uD800"); // incomplete surrogate pair

// PROTOTYPE(UTF8StringLiterals) : An explicit cast is added to work aroung the break -
// error CS0121: The call is ambiguous between the following methods or properties: 'ObjectWriter.WriteValue(object ?)' and 'ObjectWriter.WriteValue(ReadOnlySpan<byte>)'
writer.WriteValue((object)"YYY");

// PROTOTYPE(UTF8StringLiterals) : An explicit cast is added to work aroung the break -
// error CS0121: The call is ambiguous between the following methods or properties: 'ObjectWriter.WriteValue(object ?)' and 'ObjectWriter.WriteValue(ReadOnlySpan<byte>)'
writer.WriteValue((object)"\uD800\uDC00"); // valid surrogate pair

// PROTOTYPE(UTF8StringLiterals) : An explicit cast is added to work aroung the break -
// error CS0121: The call is ambiguous between the following methods or properties: 'ObjectWriter.WriteValue(object ?)' and 'ObjectWriter.WriteValue(ReadOnlySpan<byte>)'
writer.WriteValue((object)"\uDC00\uD800"); // invalid surrogate pair

// PROTOTYPE(UTF8StringLiterals) : An explicit cast is added to work aroung the break -
// error CS0121: The call is ambiguous between the following methods or properties: 'ObjectWriter.WriteValue(object ?)' and 'ObjectWriter.WriteValue(ReadOnlySpan<byte>)'
writer.WriteValue((object)"\uD800"); // incomplete surrogate pair

writer.WriteValue((object)null);
writer.WriteValue((IObjectWritable)null);
unchecked
Expand Down

0 comments on commit 5a41f5a

Please sign in to comment.