No announcement yet.

[CLOSED] [#304] [1.8] "name conflicts" for implemented interface method with multiple signatures present

  • Filter
  • Time
  • Show
Clear All
new posts

    [CLOSED] [#304] [1.8] "name conflicts" for implemented interface method with multiple signatures present

    I was just trying out some of the fixes in 1.7, specifically in regards to Task.FromPromise and the change to the IPromise interface (from two methods - where only one takes an errorHandler - to one method, such that the errorHandler must also be respected) and encountered a "name conflict" issue with the promise implementation that still had the two methods.

    I've boiled it down to a minimum reproduce case -

    public interface IAmSimpleInterface
        void F(string x);
    public class NameConflictExample : IAmSimpleInterface
        public void F(string x) { throw new NotImplementedException(); }
        public void F() { throw new NotImplementedException(); }
    This results in an error

    // Line 0, Col 0 : Cannot translate interface (Demo.App+IAmSimpleInterface) member '[Method Demo.App+NameConflictExample.F(x:System.String) :System.Void]' in 'Demo.App+NameConflictExample' due name conflicts. Please rename methods or refactor your code
    (As may be seen in the live compiler URL - figured I might as well use this system since you've put shareable links in place! :))

    If I remove the parameter-less "F" method in the implementation then the error goes away.

    The 1.7 changes to address my Task problems have worked well, btw!
    Last edited by geoffrey.mcgill; 2016-03-15 @ 04:56 PM.

    Thanks for the report. Yes, such code should be translated without any problem
    We fixed the issue. The fix is commited to GitHub repository

    The issue is tracked at
    Last edited by Leonid; 2015-07-15 @ 08:38 AM.


      FAST! :eek: ...