mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 15:01:29 +00:00
8cdd9d323c
Tests that have begun failing due to this change are marked with a reference to issue #31402. Change-Id: I1fa7490f6143bd6ceca80f831e0196b16c497966 Reviewed-on: https://dart-review.googlesource.com/20907 Commit-Queue: Paul Berry <paulberry@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com>
21 lines
420 B
Dart
21 lines
420 B
Dart
// Copyright (c) 2017, 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.
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
class A {}
|
|
|
|
class B extends A {}
|
|
|
|
void f(B b) {}
|
|
|
|
main() {
|
|
A a1 = new B();
|
|
A a2 = new A();
|
|
f(a1); // No error
|
|
Expect.throwsTypeError(() {
|
|
f(a2);
|
|
});
|
|
}
|