Rosetta icon indicating copy to clipboard operation
Rosetta copied to clipboard

Type ambiguity with System types

Open andry-tino opened this issue 8 years ago • 1 comments

When translating, it is possible that the source code defines types with the same name as types in MsCoreLib.dll and includes both namespaces, thus generating a clash.

The source code might define an interface:

namespace MyNamespace {
  namespace MySubnamespace {
    public interface INotifyCompletion { }
  }
}

However we have that interface also in MsCoreLibe: System.Runtime.CompilerServices.INotifyCompletion.

Especially when using syntax transformation (which rearranges using directives), we might end up in this situation:

using System.Runtime.CompilerServices;
using MyNamespace.MySubnamespace;

public class MyClass {
  protected INotifyCompletion notifier; // Name clash
}

When processing notifier, the semantic model detects an ambiguity.

andry-tino avatar Dec 29 '16 06:12 andry-tino

To verify, with the new system as per #41, this should not happen

andry-tino avatar Jun 13 '17 11:06 andry-tino