| import 'messages_with_types_opt_out.dart'; |
| |
| class SubInIn extends SuperIn { |
| String? nullableSame() => "foo"; |
| String nonNullableSame() => "bar"; |
| T? nullableBad<T>(T t) => null; |
| T nonNullableBad<T>(T t) => t; |
| } |
| |
| class SubOutIn extends SuperOut { |
| String? nullableSame() => "foo"; |
| String nonNullableSame() => "bar"; |
| T? nullableBad<T>(T t) => null; |
| T nonNullableBad<T>(T t) => t; |
| } |
| |
| class SuperIn { |
| String? nullableSame() => "foo"; |
| String nonNullableSame() => "bar"; |
| int? nullableBad<T>(T t) => 1; |
| int nonNullableBad<T>(T t) => 2; |
| } |
| |
| double nonNullableVar = 4.0; |
| int Function()? nullableVar = () => 3; |
| testOptIn() {} |