Bug 19136 – is expressions don't work as documented

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-08-02T11:59:49Z
Last change time
2021-12-14T17:14:44Z
Keywords
pull
Assigned to
SorinM
Creator
John Colvin

Comments

Comment #0 by john.loughran.colvin — 2018-08-02T11:59:49Z
The docs say: is ( Type Identifier : TypeSpecialization ) The condition is satisfied if Type is the same as TypeSpecialization, or if Type is a class and TypeSpecialization is a base class or base interface of it. The Identifier is declared to be either an alias of the TypeSpecialization or, if TypeSpecialization is dependent on Identifier, the deduced type. So, if we have Type = int and TypeSpecialization = long, we would expect the result to be false, because int != long and neither are classes or interfaces. But the result is actually true. Furthermore, Indentifier is set to int, whereas the docs say that Identifier should be an alias of TypeSpecialization, long in this case.
Comment #1 by dlang-bot — 2021-12-05T19:18:43Z
@sorin-gabriel created dlang/dmd pull request #13387 "fix Issue 19136 - is expressions don't work as documented" fixing this issue: - fix Issue 19136 - is expressions don't work as documented https://github.com/dlang/dmd/pull/13387
Comment #2 by dlang-bot — 2021-12-10T19:02:09Z
@sorin-gabriel created dlang/dlang.org pull request #3139 "fix Issue 19136 - is expressions don't work as documented" fixing this issue: - fix Issue 19136 - is expressions don't work as documented https://github.com/dlang/dlang.org/pull/3139
Comment #3 by dlang-bot — 2021-12-14T17:14:44Z
dlang/dlang.org pull request #3139 "fix Issue 19136 - is expressions don't work as documented" was merged into master: - 5597936734a9809e24b87390c5691d91b3fbb7a3 by Gabriel: fix Issue 19136 - is expressions don't work as documented https://github.com/dlang/dlang.org/pull/3139