summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ModLoading/Finders
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-07-08 13:26:07 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-07-08 13:26:07 -0400
commit40fbafdb73d0501f5239d3b857b6cb3bf2929bab (patch)
tree824a83b745c7d75b07f2c74e1c0b7ec834eb4e0b /src/SMAPI/Framework/ModLoading/Finders
parentf6254e17ead217cf7b2488a9b2d5b8d0bc9b23d8 (diff)
downloadSMAPI-40fbafdb73d0501f5239d3b857b6cb3bf2929bab.tar.gz
SMAPI-40fbafdb73d0501f5239d3b857b6cb3bf2929bab.tar.bz2
SMAPI-40fbafdb73d0501f5239d3b857b6cb3bf2929bab.zip
fix new logic not applied to method return types
Diffstat (limited to 'src/SMAPI/Framework/ModLoading/Finders')
-rw-r--r--src/SMAPI/Framework/ModLoading/Finders/ReferenceToMemberWithUnexpectedTypeFinder.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/ModLoading/Finders/ReferenceToMemberWithUnexpectedTypeFinder.cs b/src/SMAPI/Framework/ModLoading/Finders/ReferenceToMemberWithUnexpectedTypeFinder.cs
index 88ba36ee..47c8b33c 100644
--- a/src/SMAPI/Framework/ModLoading/Finders/ReferenceToMemberWithUnexpectedTypeFinder.cs
+++ b/src/SMAPI/Framework/ModLoading/Finders/ReferenceToMemberWithUnexpectedTypeFinder.cs
@@ -93,7 +93,7 @@ namespace StardewModdingAPI.Framework.ModLoading.Finders
}
string expectedReturnType = this.GetComparableTypeID(methodDef.ReturnType);
- if (candidateMethods.All(method => this.GetComparableTypeID(method.ReturnType) != expectedReturnType))
+ if (candidateMethods.All(method => !RewriteHelper.LooksLikeSameType(this.GetComparableTypeID(method.ReturnType), expectedReturnType)))
{
this.NounPhrase = $"reference to {methodDef.DeclaringType.FullName}.{methodDef.Name} (no such method returns {this.GetFriendlyTypeName(methodDef.ReturnType, expectedReturnType)})";
return InstructionHandleResult.NotCompatible;