Files
sdk/tests/language_2/parameter_initializer5_test.dart
T
Régis Crelier 6504f342ab [VM] Remove obsolete flags.
--generic_method_syntax
--assert_initializer
--warn_super
--initializing_formal_access

Change-Id: Id2e9f15b1dfecb933df97fb954618ce122cb3e4b
Reviewed-on: https://dart-review.googlesource.com/15643
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2017-10-20 18:13:00 +00:00

15 lines
354 B
Dart

// Copyright (c) 2011, 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.
// Use the this.x parameter in an initializer expression.
class Foo {
var x, y;
Foo(this.x) : y = x {}
}
main() {
new Foo(12);
}