Bug 22193 – is expression not understanding global scope operator

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-08-09T15:48:47Z
Last change time
2024-12-13T19:18:00Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
Adam D. Ruppe
Moved to GitHub: dmd#18051 →

Comments

Comment #0 by destructionator — 2021-08-09T15:48:47Z
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.
Comment #1 by jlourenco5691 — 2021-08-12T14:35:41Z
Adding a workaround that involves creating a new alias: ``` struct Foo(FooT) if (is(FooT == F!T, alias F = .FooT, T)) {} ```
Comment #2 by robert.schadek — 2024-12-13T19:18:00Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18051 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB