summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-04-19 19:11:50 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-04-19 19:11:50 -0400
commit1b527f0b2573ba54024cdee80680983030246f4f (patch)
treef55c29d242b52a3e699b6cb6c30d966fca2fe998 /src/SMAPI/Framework
parentd06e7d147afae95464935a24cfd6d0bf76fce7b6 (diff)
downloadSMAPI-1b527f0b2573ba54024cdee80680983030246f4f.tar.gz
SMAPI-1b527f0b2573ba54024cdee80680983030246f4f.tar.bz2
SMAPI-1b527f0b2573ba54024cdee80680983030246f4f.zip
detect broken references to methods which changed generic return type (#453)
Previously generic types couldn't be compared correctly, since we'd end up with false differences like "Dictionary`1 != Dictionary<string, string>". That seems to be fixed now, possibly due to the PDB file being included.
Diffstat (limited to 'src/SMAPI/Framework')
-rw-r--r--src/SMAPI/Framework/ModLoading/Finders/ReferenceToMemberWithUnexpectedTypeFinder.cs4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/SMAPI/Framework/ModLoading/Finders/ReferenceToMemberWithUnexpectedTypeFinder.cs b/src/SMAPI/Framework/ModLoading/Finders/ReferenceToMemberWithUnexpectedTypeFinder.cs
index 2cbb3a8e..ecad649a 100644
--- a/src/SMAPI/Framework/ModLoading/Finders/ReferenceToMemberWithUnexpectedTypeFinder.cs
+++ b/src/SMAPI/Framework/ModLoading/Finders/ReferenceToMemberWithUnexpectedTypeFinder.cs
@@ -78,10 +78,6 @@ namespace StardewModdingAPI.Framework.ModLoading.Finders
MethodReference methodReference = RewriteHelper.AsMethodReference(instruction);
if (methodReference != null && this.ShouldValidate(methodReference.DeclaringType))
{
- // can't compare generic type parameters between definition and reference
- if (methodReference.ReturnType.IsGenericInstance || methodReference.ReturnType.IsGenericParameter)
- return InstructionHandleResult.None;
-
// get potential targets
MethodDefinition[] candidateMethods = methodReference.DeclaringType.Resolve()?.Methods.Where(found => found.Name == methodReference.Name).ToArray();
if (candidateMethods == null || !candidateMethods.Any())