diff options
author | Mike Voorhees <michaelv@unity3d.com> | 2017-02-17 20:05:25 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2017-05-04 12:07:34 +0300 |
commit | 458a23a67b0b1cbf0acd48f73499f3dbf9601205 (patch) | |
tree | 08e76bf34b739797f4748ecc4a515306af647d56 /linker | |
parent | 410a062f8080c6d9db574ef2384a3b8461dac379 (diff) |
FIX - GenericParam count on method not taken into
consideration. Could result in a base class method with the same name
as a derived method, but a different number of generic parameters , not
being stripped
We commited this change to our Mono.Linker as part of a different
unrelated fix at c740c07ad4b5 ~2 years ago. No test was added at the
time, but a test has been added to our upgrade branch
Diffstat (limited to 'linker')
-rw-r--r-- | linker/Mono.Linker.Steps/TypeMapStep.cs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/linker/Mono.Linker.Steps/TypeMapStep.cs b/linker/Mono.Linker.Steps/TypeMapStep.cs index 118a19f29..64a0c1dd1 100644 --- a/linker/Mono.Linker.Steps/TypeMapStep.cs +++ b/linker/Mono.Linker.Steps/TypeMapStep.cs @@ -215,6 +215,9 @@ namespace Mono.Linker.Steps { if (cp.Count != mp.Count) return false; + if (candidate.GenericParameters.Count != method.GenericParameters.Count) + return false; + for (int i = 0; i < cp.Count; i++) { if (!TypeMatch (cp [i].ParameterType, mp [i].ParameterType, ref genericParameters)) return false; |