     @params      = params or []
     @body        = body or new Block
     @bound       = tag is 'boundfunc'
-    @isGenerator = @body.contains (node) ->
+    @isGenerator = !!@body.contains (node) ->
       node instanceof Op and node.operator in ['yield', 'yield*']
 
   children: ['params', 'body']

      else
        meth = 'call'
      func = new Value func, [new Access new Literal meth]
    (new Call func, args).compileNode o

  # If the code generation wishes to use the result of a complex expression
  # in multiple places, ensure that the expression is only ever evaluated once,

      @error 'yield statements must occur within a function generator.'
    if 'expression' in Object.keys @first
      parts.push @first.expression.compileToFragments o, LEVEL_OP if @first.expression?
    else
      parts.push [@makeCode "(#{op} "]
      parts.push @first.compileToFragments o, LEVEL_OP
      parts.push [@makeCode ")"]
    @joinFragmentArrays parts, ''

  compilePower: (o) ->
