[Issue 5499] ICE(toir.c): delegate as alias template parameter, only with -inline

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 29 05:54:45 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5499


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ICE(toir.c): delegate as    |ICE(toir.c): delegate as
                   |alias template parameter,   |alias template parameter,
                   |only with -release -inline  |only with -inline


--- Comment #3 from Don <clugdbug at yahoo.com.au> 2011-01-29 05:52:33 PST ---
Here's an interesting variation. Without -inline, it compiles correctly, but if
-inline is set, it generates:
test0.d(2): Error: function test0.bar.foo!(delegate void(){}).foo is a nested
function and cannot be accessed from main
=====
void foo(alias f)(int x) {
    if (x>1)
       foo!f(x-1);
}

void bar() {
    foo!({})(2);
}

void main() {
    bar();
}

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


More information about the Digitalmars-d-bugs mailing list