projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e528f91
)
Remove redundant UnderlyingSystemType calls (dotnet/coreclr#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
Commit migrated from https://github.com/dotnet/coreclr/commit/
a6326409fd033f4145e1387955504d46f50850a5
src/libraries/System.Private.CoreLib/src/System/Type.cs
patch
|
blob
|
history
diff --git
a/src/libraries/System.Private.CoreLib/src/System/Type.cs
b/src/libraries/System.Private.CoreLib/src/System/Type.cs
index
8b19fbc
..
d2a31cb
100644
(file)
--- a/
src/libraries/System.Private.CoreLib/src/System/Type.cs
+++ b/
src/libraries/System.Private.CoreLib/src/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;
}