[mcs] C# 7 tuple (foundation only).
[mono.git] / mcs / mcs / membercache.cs
index 48f5f09c7047e903979cd61343b77948d945e162..d132c872bafced81c59fd1eaf5bc8fd8245eb9a1 100644 (file)
@@ -1501,6 +1501,12 @@ namespace Mono.CSharp {
                                                        }
                                                        return false;
                                                }
+
+                                               var pm_member = (MethodCore)member;
+                                               if (!NamedTupleSpec.CheckOverrideName (pm, pm_member) || !NamedTupleSpec.CheckOverrideName (pm.MemberType, pm_member.MemberType)) {
+                                                       Report.Error (8142, member.Location,
+                                                               "A partial method declaration and partial method implementation must both use the same tuple element names");
+                                               }
                                        }
                                }