mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 14:32:49 +00:00
38319b0f33
Add regression test. R=hausner@google.com Review URL: https://codereview.chromium.org//293013005 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36402 260f80e4-7a28-3924-810f-c04153c831b5
25 lines
639 B
Dart
25 lines
639 B
Dart
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
// Regression test for issue 18435.
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
main() {
|
|
const MISSING_VALUE = "MISSING_VALUE";
|
|
|
|
void foo([var p1 = MISSING_VALUE, var p2 = MISSING_VALUE]) {
|
|
Expect.equals("P1", p1);
|
|
Expect.equals("P2", p2);
|
|
}
|
|
|
|
void bar([var p1 = "MISSING_VALUE", var p2 = "MISSING_VALUE"]) {
|
|
Expect.equals("P1", p1);
|
|
Expect.equals("P2", p2);
|
|
}
|
|
|
|
foo("P1", "P2");
|
|
bar("P1", "P2");
|
|
}
|