www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1366] New: Inconsistent __traits usage

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1366

           Summary: Inconsistent __traits usage
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: ddparnell bigpond.com


This works ...

  import std.stdio;
  void main(string[] pArgs)
  {
    auto x = pArgs.idup;
    writefln(__traits(isStaticArray,x));
  }

This fails ...

  import std.stdio;
  void main(string[] pArgs)
  {
    writefln(__traits(isStaticArray, pArgs.idup));
  }

The message I get is ...

test.d(4): Error: cannot evaluate
_adDupT(&D13TypeInfo_AAxa6__initZ,(const(char)
[][])) at compile time


-- 
Jul 23 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1366


Hoenir <mrmocool gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mrmocool gmx.de



Error message has changed.

import std.stdio;
void main(string[] pArgs)
{
    auto x = pArgs.idup;
    writeln(__traits(isStaticArray,x));
}

works, but

void main(string[] pArgs)
{
    writeln(__traits(isStaticArray, pArgs.idup));
}

yields

Error: Cannot interpret string[] at compile time now

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 04 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1366


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



This is one of at least 8 bugs fixed by this commit:
https://github.com/donc/dmd/commit/fc67046cf1e66182d959309fb15ef9e2d4c266b9

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 15 2011