[Issue 4841] -inline wrecks delegate literals as alias parameters (An array()/map inlining problem)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Sep 10 00:02:52 PDT 2010


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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug at yahoo.com.au
            Summary|An array()/map inlining     |-inline wrecks delegate
                   |problem                     |literals as alias
                   |                            |parameters (An array()/map
                   |                            |inlining problem)


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2010-09-10 00:02:24 PDT ---
Original title: "An array()/map inlining problem"
Here's a simpler case that gives the same error message, only with -inline:

---
struct Struct4841(alias pred)
{
    this(int k) { }
}

void bug4841a() {
      Struct4841!(   (t) { any_old_garbage;} )(  1 );   
}

void bug4841b() {
   bug4841a();
}
---
This is a problem with delegates and alias templates. It's not a regression.
There also seems to be an accepts-invalid bug in this. You can put any old
garbage inside the alias, which seems odd. And you cannot declare a variable of
type Struct4841!(   (t) { any_old_garbage;} ) --- it's rejected at the parsing
stage.

-- 
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