| Index: tests/compiler/dart2js_optimizer/call_site_types_1_test.dart
|
| diff --git a/tests/language/compile_time_constant_p_test.dart b/tests/compiler/dart2js_optimizer/call_site_types_1_test.dart
|
| similarity index 52%
|
| copy from tests/language/compile_time_constant_p_test.dart
|
| copy to tests/compiler/dart2js_optimizer/call_site_types_1_test.dart
|
| index a0ff240865f126781264a7375416950bab92f910..5de399b0c2507249ec87490ed39a7558e125492d 100644
|
| --- a/tests/language/compile_time_constant_p_test.dart
|
| +++ b/tests/compiler/dart2js_optimizer/call_site_types_1_test.dart
|
| @@ -2,19 +2,16 @@
|
| // 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.
|
|
|
| +// Test that different types at call sites still handles parameters correct.
|
| class A {
|
| - const A(
|
| - this.x /// 01: compile-time error
|
| - );
|
| - final x = null;
|
| + x(p) => p[0];
|
| }
|
|
|
| -class B extends A {
|
| - const B();
|
| +f(a) {
|
| + Expect.isNull(a.x(new List(1)));
|
| + Expect.throws(() => new A().x(1), (e) => e is NoSuchMethodException);
|
| }
|
|
|
| -var b = const B();
|
| -
|
| main() {
|
| - Expect.equals(null, b.x);
|
| + f(new A());
|
| }
|
|
|