isSubClassOf Problem

Found a bug in the language, the VM or the compiler? help us iron things out or give ideas for doing things better.
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
User avatar
Khan
Intermediate
Posts:69
Joined:Fri Sep 17, 2004 9:31 am
Location:src/packages/collections/
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
isSubClassOf Problem

Post by Khan » Tue Oct 26, 2004 10:47 pm

Actually I wanted to mail this, but I decided against so none will get the impression this project or forum is dead ;)

the following code doesn't compile

Code: Select all

while superClass.isSubClassOf(testCaseClass)
because:
Cannot cast from Class to bool
can it be the return type is Class in stead of bool?

And I commited some changes to the collections framework so it uses the new interface mechanism. Programming against the EditableList interface should now be doable beacause you have all the Methods of Collection, EditableCollection and List. 8)

User avatar
Dragonlord
Forum Administrator
Posts:609
Joined:Fri Jul 30, 2004 4:30 pm
Location:Switzerland
Contact:

Post by Dragonlord » Wed Oct 27, 2004 12:48 am

*duh*... that's what happens if you want to go having diner and you quickly hack something together. indeed managed to make the return type Class instead of Bool, what i effectively pushed on the stack there.

it's fixed now. let's have a look tomorrow in the collection framework. things take shape not? :wink:
Image
Oh to be a dragon, of silkworm size or immense...

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable