projects
/
platform
/
upstream
/
coreclr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b4202b
)
Fix T[]->ArraySegment cast to return default for null (#16301)
author
Stephen Toub
<stoub@microsoft.com>
Fri, 9 Feb 2018 20:31:22 +0000
(15:31 -0500)
committer
Jan Kotas
<jkotas@microsoft.com>
Fri, 9 Feb 2018 20:31:22 +0000
(12:31 -0800)
src/mscorlib/shared/System/ArraySegment.cs
patch
|
blob
|
history
diff --git
a/src/mscorlib/shared/System/ArraySegment.cs
b/src/mscorlib/shared/System/ArraySegment.cs
index
d45fb0d
..
3a13595
100644
(file)
--- a/
src/mscorlib/shared/System/ArraySegment.cs
+++ b/
src/mscorlib/shared/System/ArraySegment.cs
@@
-192,7
+192,7
@@
namespace System
return !(a == b);
}
- public static implicit operator ArraySegment<T>(T[] array) =>
new ArraySegment<T>(array)
;
+ public static implicit operator ArraySegment<T>(T[] array) =>
array != null ? new ArraySegment<T>(array) : default
;
#region IList<T>
T IList<T>.this[int index]