Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Nullable: Internal.Console, System.ValueType #23505

Merged

Conversation

buyaa-n
Copy link

@buyaa-n buyaa-n commented Mar 27, 2019

Very easy PR

@buyaa-n buyaa-n requested review from krwq, stephentoub and safern March 27, 2019 23:50
@safern
Copy link
Member

safern commented Mar 28, 2019

Same as System.Object.ToString, if we decide it can return null, I think System.ValueType.ToString, do the same thing

@stephentoub ?

@safern safern force-pushed the NullableFeature branch 3 times, most recently from c01bfd0 to 652234c Compare March 28, 2019 05:35
@stephentoub
Copy link
Member

stephentoub commented Mar 28, 2019

@buyaa-n, this PR has a bunch of unrelated commits in it. Can you please rebase to remove them from the PR? It'll then be easier to review.

@stephentoub
Copy link
Member

if we decide it can return null, I think System.ValueType.ToString, do the same thing

Yes, they should match IMO.

@buyaa-n buyaa-n force-pushed the nullable-console-valuetype branch from 47662dc to a11f989 Compare March 28, 2019 17:02
@buyaa-n
Copy link
Author

buyaa-n commented Mar 28, 2019

Sure rebased, seems final decision for ToString() not made, will wait for that

@safern
Copy link
Member

safern commented Mar 28, 2019

@buyaa-n let's make ToString return nullable for now until a final decision is reached to not block ourselves on this, we should make progress: #23510 (comment)

@buyaa-n buyaa-n force-pushed the nullable-console-valuetype branch from a11f989 to 63f6db5 Compare March 28, 2019 21:12
@@ -27,7 +28,7 @@ public static unsafe void Write(string s)
}
}

public static void WriteLine(string s) =>
public static void WriteLine(string? s) =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a little strange that WriteLine(string) accepts null but Write(string) does not. That said, even though this type is "public", it isn't really, so it's not a big deal.

@stephentoub stephentoub merged commit 1f3187e into dotnet:NullableFeature Mar 29, 2019
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* Nullable: Internal.Console, System.ValueType

* Making ToString() nullable


Commit migrated from dotnet/coreclr@1f3187e
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants