Rename Type.IsSzArray to Type.IsSZArray and make public.#10105
Conversation
| } | ||
|
|
||
| internal static bool IsSzArray(RuntimeType type) | ||
| internal static bool IsSZArray(RuntimeType type) |
There was a problem hiding this comment.
This rename isn't necessary, but the consistency seemed worthwhile.
| public virtual bool IsSZArray | ||
| { | ||
| [Pure] | ||
| get { return false; } |
There was a problem hiding this comment.
@JonHanna The default implemention now needs to be "throw new NotImplementedException();"
There was a problem hiding this comment.
Why can't we just keep the default false return?
There was a problem hiding this comment.
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.
|
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. |
For dotnet/corefx#16566
|
Test Windows_NT x64 Release Priority 1 Build and Test |
Rename Type.IsSzArray to Type.IsSZArray and make public. Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
Rename Type.IsSzArray to Type.IsSZArray and make public. Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
Rename Type.IsSzArray to Type.IsSZArray and make public. Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
Rename Type.IsSzArray to Type.IsSZArray and make public. Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
For dotnet/corefx#16566