Bug 19882 – Expected 'undefined identifier' error when type comparing

Status
REOPENED
Severity
minor
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-05-18T03:10:09Z
Last change time
2024-12-13T19:03:25Z
Keywords
pull
Assigned to
No Owner
Creator
SrMordred
Moved to GitHub: dmd#17907 →

Comments

Comment #0 by patric.dexheimer — 2019-05-18T03:10:09Z
void main() { static if( is(undefined_id == int) ) pragma(msg, "OK"); //compiles //oops //static if( is(int == undefined_id ) ) pragma(msg, "OK"); //Error: undefined identifier undefined_type //as expected }
Comment #1 by dlang-bot — 2019-05-18T18:30:08Z
@kubo39 created dlang/dmd pull request #9818 "Fix Issue 19882 - Expected 'undefined identifier' error when type" fixing this issue: - Fix Issue 19882 - Expected 'undefined identifier' error when type comparing https://github.com/dlang/dmd/pull/9818
Comment #2 by dlang-bot — 2019-05-19T03:30:14Z
dlang/dmd pull request #9818 "Fix Issue 19882 - Expected 'undefined identifier' error when type" was merged into stable: - f2397a8363ff77870f5afe943c420aa577fe634d by Hiroki Noda: Fix Issue 19882 - Expected 'undefined identifier' error when type comparing Allow to compile when tspec is an undefined identifier. https://github.com/dlang/dmd/pull/9818
Comment #3 by ag0aep6g — 2019-05-19T11:18:01Z
(In reply to Dlang Bot from comment #2) > dlang/dmd pull request #9818 "Fix Issue 19882 - Expected 'undefined > identifier' error when type" was merged into stable: For the record, the merged fix does the opposite of what this issue called for originally. DMD now also accepts `is(int == undefined_id)`.
Comment #4 by dlang-bot — 2019-05-26T00:14:47Z
dlang/dmd pull request #9887 "Revert "Fix Issue 19882 - Expected 'undefined identifier' error when …" was merged into stable: - ead67ea78be202c4aab2aeafa5cf0ed5a409b112 by Martin Kinkelin: Revert "Fix Issue 19882 - Expected 'undefined identifier' error when type" This reverts commit f2397a8363ff77870f5afe943c420aa577fe634d. https://github.com/dlang/dmd/pull/9887
Comment #5 by dlang-bot — 2019-05-26T06:31:34Z
@thewilsonator updated dlang/dmd pull request #9891 "Fix issue 19893" fixing this issue: - Fix Issue 19882 - Expected 'undefined identifier' error when type comparing Allow to compile when tspec is an undefined identifier. - Merge pull request #9818 from kubo39/bugfix-19882 Fix Issue 19882 - Expected 'undefined identifier' error when type merged-on-behalf-of: Nicholas Wilson <[email protected]> https://github.com/dlang/dmd/pull/9891
Comment #6 by patric.dexheimer — 2019-05-26T15:15:06Z
"DMD now also accepts `is(int == undefined_id)`." Isn´t this bad? I got stuck several minutes on this bug because the compiler didn´t tell me that I misspelled an identifier.
Comment #7 by kinke — 2019-05-26T15:57:33Z
(In reply to SrMordred from comment #6) > "DMD now also accepts `is(int == undefined_id)`." > Isn´t this bad? > I got stuck several minutes on this bug because the compiler didn´t tell me > that I misspelled an identifier. Me too, that's why I reverted the 'fix' and reopened this issue.
Comment #8 by dlang-bot — 2019-06-03T02:50:42Z
@SSoulaimane updated dlang/dmd pull request #9946 "fix issue 18784 - cpp constructor returns void on Posix" fixing this issue: - Fix Issue 19882 - Expected 'undefined identifier' error when type comparing Allow to compile when tspec is an undefined identifier. - Merge pull request #9818 from kubo39/bugfix-19882 Fix Issue 19882 - Expected 'undefined identifier' error when type merged-on-behalf-of: Nicholas Wilson <[email protected]> https://github.com/dlang/dmd/pull/9946
Comment #9 by dlang-bot — 2019-06-03T08:52:15Z
@FeepingCreature updated dlang/dmd pull request #9953 "Fix issue 19936: `alias deprecated get this` falsely triggers deprecation on `array ~=`" fixing this issue: - Fix Issue 19882 - Expected 'undefined identifier' error when type comparing Allow to compile when tspec is an undefined identifier. - Merge pull request #9818 from kubo39/bugfix-19882 Fix Issue 19882 - Expected 'undefined identifier' error when type merged-on-behalf-of: Nicholas Wilson <[email protected]> https://github.com/dlang/dmd/pull/9953
Comment #10 by dlang-bot — 2019-06-03T13:52:52Z
@wilzbach created dlang/dmd pull request #9956 "Merge stable -> master" fixing this issue: - Fix Issue 19882 - Expected 'undefined identifier' error when type comparing Allow to compile when tspec is an undefined identifier. - Merge pull request #9818 from kubo39/bugfix-19882 Fix Issue 19882 - Expected 'undefined identifier' error when type merged-on-behalf-of: Nicholas Wilson <[email protected]> https://github.com/dlang/dmd/pull/9956
Comment #11 by robert.schadek — 2024-12-13T19:03:25Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17907 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB