I think the type-checker might be a bit *too* strict now in Pike 7.6.6. I have two classes, one callex 'xml', and one called 'Menu'. Menu implements xml, but it's behavour is quite different. Also create() is quite different in xml() and in Menu().
I then have a function which expects an array(xml), but gets an arary(Menu), and Pike 7.6.6 is not very happy about this. Didn't "create" used to be excempt from these type of type checks?
For more info, see:
http://fredrik.hubbe.net/hacker/viewtopic.php?t=143
Is there a better workaround for this than breaking up xml into two classes, one with a create function and one which inherits the other and adds the create function? (And then use the first one in all prototypes and the second in all function calls.)
Make create static? I'd hardly even call that a workaround.
/ Martin Stjernholm, Roxen IS
Previous text:
2004-05-12 01:23: Subject: overambitious type checker?
I think the type-checker might be a bit *too* strict now in Pike 7.6.6. I have two classes, one callex 'xml', and one called 'Menu'. Menu implements xml, but it's behavour is quite different. Also create() is quite different in xml() and in Menu().
I then have a function which expects an array(xml), but gets an arary(Menu), and Pike 7.6.6 is not very happy about this. Didn't "create" used to be excempt from these type of type checks?
For more info, see:
http://fredrik.hubbe.net/hacker/viewtopic.php?t=143
Is there a better workaround for this than breaking up xml into two classes, one with a create function and one which inherits the other and adds the create function? (And then use the first one in all prototypes and the second in all function calls.)
/ Fredrik (Naranek) Hubinette (Real Build Master)
Hmm, when I look closer at the error message, it seems like it's complaining about the wrong argument too..
/ Fredrik (Naranek) Hubinette (Real Build Master)
Previous text:
2004-05-12 01:29: Subject: overambitious type checker?
Make create static? I'd hardly even call that a workaround.
/ Martin Stjernholm, Roxen IS
It won't do that if the function is static.
/ Per Hedbor ()
Previous text:
2004-05-12 02:16: Subject: overambitious type checker?
Hmm, when I look closer at the error message, it seems like it's complaining about the wrong argument too..
/ Fredrik (Naranek) Hubinette (Real Build Master)
pike-devel@lists.lysator.liu.se