Thread overview
[Issue 23797] Improve type-testing `is` expressions
Mar 21, 2023
Bolpat
Jun 17, 2024
Bolpat
March 21, 2023
https://issues.dlang.org/show_bug.cgi?id=23797

Bolpat <qs.il.paperinik@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4
                 CC|                            |qs.il.paperinik@gmail.com

--
June 17, 2024
https://issues.dlang.org/show_bug.cgi?id=23797

--- Comment #1 from Bolpat <qs.il.paperinik@gmail.com> ---
As for the right-hand side of `is(Type == Keyword)` for function pointer and delegate types, it also makes sense to ask if they’re carrying attributes. The keyword attributes should be allowed, but I think also user-defined ones should be allowed. Also visibility can be allowed for any symbols.

The same for the simplified `is …` syntax. `DG is @nogc` is clear to read.

--
November 04
https://issues.dlang.org/show_bug.cgi?id=23797

Nick Treleaven <nick@geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick@geany.org

--- Comment #2 from Nick Treleaven <nick@geany.org> ---
Just to note that `module` and `package` (already accepted), `return` and visibility should not be part of an `is` expression, because an `is` expression is supposed to test whether something is a valid type. It's not to test symbols. From the spec:

"An IsExpression is evaluated at compile time and is used to check if an expression is a valid type."

--
December 13
https://issues.dlang.org/show_bug.cgi?id=23797

--- Comment #3 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/20250

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--