Functionness != callability. But it'll have to do.
On 9 Dec 2013 08:10, "Domenic Denicola" <notifications@github.com> wrote:

> In src/runtime/polyfills/Promise.js:
>
> > +        chain(y, deferred.resolve, deferred.reject);
> > +      else
> > +        deferred.resolve(y);
> > +    } catch (e) {
> > +      deferred.reject(e);
> > +    }
> > +  });
> > +}
> > +
> > +// This should really be a WeakMap.
> > +var thenableSymbol = '@@thenable';
> > +
> > +function promiseCoerce(constructor, x) {
> > +  if (isPromise(x)) {
> > +    return x;
> > +  } else if (x && 'then' in Object(x)) {  // can't test for callable
>
> This is out of context, so I might not be understanding what your comment
> means, but you can definitely test for callability: typeof then ===
> "function".
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/google/traceur-compiler/pull/520/files#r8201363>
> .
>