February 21, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=4841



--- Comment #9 from bearophile_hugs@eml.cc 2012-02-21 14:18:15 PST ---
See also Issue 7559

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 16, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=4841


Jonathan M Davis <jmdavisProg@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg@gmx.com


--- Comment #10 from Jonathan M Davis <jmdavisProg@gmx.com> 2013-02-16 15:54:35 PST ---
Another example of this would be:

import std.string;

void main()
{
    auto str = new char[](5);
    assert(sformat(str, "%s", 42) == "42");
}

If you compile with -inline, it fails to compile with the latest master, giving

/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/string.d(2593): Error:
function std.string.sformat!(char, int).sformat is a nested function and cannot
be accessed from std.range.put!(Sink, const(char)).put
/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/string.d(2593): Error:
function std.string.sformat!(char, int).sformat is a nested function and cannot
be accessed from std.range.put!(Sink, const(char)).put
/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/string.d(2596): Error:
function std.string.sformat!(char, int).sformat is a nested function and cannot
be accessed from std.range.put!(Sink, const(char)).put
/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/string.d(2596): Error:
function std.string.sformat!(char, int).sformat is a nested function and cannot
be accessed from std.range.put!(Sink, const(char)).put
/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/string.d(2596): Error:
function std.string.sformat!(char, int).sformat is a nested function and cannot
be accessed from std.range.put!(Sink, const(char)).put
/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/string.d(2597): Error:
function std.string.sformat!(char, int).sformat is a nested function and cannot
be accessed from std.range.put!(Sink, const(char)).put
/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/string.d(2593): Error:
function std.string.sformat!(char, int).sformat is a nested function and cannot
be accessed from std.range.put!(Sink, char).put
/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/string.d(2593): Error:
function std.string.sformat!(char, int).sformat is a nested function and cannot
be accessed from std.range.put!(Sink, char).put
/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/string.d(2596): Error:
function std.string.sformat!(char, int).sformat is a nested function and cannot
be accessed from std.range.put!(Sink, char).put
/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/string.d(2596): Error:
function std.string.sformat!(char, int).sformat is a nested function and cannot
be accessed from std.range.put!(Sink, char).put
/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/string.d(2596): Error:
function std.string.sformat!(char, int).sformat is a nested function and cannot
be accessed from std.range.put!(Sink, char).put
/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/string.d(2597): Error:
function std.string.sformat!(char, int).sformat is a nested function and cannot
be accessed from std.range.put!(Sink, char).put
/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/string.d(2601): Error:
function std.string.sformat!(char, int).sformat is a nested function and cannot
be accessed from std.range.put!(Sink, char[]).put
/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/string.d(2601): Error:
function std.string.sformat!(char, int).sformat is a nested function and cannot
be accessed from std.range.put!(Sink, char[]).put
/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/string.d(2604): Error:
function std.string.sformat!(char, int).sformat is a nested function and cannot
be accessed from std.range.put!(Sink, char[]).put
/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/string.d(2604): Error:
function std.string.sformat!(char, int).sformat is a nested function and cannot
be accessed from std.range.put!(Sink, char[]).put
/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/string.d(2604): Error:
function std.string.sformat!(char, int).sformat is a nested function and cannot
be accessed from std.range.put!(Sink, char[]).put
/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/string.d(2605): Error:
function std.string.sformat!(char, int).sformat is a nested function and cannot
be accessed from std.range.put!(Sink, char[]).put
/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/string.d(2601): Error:
function std.string.sformat!(char, int).sformat is a nested function and cannot
be accessed from std.range.put!(Sink, const(char)[]).put
/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/string.d(2601): Error:
function std.string.sformat!(char, int).sformat is a nested function and cannot
be accessed from std.range.put!(Sink, const(char)[]).put
/home/jmdavis/dmd2/linux/bin/../../src/phobos/std/string.d(2604): Error:
function std.string.sformat!(char, int).sformat is a nested function and cannot
be accessed from std.range.put!(Sink, const(char)[]).put

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 01, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=4841



--- Comment #11 from bearophile_hugs@eml.cc 2013-03-01 04:42:22 PST ---
import std.array: array;
import std.algorithm: map;
void main() {
    int[] foo;
    auto r1 = map!(i => foo[0])([0]);
    auto r2 = array(r1);
}


Gives (dmd 2.063 alpha):

temp.d(5): Error: function D main is a nested function and cannot be accessed
from std.array.array!(MapResult!(__lambda2, int[])).array

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 10, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=4841


Denis Shelomovskij <verylonglogin.reg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |egustc@gmail.com


--- Comment #12 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-06-10 16:40:53 MSD ---
*** Issue 9187 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 10, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=4841


Denis Shelomovskij <verylonglogin.reg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |html@exc.eu


--- Comment #13 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-06-10 16:43:09 MSD ---
*** Issue 9996 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 10, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=4841


Denis Shelomovskij <verylonglogin.reg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |torarind@gmail.com


--- Comment #14 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-06-10 16:46:21 MSD ---
*** Issue 7129 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 10, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=4841


Denis Shelomovskij <verylonglogin.reg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |verylonglogin.reg@gmail.com


--- Comment #15 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-06-10 16:47:35 MSD ---
Currently failing tests:

1. From Description
---
import std.algorithm: map;
import std.array: array;

void main()
{
    int c;
    map!(x => c)([1]).array();
}
---

2. From Comment 10
---
import std.string;

void main()
{
    assert(new char[5].sformat("%s", 42) == "42");
}
---

3. From Issue 7129 Comment 4
---
auto fun()
{
    int i;
    struct Result
    {
        this(int u) {}

        auto bar() { i = 42; }
    }
    return Result();
}

void main()
{
    auto t = fun();
    t.bar();
}
---

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 10, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=4841



--- Comment #16 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-06-10 16:54:37 MSD ---
As mixing -inline/non-inline modules may result in a wrong code because of Issue 9193 one can use "-inline" only for toy D projects.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 10, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=4841


Denis Shelomovskij <verylonglogin.reg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|x86                         |All
   Target Milestone|2.059                       |---
         OS/Version|Windows                     |All


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 10, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=4841



--- Comment #17 from bearophile_hugs@eml.cc 2013-06-10 15:13:45 PDT ---
(In reply to comment #16)
> As mixing -inline/non-inline modules may result in a wrong code because of Issue 9193 one can use "-inline" only for toy D projects.

If you believe that to be true, then I think you should raise the Importance of this issue to Major.

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