[antlr-interest] anybody get bitten by ANTLR's AST interface
requirement
Sohail Somani
sohail at taggedtype.net
Tue Jan 24 20:54:31 PST 2006
On Tue, 2006-01-24 at 10:59 +0100, Martin Probst wrote:
> In code:
>
> class X { .. }
> class Y extends X { .. }
>
> class A {
> X foo();
> }
>
> class B extends A {
> Y foo(); // <-- !!!
> }
>
> The class B with the overriding foo() returning Y was not possible
> before, and it can really enhance complicated APIs. E.g. if you move
> down the API abstraction level you can now have the more concrete
> classes also return more concrete types, and that is nice.
Yes, these are covariant returns types in C++. Thanks for clarifying!
More information about the antlr-interest
mailing list