Files
sdk/compiler/lib/implementation/bool.js
T
johnlenz@google.com 95578019c0 Changes "is" and equality checks to strictly check for primitive types, fix a couple of
places we were converting primitives to Object types by "this" coersions.

Fixes issue 79.
Review URL: http://codereview.chromium.org//8286001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@456 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-14 21:27:14 +00:00

16 lines
468 B
JavaScript

// Copyright (c) 2011, 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.
function native_BoolImplementation_EQ(other) {
return typeof other == 'boolean' && this == other;
}
function native_BoolImplementation_toString() {
return this.toString();
}
function native_BoolImplementation_toBool() {
return this == true;
}