2009/4/24 stepken <[email protected]>: > Hi! > > This stuff, cleaning up unused Code fails in Pharo, but runs > successfully in Squeak 3.10. > > (Association allInstances select: > [:x | ((x value isKindOf: Behavior) and: ['AnOb*' match: x value > name]) or: > ['AnOb*' match: x value class name]]) > collect: [:x | x key -> x value allInstances size] >
This code is broken. Try to guess why. Clues: - browse all implementors of #allInstances. - observe class of x value in the debugger - observe the or: clause to explain why a non Behavior could pass the select: phase > Same stuff, changed a bit to "AnObj*", runs. Why? There is no match. This question sounds like "If I change a bit in my program, results are not the same why ?" Cheers > > (Association allInstances select: > [:x | ((x value isKindOf: Behavior) and: ['AnObj*' match: x value > name]) or: > ['AnObj*' match: x value class name]]) > collect: [:x | x key -> x value allInstances size] > > regards, Guido Stepken > > > _______________________________________________ > Pharo-project mailing list > [email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
