On 06.08.2018 14:37, Steven Schveighoffer wrote:
On 8/5/18 11:40 AM, Timon Gehr wrote:
On 05.08.2018 16:07, Steven Schveighoffer wrote:
So is this a bug? Is it expected?
It's a bug. The two copies of 'item' are not supposed to be the same
symbol. (Different types -> different symbols.)
Yep
On 8/5/18 11:40 AM, Timon Gehr wrote:
On 05.08.2018 16:07, Steven Schveighoffer wrote:
So is this a bug? Is it expected?
It's a bug. The two copies of 'item' are not supposed to be the same
symbol. (Different types -> different symbols.)
Yep. I even found it has nothing to do with foreach o
On 8/5/18 10:48 AM, Alex wrote:
void main()
{
Foo foo;
assert(isFoo!foo);
static struct X { int i; Foo foo; }
X x;
static foreach(i, item; typeof(x).tupleof)
static if(is(typeof(item) == Foo)) // line A
static assert(isFoo!item); // line B
On 05.08.2018 16:07, Steven Schveighoffer wrote:
I have found something that looks like a bug to me, but also looks like
it could simply be a limitation of the foreach construct.
Consider this code:
struct Foo {}
enum isFoo(alias x) = is(typeof(x) == Foo);
void main()
{
Foo foo;
as
On Sunday, 5 August 2018 at 14:07:30 UTC, Steven Schveighoffer
wrote:
I have found something that looks like a bug to me, but also
looks like it could simply be a limitation of the foreach
construct.
Consider this code:
struct Foo {}
enum isFoo(alias x) = is(typeof(x) == Foo);
void main()
{
I have found something that looks like a bug to me, but also looks like
it could simply be a limitation of the foreach construct.
Consider this code:
struct Foo {}
enum isFoo(alias x) = is(typeof(x) == Foo);
void main()
{
Foo foo;
assert(isFoo!foo);
static struct X { int i; Foo fo