View mode: basic / threaded / horizontal-split · Log in · Help
September 16, 2012
[Issue 8668] New: public selective import makes functions conflict when otherwise they don't
http://d.puremagic.com/issues/show_bug.cgi?id=8668

          Summary: public selective import makes functions conflict when
                   otherwise they don't
          Product: D
          Version: D2
         Platform: All
       OS/Version: All
           Status: NEW
         Severity: normal
         Priority: P2
        Component: DMD
       AssignedTo: nobody@puremagic.com
       ReportedBy: dmitry.olsh@gmail.com


--- Comment #0 from Dmitry Olshansky <dmitry.olsh@gmail.com> 2012-09-16 06:19:29 PDT ---
Selective import is quite rotten. Continuing where I left with 8667 I've found
another issue now with public selective import:

Again given a few simple modules:

module m;

void split(T)(T k)
   if(is(T : string))
{
}


module m2;

void split(T)(T k)
   if(is(T : int))
{
}

//drop in another one to pull split from m2
module m3;

public import m2: split;

//and the one to call them...
import m;
import m3; //replace with m2 to make it work

void main(){
   split("abc");
   split(123);
}

Compiling this all together yeilds an output that suggest that 2 templates are
in conflict:

tryit.d(5): Error: m.split(T) if (is(T : string)) at m.d(3) conflicts with
m3.sp
lit at m3.d(3)
tryit.d(6): Error: template m.split does not match any function template
declara
tion
tryit.d(6): Error: template m.split(T) if (is(T : string)) cannot deduce
templat
e function from argument types !()(int)

DMD 2.060 been there since at least 2.056.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 09, 2013
[Issue 8668] public selective import makes functions conflict when otherwise they don't
http://d.puremagic.com/issues/show_bug.cgi?id=8668


Kenji Hara <k.hara.pg@gmail.com> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
          Keywords|                            |pull, rejects-valid


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2013-01-08 18:26:04 PST ---
https://github.com/D-Programming-Language/dmd/pull/1449

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 09, 2013
[Issue 8668] public selective import makes functions conflict when otherwise they don't
http://d.puremagic.com/issues/show_bug.cgi?id=8668


Kenji Hara <k.hara.pg@gmail.com> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
                CC|                            |andrei@erdani.com


--- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> 2013-01-08 18:27:01 PST ---
*** Issue 8035 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 09, 2013
[Issue 8668] public selective import makes functions conflict when otherwise they don't
http://d.puremagic.com/issues/show_bug.cgi?id=8668


Kenji Hara <k.hara.pg@gmail.com> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
          Keywords|                            |TDPL


--- Comment #3 from Kenji Hara <k.hara.pg@gmail.com> 2013-01-08 18:31:41 PST ---
From bug 8035:
----
import std.regex, std.string;

void main() {
   split(s"hello", regex("[ \t,.;:?]+"));
}
----

This is a TDPL issue at p.18 (http://erdani.com/tdpl/errata/).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 04, 2013
[Issue 8668] public selective import makes functions conflict when otherwise they don't
http://d.puremagic.com/issues/show_bug.cgi?id=8668



--- Comment #4 from github-bugzilla@puremagic.com 2013-03-03 22:05:43 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/b35e7e0b7f2df76869a79c032a48ab641b18ff85
fix Issue 8668 - public selective import makes functions conflict when
otherwise they don't

https://github.com/D-Programming-Language/dmd/commit/e2df8c552a92ecc6f722a50de5a043fa94bdd69e
Merge pull request #1449 from 9rnsr/fix8668

Issue 8668 - public selective import makes functions conflict when otherwise
they don't

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 04, 2013
[Issue 8668] public selective import makes functions conflict when otherwise they don't
http://d.puremagic.com/issues/show_bug.cgi?id=8668


Walter Bright <bugzilla@digitalmars.com> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
            Status|NEW                         |RESOLVED
                CC|                            |bugzilla@digitalmars.com
        Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Top | Discussion index | About this forum | D home