blob: 6c2d3da9db5bfd939305cec5af9267db367d50e0 [file] [log] [blame]
// 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.
/**
* @assertion A generative constructor may be redirecting, in which case its
* only action is to invoke another generative constructor. A redirecting
* constructor has no body; instead, it has a redirect clause that specifies
* which constructor the invocation is redirected to, and with what arguments.
* redirection:
* ':' this ('.' identifier)? arguments
* ;
* @description Checks that an attempt to combine property initialization with
* constructor redirection results in a compile error.
* @compile-error
* @author pagolubev
*/
class C {
C() : x = -1, this.init();
C.init();
var x;
}
main() {
new C();
}