Re: Cannot create deferred object - too restrictive
Peter Gummer <[email protected]> Sat, 3 Dec 2005 09:28:44 +1100
| Newsgroups | gmane.comp.lang.eiffel.smalleiffel |
|---|---|
| Message-ID | <[email protected]> |
left wrote: > I can't believe you didn't read the rest of the post ;) if > not, then you should have read it and noticed that: > - the compiler error message does *not* complain about the > fact that the 'make' procedure doesn't necessarily exist, but > claims something very different. Just to be clear ... It is not sufficient for the 'make' procedure to exist. It must also be declared as a =creation procedure=. The class that A creates must contain this: create make Because A is creating an anchored type, there is no way for the compiler to know whether the class that it is creating contains this declaration. The SmartEiffel compiler's error message does describe the problem; it just doesn't describe it very clearly. The message should be improved to avoid this confusion. You say that earlier versions of SmartEiffel accepted this code. If so, then that was a bug. You know that your code was ok, but there is no way for the compiler to verify this. Having a type-safe language is great, but this is one of the disadvantages. - Peter Gummer