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

--- Comment #0 from Dmitry Olshansky <> 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(){

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
lit at m3.d(3)
tryit.d(6): Error: template m.split does not match any function template
tryit.d(6): Error: template m.split(T) if (is(T : string)) cannot deduce
e function from argument types !()(int)

DMD 2.060 been there since at least 2.056.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to