Chromium Code Reviews| Index: pkg/kernel/testcases/closures/captured_class_type_vars.dart |
| diff --git a/pkg/kernel/testcases/closures/captured_class_type_vars.dart b/pkg/kernel/testcases/closures/captured_class_type_vars.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..368616c5d964f13d7aae46ebee4048aa043a4f92 |
| --- /dev/null |
| +++ b/pkg/kernel/testcases/closures/captured_class_type_vars.dart |
| @@ -0,0 +1,16 @@ |
| +// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
|
Dmitry Stefantsov
2017/08/16 11:44:39
2016 ==> 2017
sjindel
2017/08/16 12:57:11
Done.
|
| +// for details. All rights reserved. Use of this source code is governed by a |
| +// BSD-style license that can be found in the LICENSE.md file. |
| + |
| +class Isgen<B> { |
| + getfn() { |
| + return (x) => x is B; |
| + } |
| +} |
| + |
| +main() { |
| + int x = 3; |
| + var isgen = new Isgen<String>(); |
| + var iser = isgen.getfn(); |
| + assert(!iser(x)); |
| +} |