/* -*-objc-*- */

/* 
  $Header$
  $Author: dglattin $
  $Date$
  $Log$
 */

#include  <Object.h>
#include  <stdio.h>


@interface SubClass1 : Object {}
+ ( int )return12;
- ( int )return15;
@end

@implementation SubClass1
+ ( int )return12 { return 12; }
- ( int )return15 { return 15; }
@end



@interface SubClass4 : SubClass1 {}
+ ( int )return12;
- ( int )return15;
@end

@implementation SubClass4
+ ( int )return12 { 

                            /* Due to compiler design, 
                              this should not be a infinite loop. */
  [ SubClass1 new ];    
  [ SubClass4 new ];    
  return [ super return12 ] + 1 ; 
}


- ( int )return15 { 


  [ SubClass1 new ];    /* Due to compiler design, 
                              this should not be a infinite loop. */
  return [ super return15 ]; 
}
@end



void  main (void) {


  [ SubClass4 poseAs:[ SubClass1 class ]];
  printf ("%d\n", [ SubClass4 return12 ]);
}