cvsuser     04/03/17 10:51:53

  Modified:    ops      object.ops
  Log:
  Croak in the correct place if the class doesn't exist
  
  Revision  Changes    Path
  1.35      +2 -2      parrot/ops/object.ops
  
  Index: object.ops
  ===================================================================
  RCS file: /cvs/public/parrot/ops/object.ops,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -w -r1.34 -r1.35
  --- object.ops        17 Mar 2004 15:21:52 -0000      1.34
  +++ object.ops        17 Mar 2004 18:51:52 -0000      1.35
  @@ -190,7 +190,7 @@
   op subclass(out PMC, in STR, in STR) {
     PMC *class = VTABLE_get_pmc_keyed_str(interpreter,
         interpreter->class_hash, $2);
  -  if (!class) {
  +  if (!class || !PObj_is_class_TEST(class)) {
       internal_exception(NO_CLASS, "Class doesn't exist");
     }
     $1 = Parrot_single_subclass(interpreter, class, $3);
  @@ -200,7 +200,7 @@
   op subclass(out PMC, in STR) {
     PMC *class = VTABLE_get_pmc_keyed_str(interpreter,
         interpreter->class_hash, $2);
  -  if (!class) {
  +  if (!class || !PObj_is_class_TEST(class)) {
       internal_exception(NO_CLASS, "Class doesn't exist");
     }
     $1 = Parrot_single_subclass(interpreter, class, NULL);
  
  
  

Reply via email to