Bug 53231

Summary: csc doesn't unify same file passed multiple times when one path is relative
Product: [Mono] Class Libraries Reporter: Alexander Köplinger [MSFT] <alkpli>
Component: mscorlibAssignee: Marek Safar <masafa>
Status: RESOLVED FIXED    
Severity: normal CC: masafa, mono-bugs+mono
Priority: ---    
Version: master   
Target Milestone: Untriaged   
Hardware: PC   
OS: Mac OS   
Tags: 2017-02 Is this bug a regression?: ---
Last known good build:

Description Alexander Köplinger [MSFT] 2017-03-10 18:13:50 UTC
Repro:

> public class A
> {
>     public static void Main(){}
> }

works (prints CS2002 warning):

> csc test.cs test.cs

fails:

> csc test.cs ../sourcefolder/test.cs
> test.cs(1,14): error CS0101: The namespace '<global namespace>' already contains a definition for 'A'

Tried with Mono master/d455c0d. Works with the csc included in .NET Core, so I assume it's our bug.
This turned up in the XA build today that Andi is trying to fix for 2017-02 (she'll deduplicate the files there for now).
Comment 1 Marek Safar 2017-03-12 09:33:01 UTC
Fixed in master and 2017-02 branch