www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19845] New: Modifiers are not added to tuples


          Issue ID: 19845
           Summary: Modifiers are not added to tuples
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: porton narod.ru

Modifiers (like "const") are not added to tuples by DMD64 D Compiler v2.085.1:

import std.meta : AliasSeq;

alias t = AliasSeq!(int, float); // create tuple (int, float)
alias tc = const(t);
static assert(is(tc[1] == const float));

a.d(5): Error: static assert:  is(float == const(float)) is false

Not quite sure if this is a compiler bug or intended behavior.

May 04 2019