dart-sdk/tests/language/typed_equality_test.dart
hausner@google.com bf5835d89e BREAKING CHANGE: Remove === and !== in the VM compiler
This change is long overdue. Fixed the last places where we
still used ===.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23751 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-07 16:31:33 +00:00

22 lines
532 B
Dart

// Copyright (c) 2012, 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.
// Regression test for http://dartbug.com/6036. dart2js used to fail
// this method because it was computing that intersecting type D with
// type C is conflicting.
foo(a, b) {
if (identical(a, b)) return;
throw 'broken';
}
class D {}
class C implements D {}
main() {
var c = new C();
foo(c, c as D);
}