 
 findSuperClassChain = (ctx, className, targetClassName) ->
   for s in (ctx.classNamed className).supers
-    if s is targetClassName
-      return [s]
+    if s.className is targetClassName
+      return [s.className]
     else if chain = findSuperClassChain ctx, s, targetClassName
       return join [s], chain
   undefined

          ctx.addClass name, classConstraint, superClasses, freshedDeclarations
          declareMethods ctx, classConstraint, freshedDeclarations

          translateDict name, (keysOfMap freshedDeclarations), superClasses
        else
          jsNoop()
    else
      jsNoop()

findClassType = (ctx, params, className, paramNames, methods) ->
  kinds = mapMap (-> undefined), (arrayToSet paramNames)

    else
      constraints = typeConstraintsCompile ctx, _terms constraintSeq

    superClasses = map (quantifyConstraintFor paramNames), constraints
    superClassNames = map (({className}) -> className), constraints

    # TODO: defer if not all declared to prevent cycles in classes
    #   allDeclared = (ctx.isClass c for c in superClasses)
