fa43799461
Fixes https://github.com/dart-lang/sdk/issues/39283 Change-Id: I5a5fdf158c6a7ce068be36754ea0487cb754584b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124470 Reviewed-by: Régis Crelier <regis@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>
23 lines
484 B
Dart
23 lines
484 B
Dart
// Copyright (c) 2019, 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 {
|
|
dynamic foo(a) {
|
|
baz() {
|
|
Expect.fail('Should not be reachable');
|
|
}
|
|
|
|
return baz;
|
|
}
|
|
}
|
|
|
|
main() {
|
|
Expect.throws(() {
|
|
dynamic x = A().foo(1);
|
|
x<List>();
|
|
}, (e) => e is NoSuchMethodError);
|
|
}
|