Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove manual edit comment from .NET TypeConversion #635

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -754,17 +754,10 @@ public static System.IO.MemoryStream FromDafny_N6_smithy__N3_api__S4_Blob(Dafny.

public static Dafny.ISequence<byte> ToDafny_N6_smithy__N3_api__S4_Blob(System.IO.MemoryStream value)
{
// BEGIN MANUAL EDIT
// It is possible for a MemoryStream to be implemented by another stream,
// which may or may not be backed with an array.
// If the array is empty, but the stream isn't, then
// the backing stream cannot be treated as a MemoryStream
// for purposes of type conversion through ToArray().
if (value.ToArray().Length == 0 && value.Length > 0)
{
throw new System.ArgumentException("Fatal Error: MemoryStream instance not backed by an array!");
}
// END MANUAL EDIT
return Dafny.Sequence<byte>.FromArray(value.ToArray());
}

Expand Down
Loading