[Issue 24573] New: qualified identifiers conduse IFTI

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 29 10:22:50 UTC 2024


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 at puremagic.com
          Reporter: b2.temp at 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.

--


More information about the Digitalmars-d-bugs mailing list