www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 24573] New: qualified identifiers conduse IFTI

https://issues.dlang.org/show_bug.cgi?id=24573

          Issue ID: 24573
           Summary: qualified identifiers conduse IFTI
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: b2.temp gmx.com

This code is rejected

```
module m;

struct Tuple(T)
{
    T t;
}

auto tuple(T)(T t)
{
    return Tuple!T(t);
}

void test(T)(m.Tuple!T t) // here
{
}

void main()
{
    test(tuple(0.1));
}  
```

because IFTI fails to infer `T`, but if you remove the `m` of the `test`
parameter, it works.
Test case is simplified from
https://forum.dlang.org/post/v33ums$1m2q$1 digitalmars.com but
that should be the same problem.

--
May 29