Bug 20657 – is() expression can't deal with tuples?

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2020-03-09T23:12:29Z
Last change time
2024-12-13T19:07:29Z
Assigned to
No Owner
Creator
Manu
Moved to GitHub: dmd#19674 →

Comments

Comment #0 by turkeyman — 2020-03-09T23:12:29Z
alias XX = AliasSeq!(int, float); pragma(msg, is(XX == AliasSeq!(int, float))); // TRUE pragma(msg, is(XX == AliasSeq!(U, V), U, V)); // FALSE pragma(msg, is(XX == AliasSeq!(U), U...)); // FALSE Now it's clear why this is the case; inference like that won't apply to template instantiation arguments (but I reckon maybe it could?)... but is there some other way to do this? How do we determine if a thing is a tuple? I'm iterating `allMembers` of things, and trying to filter, but I can't work out how to detect if a symbol is a tuple so I can exclude it...
Comment #1 by robert.schadek — 2024-12-13T19:07:29Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19674 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB