www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22193] New: is expression not understanding global scope

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

          Issue ID: 22193
           Summary: is expression not understanding global scope operator
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: destructionator gmail.com

This works fine:

```
struct Foo(F) if (is(F == FooT!T, T)) {}
struct FooT(T) {}

void main()
{
    Foo!(FooT!int) foo;
}
```

But this does not:

```
struct Foo(FooT) if (is(FooT == .FooT!T, T)) {}
struct FooT(T) {}

void main()
{
    Foo!(FooT!int) foo;
}
```

app.d(1): Error: undefined identifier `T`
app.d(6):        while looking for match for `Foo!(FooT!int)`


It seems to just ignore the leading dot.

--
Aug 09 2021