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

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

Issue 3000333002: Fix several bugs in closure conversion. (Closed)
Patch Set: Fix bugs. Created 3 years, 3 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.
Dmitry Stefantsov 2017/08/24 11:49:57 Please, add a description to this test case.
sjindel 2017/08/24 14:50:13 Done.
4 main() {
5 var closures = [
6 (x, y, [z]) {},
7 (x, y, z) {},
8 (x, y, {z}) {},
9 (x, y, z, w, v) {}
10 ];
11 for (var c in closures) {
12 bool ok = false;
13 try {
14 c(1, 2, 3, 4);
15 } on NoSuchMethodError catch (_) {
16 ok = true;
17 }
18 if (!ok) {
19 throw new Exception("Expected an error!");
20 }
21 }
22 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698