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

Issue 10911217: Fix issue with optional named parameters. (Closed)

Created:
8 years, 3 months ago by regis
Modified:
8 years, 3 months ago
Reviewers:
hausner
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix issue with optional named parameters. Update tests. Committed: https://code.google.com/p/dart/source/detail?r=12214

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -13 lines) Patch
M runtime/vm/flow_graph_compiler_ia32.cc View 1 chunk +1 line, -2 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.cc View 1 chunk +1 line, -2 lines 0 comments Download
M tests/co19/co19-runtime.status View 1 chunk +5 lines, -0 lines 0 comments Download
M tests/language/language_dart2js.status View 1 chunk +1 line, -0 lines 0 comments Download
M tests/language/optional_named_parameters_test.dart View 2 chunks +9 lines, -9 lines 2 comments Download

Messages

Total messages: 3 (0 generated)
regis
8 years, 3 months ago (2012-09-11 17:32:02 UTC) #1
hausner
lgtm https://chromiumcodereview.appspot.com/10911217/diff/1/tests/language/optional_named_parameters_test.dart File tests/language/optional_named_parameters_test.dart (right): https://chromiumcodereview.appspot.com/10911217/diff/1/tests/language/optional_named_parameters_test.dart#newcode65 tests/language/optional_named_parameters_test.dart:65: Expect.equals(20, F10(20)); /// 01: runtime error The test ...
8 years, 3 months ago (2012-09-11 17:37:53 UTC) #2
regis
8 years, 3 months ago (2012-09-11 18:02:35 UTC) #3
Thansk!

https://chromiumcodereview.appspot.com/10911217/diff/1/tests/language/optiona...
File tests/language/optional_named_parameters_test.dart (right):

https://chromiumcodereview.appspot.com/10911217/diff/1/tests/language/optiona...
tests/language/optional_named_parameters_test.dart:65: Expect.equals(20,
F10(20));  /// 01: runtime error
On 2012/09/11 17:37:53, hausner wrote:
> The test has to run with --reject_named_argument_as_positional to trigger
these
> runtime errors, right? Don't you have to include
> VMOptions=--reject_named_argument_as_positional at the top of this file?

No, we always want to detect this error. The flag only relaxes the rules when
passing named arguments to positional parameters in [], but not when passing
positional arguments to named parameters in {}. This is actually what this cl
fixes.

Powered by Google App Engine
This is Rietveld 408576698