diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-07-08 13:26:07 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-07-08 13:26:07 -0400 |
commit | 40fbafdb73d0501f5239d3b857b6cb3bf2929bab (patch) | |
tree | 824a83b745c7d75b07f2c74e1c0b7ec834eb4e0b /src/SMAPI/Framework/ModLoading/Finders | |
parent | f6254e17ead217cf7b2488a9b2d5b8d0bc9b23d8 (diff) | |
download | SMAPI-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.cs | 2 |
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; |