mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:19:48 +00:00
6e988a6d26
Change-Id: I39fc62d6eab731f6defe2a1c11eb21c1ba7ed072 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151627 Auto-Submit: Bob Nystrom <rnystrom@google.com> Commit-Queue: Bob Nystrom <rnystrom@google.com> Commit-Queue: Nicholas Shahan <nshahan@google.com> Reviewed-by: Nicholas Shahan <nshahan@google.com>
21 lines
622 B
Dart
21 lines
622 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.
|
|
|
|
// Regression test for dart2js that used to consider that the
|
|
// intersection of [Comparable] and [num] is conflicting.
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
class A {
|
|
foo(a, Comparable b) => a == b;
|
|
bar(a, Comparable b) => b == a;
|
|
}
|
|
|
|
main() {
|
|
Expect.isFalse(new A().foo(1, 'foo'));
|
|
Expect.isTrue(new A().foo(1, 1));
|
|
Expect.isFalse(new A().bar(1, 'foo'));
|
|
Expect.isTrue(new A().bar(1, 1));
|
|
}
|