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:
ee41ee4
)
Remove redundant UnderlyingSystemType calls (#24000)
author
Jan Kotas
<jkotas@microsoft.com>
Mon, 15 Apr 2019 23:29:41 +0000
(16:29 -0700)
committer
GitHub
<noreply@github.com>
Mon, 15 Apr 2019 23:29:41 +0000
(16:29 -0700)
UnderlyingSystemType is virtual
src/System.Private.CoreLib/shared/System/Type.cs
patch
|
blob
|
history
diff --git
a/src/System.Private.CoreLib/shared/System/Type.cs
b/src/System.Private.CoreLib/shared/System/Type.cs
index
8b19fbc
..
d2a31cb
100644
(file)
--- a/
src/System.Private.CoreLib/shared/System/Type.cs
+++ b/
src/System.Private.CoreLib/shared/System/Type.cs
@@
-281,8
+281,9
@@
namespace System
}
protected virtual TypeCode GetTypeCodeImpl()
{
- if (this != UnderlyingSystemType && UnderlyingSystemType != null)
- return Type.GetTypeCode(UnderlyingSystemType);
+ Type systemType = UnderlyingSystemType;
+ if (this != systemType && systemType != null)
+ return Type.GetTypeCode(systemType);
return TypeCode.Object;
}