digitalmars.D.bugs - [Issue 23730] New: Clarify IsExpression `Identifier :` and `==
- d-bugmail puremagic.com (28/31) Feb 21 2023 https://issues.dlang.org/show_bug.cgi?id=23730
https://issues.dlang.org/show_bug.cgi?id=23730 Issue ID: 23730 Summary: Clarify IsExpression `Identifier :` and `== TypeCtor` spec Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: dlang.org Assignee: nobody puremagic.com Reporter: nick geany.org https://dlang.org/spec/expression.html#is-identifier-convertTypeSpecialization is only allowed to be a TypeA type pattern involving Identifier is not literally a type, so this sentence should not apply to the pattern case.if TypeSpecialization is dependent on Identifier, the TypeSpecialization forms a pattern from which the type of Identifier is deduced.This doesn't mention that the pattern can match a type that implicitly converts from Type. It should also state the condition doesn't match if the pattern doesn't match. --- https://dlang.org/spec/expression.html#is-type-equalthe condition is satisfied if Type is one of those.The `== TypeCtor` forms should use more precise language about a top-level type constructor, as `is(const(int)[] == const)` is false. That should be in an example as well as examples of it being true. --- PR incoming. --
Feb 21 2023