Bug 53231 - csc doesn't unify same file passed multiple times when one path is relative
Summary: csc doesn't unify same file passed multiple times when one path is relative
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib (show other bugs)
Version: master
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2017-03-10 18:13 UTC by Alexander Köplinger [MSFT]
Modified: 2017-03-12 09:33 UTC (History)
2 users (show)

See Also:
Tags: 2017-02
Is this bug a regression?: ---
Last known good build:


Attachments

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

Note You need to log in before you can comment on or make changes to this bug.