Files
sdk/runtime/lib/function.dart
T
fschneider@google.com 37b30ab2ac Alternative fix for .call invocation of closures.
This also covers "closurization" of the .call method.
This relies on the fact that f.call === f if f is a closure.
This means that adding a simple getter to _FunctionImpl that
 returns this is enough. No need for a separate dispatch.

This CL reverts the previous fix for issue 12602 (modulo the
additional tests).

BUG=dartbug.com/17473, dartbug.com/12602
R=iposva@google.com

Review URL: https://codereview.chromium.org//200193002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33736 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 10:31:33 +00:00

13 lines
405 B
Dart

// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
class _FunctionImpl implements Function {
bool operator ==(other) native "FunctionImpl_equals";
int get hashCode native "FunctionImpl_hashCode";
_FunctionImpl get call => this;
}