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

Side by Side Diff: pkg/kernel/testcases/arity.dart

Issue 3000333002: Fix several bugs in closure conversion. (Closed)
Patch Set: Created 3 years, 4 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 /*
Dmitry Stefantsov 2017/08/24 09:41:13 Please, use line comments for the preamble here an
Dmitry Stefantsov 2017/08/24 09:41:13 I think this file belongs to `pkg/kernel/testcases
sjindel 2017/08/24 11:11:43 I think I just copied it from another file (maybe
2 * Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
3 * for details. All rights reserved. Use of this source code is governed by a
4 * BSD-style license that can be found in the LICENSE file.
5 */
6 main() {
7 var closures = [
8 (x, y, [z]) {},
9 (x, y, z) {},
10 (x, y, {z}) {},
11 (x, y, z, w, v) {}
12 ];
13 for (var c in closures) {
14 bool ok = false;
15 try {
16 c(1, 2, 3, 4);
17 } on NoSuchMethodError catch (_) {
18 ok = true;
19 }
20 if (!ok) {
21 throw new Exception("Expected an error!");
22 }
23 }
24 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698