www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11966] New: Regression 2.065.b1: inout(const(char))[] doesn't convert to inout(char)[]

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

           Summary: Regression 2.065.b1: inout(const(char))[] doesn't
                    convert to inout(char)[]
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: doob me.com


--- Comment #0 from Jacob Carlborg <doob me.com> 2014-01-22 03:55:12 PST ---
The following code used to work with 2.064.2:

inout(char)[] stripped (inout(char)[] path)
{
    return path;
}

struct PathParser
{
    inout(const(char))[] pop () inout
    {
        return stripped (path);
    }

    inout(const(char))[] path () inout
    {
        return null;
    }
}

void main ()
{
    auto a = PathParser().pop;
}

With 2.065.b1 it results in this error:

Error: function main.stripped (inout(char)[] path) is not callable using
argument types (inout(const(char))[])

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 22 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11966


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2014-01-22 06:26:09 PST ---
https://github.com/D-Programming-Language/dmd/pull/3138

'inout const' type qualifier is introduced by fixing issue 6930, but its first
implementation had not been perfect.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 22 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11966


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com


--- Comment #2 from Walter Bright <bugzilla digitalmars.com> 2014-01-23
01:45:33 PST ---
(In reply to comment #1)
 https://github.com/D-Programming-Language/dmd/pull/3138
 
 'inout const' type qualifier is introduced by fixing issue 6930, but its first
 implementation had not been perfect.

what does 'inout const' mean? -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 23 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11966



--- Comment #3 from Kenji Hara <k.hara.pg gmail.com> 2014-01-23 02:09:13 PST ---
(In reply to comment #2)
 (In reply to comment #1)
 https://github.com/D-Programming-Language/dmd/pull/3138
 
 'inout const' type qualifier is introduced by fixing issue 6930, but its first
 implementation had not been perfect.

what does 'inout const' mean?

- A common type qualifier between immutable and inout - If inout function returns inout(const(T)), it will be deduced to const(T), immutable(T), or inout(const(T)). Different from inout(T), it won't be deduced to T because 'const' sticks. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 23 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11966



--- Comment #4 from github-bugzilla puremagic.com 2014-01-23 03:37:27 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/f09add4eff88889dc95d38a336bab6d6f168b1a6
fix Issue 11966 - inout(const(char))[] doesn't convert to inout(char)[]

https://github.com/D-Programming-Language/dmd/commit/b8c39d2f4dae658efa26476e94fdb7eb17f3cbc4
Merge pull request #3138 from 9rnsr/fix11966

[REG2.065a] Issue 11966 - inout(const(char))[] doesn't convert to inout(char)[]

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 23 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11966


Kenji Hara <k.hara.pg gmail.com> changed:

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


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 23 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11966



--- Comment #5 from github-bugzilla puremagic.com 2014-01-23 04:15:47 PST ---
Commit pushed to release at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/2b9da972dd8007a33d0cf07cfdfa18d1a9df3223
Merge pull request #3138 from 9rnsr/fix11966

[REG2.065a] Issue 11966 - inout(const(char))[] doesn't convert to inout(char)[]

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 23 2014