www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2638] New: auto string var should be invariant(char)[], not char[]

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

           Summary: auto string var should be invariant(char)[], not char[]
           Product: D
           Version: unspecified
          Platform: PC
               URL: http://www.digitalmars.com/d/2.0/declaration.html#AutoDe
                    claration
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: www.digitalmars.com
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: jlquinn optonline.net


auto s = "string"; // s is type char[6]

Unless I'm misreading the spec, the type of s should be invariant(char)[6].


-- 
Feb 01 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2638






Uh, what compiler version are you using?  If you're using a D1 compiler, then
it should be char[6].


-- 
Feb 01 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2638







 Uh, what compiler version are you using?  If you're using a D1 compiler, then
 it should be char[6].
Sorry, I'm referring to D2. Also, this is an issue with the spec web page, so the language version is in the URL and unambiguous :-) --
Feb 01 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2638






Both the D1 and D2 specs are on Digital Mars' site, so no, it's not
unambiguous.


-- 
Feb 01 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2638







 Both the D1 and D2 specs are on Digital Mars' site, so no, it's not
 unambiguous.
 
The URL includes 2.0 in the path. But I'll try to remember to set the version next time, sorry. --
Feb 01 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2638






shall we close the issue?


-- 
Feb 01 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2638






Why?  string literals should be invariant in D2, so if that's not what's
happening, then there's really a bug here.  Is this report strictly a
documentation bug or was there also code associated to demonstrate the problem?

I'm assuming it's strictly a doc issue at the moment.


-- 
Feb 01 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2638


braddr puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED





Fixed in svn revision 906, pending next release.


-- 
Feb 01 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2638


Leandro Lucarella <llucax gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
                 CC|                            |llucax gmail.com
         Resolution|                            |FIXED



PST ---
Fixed 10 months ago (probably in DMD 2.025). It's unlisted in the changelog.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 07 2009