[Issue 5821] Calling spawn in std.concurrency without all the parameters required by void function(T) fn

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Apr 12 08:59:17 PDT 2011


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


Andriy <andrden at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrden at gmail.com


--- Comment #1 from Andriy <andrden at gmail.com> 2011-04-12 08:55:29 PDT ---
Seems more like it's language:
  arg: 100
  arg: 134851556 (any number actually)
is printed by the following which should not compile:

import std.stdio;

void func(int value){
    writeln("arg: ",value);
}

void myspawn(T...)( void function(T) fn, T args ){
    fn(args);
}

void main(){
    myspawn(&func,100);
    myspawn(&func); 
}

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