[BUG][TEST] ClassDescription>>compile:classified:

Romain Robbes rrobbes at info.unicaen.fr
Thu Mar 4 08:02:03 UTC 2004


Is it a bug or a feature ?
When you use the #compile:classified: method to compile code,
you do not get prompted if temporary variable declarations are missing !

ie :
Object compile: 'foo bar := 1. ^ bar negated' classified: 'foobar'
Object new foo 			"yields -1"

will work even if bar is declared nowhere else, which is the case in 
Object...
This could be considered a feature, as the code actually works without 
problems ...
(except that in most cases the missing variable declaration is trapped 
somewhere else,
so we have to fix this, or break all the other places ;-) ).


Unfortunately it's quite hard to come up with a test, as rightful 
compile errors
seems to get notified as a side-effect of the call to 
#compile:classified:
(they open a window entitled "Syntax Error").




More information about the Squeak-dev mailing list