Johnni Winther | d690a0c | 2020-04-20 07:03:55 +0000 | [diff] [blame] | 1 | // Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file |
| 2 | // for details. All rights reserved. Use of this source code is governed by a |
| 3 | // BSD-style license that can be found in the LICENSE file. |
| 4 | |
| 5 | // @dart=2.6 |
| 6 | library opted_out_lib; |
| 7 | |
| 8 | import 'issue41498b_lib.dart' as opt_in; |
| 9 | |
| 10 | typedef void LegacyFoo(); |
| 11 | |
| 12 | class C { |
| 13 | static void test() { |
| 14 | LegacyFoo f; |
| 15 | |
| 16 | f.toString(); // ok |
| 17 | } |
| 18 | |
| 19 | void test2() { |
| 20 | LegacyFoo f; |
| 21 | |
| 22 | f.toString(); // ok |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | test() { |
| 27 | LegacyFoo f; |
| 28 | |
| 29 | f.toString(); // ok |
| 30 | |
| 31 | Function foo = () { |
| 32 | LegacyFoo f; |
| 33 | |
| 34 | f.toString(); // ok |
| 35 | }; |
| 36 | C.test(); |
| 37 | new C().test2(); |
| 38 | } |
| 39 | |
| 40 | main() { |
| 41 | opt_in.main(); |
| 42 | } |