Bug 23577 – Multiple template arguments are matched to a single parameter in "is" expressions

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-12-24T08:04:08Z
Last change time
2024-12-13T19:26:31Z
Assigned to
No Owner
Creator
Max Samukha
Moved to GitHub: dmd#20208 →

Comments

Comment #0 by maxsamukha — 2022-12-24T08:04:08Z
This should pass: struct S(A...) { } static if (is(S!(int, bool) == S!A, A)) { pragma(msg, A); static assert(false); } Output: int onlineapp.d(9): Error: static assert: `false` is false
Comment #1 by maxhaton — 2022-12-24T23:43:14Z
Should it pass or should it output ``` int, bool ``` ?
Comment #2 by maxsamukha — 2022-12-25T07:30:27Z
(In reply to mhh from comment #1) > Should it pass or should it output > > ``` > int, bool > ``` > ? It should pass. Matching `S!(int, bool)` should require `S!A, A...` or `S!(A, B), A, B`.
Comment #3 by robert.schadek — 2024-12-13T19:26:31Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20208 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB