Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(893)

Side by Side Diff: pkg/front_end/testcases/function_type_is_check.dart

Issue 2899693003: Fix crash with generalized function types in type tests. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2017, 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 import "package:expect/expect.dart" show Expect;
6
7 test(f) {
8 if (f is void Function(Object, StackTrace)) return 1;
9 if (f is void Function(Object)) return 10;
10 if (f is void Function()) return 100;
11 }
12
13 main() {
14 Expect.equals(
15 111,
16 test(() => null) +
17 test((Object o) => null) +
18 test((Object o, StackTrace t) => null));
19 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698