Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!accuvax.nwu.edu!nucsrl!gore!jacob From: jacob@gore.com (Jacob Gore) Newsgroups: comp.sys.next Subject: Deferred methods and strong typing Message-ID: <130007@gore.com> Date: 5 Jul 89 08:41:34 GMT Reply-To: jacob@gore.com (Jacob Gore) Organization: Gore Enterprises Lines: 39 Consider a class that has a deferred method: A.h: #import @interface A:Object {...} - (A*)someMethod; ... @end A.m: #import "A.h" - (A*)someMethod { return [self subclassResponsibility]; } and a subclass that implements that method: B.h: #import "A.h" @interface B:A {...} - (B*)someMethod; ... @end B.m: #import "B.h" - (B*)someMethod { ... actual implementation ... } Now, consider the use of someMethod: C.m: #import "B.h" ... [anInstanceOfB someMethod]; Intuition tells me that B's someMethod is to be used. But the compiler in 0.9 gives a "multiple declarations for method `someMethod'" warning, and then uses A's someMethod. What's the scoop? -- Jacob Gore Jacob@Gore.Com {nucsrl,boulder}!gore!jacob