public static StandardObject walkedExpressionType(Stella_Object tree) {
    { Surrogate testValue000 = Stella_Object.safePrimaryType(tree);

      if (testValue000 == Stella.SGT_STELLA_CONS) {
        { Cons tree000 = ((Cons)(tree));

          if (tree000.value == Stella.SYM_STELLA_TYPED_SYS) {
            return (((StandardObject)(tree000.rest.rest.value)));
          }
        }
      }
      else if (Surrogate.subtypeOfWrapperP(testValue000)) {
        { Wrapper tree000 = ((Wrapper)(tree));

          return (Surrogate.wrappedTypeToType(tree000.primaryType()));
        }
      }
      else {
      }
    }
    return (Stella.SGT_STELLA_UNKNOWN);
  }