www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5161] New: Selective import results in conflicting definition.

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5161

           Summary: Selective import results in conflicting definition.
           Product: D
           Version: D1
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: strtr despam.it


--- Comment #0 from strtr despam.it 2010-11-03 18:33:47 PDT ---
The code below results in:
i.d(6): Error: b.B at b.d(3) conflicts with c.B at c.d(4)

--
module main;

import c;

void main(){}
--
module c;

import i;
import b : B;
//public import b; // using this line instead fixes it
--
module i;

import b;
import c;

B i;
--
module b;

struct B{
  int b;
}
--

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 03 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5161


Witold Baryluk <baryluk smp.if.uj.edu.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |baryluk smp.if.uj.edu.pl


--- Comment #1 from Witold Baryluk <baryluk smp.if.uj.edu.pl> 2010-11-21
22:04:43 PST ---
I had the same problem in D2.049. I think it is regression, as it was working
previously without problem.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 21 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5161


Piotr Szturmaj <pszturmaj tlen.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pszturmaj tlen.pl
           Platform|Other                       |x86
            Version|D1                          |D2
           Severity|normal                      |regression


--- Comment #2 from Piotr Szturmaj <pszturmaj tlen.pl> 2011-07-25 14:40:09 PDT
---
I can confirm this bug in 2.054.

Other test case (phobos+dmd 2.054):
--
module main;

import std.socket;
import core.time;

void test(Duration d) {}

void main() {}
--

main.d(6): Error: std.socket.Duration at
D:\dmd2\windows\bin\..\..\src\phobos\std\socket.d(44) conflicts with
core.time.Duration at
D:\dmd2\windows\bin\..\..\src\druntime\import\core\time.di(35)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 25 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5161


Christian Kamm <kamm-removethis incasoftware.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kamm-removethis incasoftwar
                   |                            |e.de


--- Comment #3 from Christian Kamm <kamm-removethis incasoftware.de> 2011-07-25
15:37:29 PDT ---
The fix to bug 314 would fix this as well.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 25 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5161


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug yahoo.com.au
         Resolution|                            |DUPLICATE
           Severity|regression                  |normal


--- Comment #4 from Don <clugdbug yahoo.com.au> 2012-01-24 12:14:56 PST ---
This is not a regression (it failed in DMD 2.000, 0.165).
But it was fixed when bug 314 was fixed. I think it's a duplicate: the conflict
happened because the selective import was public.
Anyway, it works now.

*** This issue has been marked as a duplicate of issue 314 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 24 2012