argument of ifNotNil: must be a 0-argument block
Andreas Raab
andreas.raab at gmx.de
Sat Sep 2 22:00:10 UTC 2006
David T. Lewis wrote:
>>> No, the compiler got it exactly right. It was faithfully optimizing
>>> the chosen definition of #ifNotNil: - whoever changed the
>>> definition "got it wrong" since the definition should not be
>>> changed without also changing the optimization in the compiler.
>>>
>>> But what's *really* annoying to me is that this change went unnoticed.
>> Indeed I think that we should invest in tests and a testserver
>
> Tests are good, but they do not detect this kind of problem.
Why not? If the purpose of a test is to detect a problem then the
inability to load a simple test like:
testIfNotNilArg
self assert: (3 ifNotNil:[:val| val = 3])
is precisely pointing out that there is a problem, e.g., the test
detected the problem and served its intended purposes.
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|