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

Rename Type.IsSzArray to Type.IsSZArray and make public.#10105

Merged
1 commit merged into
dotnet:masterfrom
JonHanna:corefx16566
Mar 13, 2017
Merged

Rename Type.IsSzArray to Type.IsSZArray and make public.#10105
1 commit merged into
dotnet:masterfrom
JonHanna:corefx16566

Conversation

@JonHanna
Copy link
Copy Markdown

For dotnet/corefx#16566

}

internal static bool IsSzArray(RuntimeType type)
internal static bool IsSZArray(RuntimeType type)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This rename isn't necessary, but the consistency seemed worthwhile.

@jkotas jkotas requested a review from a user March 11, 2017 01:02
Comment thread src/mscorlib/src/System/Type.cs Outdated
public virtual bool IsSZArray
{
[Pure]
get { return false; }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@JonHanna The default implemention now needs to be "throw new NotImplementedException();"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Why can't we just keep the default false return?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The API was approved based on the "throw NotImplemented" behavior. If a third party type fails to override this, we want to get a clear exception to that effect, not an assumed answer that will be wrong 10% of the time.

@ghost
Copy link
Copy Markdown

ghost commented Mar 11, 2017

Because the default implementation of IsSZArray is now to throw NYI, any corelib types that derive from Type may need to override this now to preserve the existing behavior. System.Reflection.Emit.TypeBuilder comes to mind.

@JonHanna JonHanna changed the title Rename Type.IsSzArray to Type.IsSZArray and make public. Rename Type.IsSzArray to Type.IsSZArray and make public. [WIP] Mar 11, 2017
@JonHanna
Copy link
Copy Markdown
Author

Test Windows_NT x64 Release Priority 1 Build and Test

@JonHanna JonHanna changed the title Rename Type.IsSzArray to Type.IsSZArray and make public. [WIP] Rename Type.IsSzArray to Type.IsSZArray and make public. Mar 12, 2017
@ghost ghost merged commit a3c327d into dotnet:master Mar 13, 2017
@JonHanna JonHanna deleted the corefx16566 branch March 13, 2017 18:41
@karelz karelz modified the milestone: 2.0.0 Aug 28, 2017
dotnet-bot pushed a commit to dotnet/corefx that referenced this pull request Jan 13, 2018
Rename Type.IsSzArray to Type.IsSZArray and make public.

Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
dotnet-bot pushed a commit to dotnet/corefx that referenced this pull request Jan 13, 2018
Rename Type.IsSzArray to Type.IsSZArray and make public.

Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
safern pushed a commit to dotnet/corefx that referenced this pull request Jan 16, 2018
Rename Type.IsSzArray to Type.IsSZArray and make public.

Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
safern pushed a commit to dotnet/corefx that referenced this pull request Jan 16, 2018
Rename Type.IsSzArray to Type.IsSZArray and make public.

Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
This pull request was closed.
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.

4 participants