 
       methods = map (({rhs}) -> rhs), methodsDeclarations
       # log "methods", methods
-      methodTypes = (rhs.tea for [lhs, rhs] in definitions)
+      methodTypes = (rhs?.tea for [lhs, rhs] in definitions)
       if not all methodTypes
         malformed ctx, call, "missing type of a method"
         return jsNoop()

    hasName = requireName ctx, 'Name required to declare a new instance'

    [instanceConstraint, defs...] = _validArguments call
    if not isValidTypeConstraint ctx, instanceConstraint
      return jsNoop()
    else
      instanceType = typeConstraintCompile ctx, instanceConstraint
    [constraintSeq, wheres...] = defs


isValidTypeConstraint = (ctx, expression) ->
  if isCall expression
    if (not isAtom (op = _operator expression)) or isFake op
      malformed ctx, expression, 'Class name required in a constraint'
      return no
  else
