diff --git a/Language/Classes/Constructors/Constant_Constructors/invalid_constant_initializer_t01.dart b/Language/Classes/Constructors/Constant_Constructors/invalid_constant_initializer_t01.dart index 05eb867447..a923d3d5b9 100644 --- a/Language/Classes/Constructors/Constant_Constructors/invalid_constant_initializer_t01.dart +++ b/Language/Classes/Constructors/Constant_Constructors/invalid_constant_initializer_t01.dart @@ -1,26 +1,26 @@ -// 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 When invoked from a constant object expression, a constant -/// constructor must throw an exception if any of its actual parameters is a -/// value that would prevent one of the potentially constant expressions within -/// it from being a valid compile-time constant. -/// @description Checks that compile-time error is produced if actual parameters -/// passed to the constructor make the constant initializer invalid. Note: this -/// mechanism is described in Classes.Constructors.Constant_Constructors. -/// @author iefremov - - -class A { - final x; - const A(var p) : x = p + 42; -} - -main() { - DateTime d = new DateTime.now(); - var a = const A(d.millisecond); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 When invoked from a constant object expression, a constant +/// constructor must throw an exception if any of its actual parameters is a +/// value that would prevent one of the potentially constant expressions within +/// it from being a valid compile-time constant. +/// @description Checks that compile-time error is produced if actual parameters +/// passed to the constructor make the constant initializer invalid. Note: this +/// mechanism is described in Classes.Constructors.Constant_Constructors. +/// @author iefremov + + +class A { + final x; + const A(var p) : x = p + 42; +} + +main() { + DateTime d = new DateTime.now(); + var a = const A(d.millisecond); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Classes/Constructors/Constant_Constructors/invalid_constant_initializer_t02.dart b/Language/Classes/Constructors/Constant_Constructors/invalid_constant_initializer_t02.dart index 6ce594a239..cdbac705bd 100644 --- a/Language/Classes/Constructors/Constant_Constructors/invalid_constant_initializer_t02.dart +++ b/Language/Classes/Constructors/Constant_Constructors/invalid_constant_initializer_t02.dart @@ -1,32 +1,32 @@ -// 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 When invoked from a constant object expression, a constant -/// constructor must throw an exception if any of its actual parameters is a -/// value that would prevent one of the potentially constant expressions within -/// it from being a valid compile-time constant. -/// @description Checks that compile-time error is produced if actual parameters -/// passed to the constructor make the constant initializer invalid. Note: this -/// mechanism is described in Classes.Constructors.Constant_Constructors. -/// @author iefremov - - -class A { - final x; - const A(var p) : x = p + 42; -} - -class IntPair { - const IntPair(this.x, this.y); - final int x; - final int y; - operator +(int v) => new IntPair(x + v, y + v); -} - -main() { - var a = const A(const IntPair(1, 2)); // parameter does not evaluate to int/bool/String, despite implementing the plus operator -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 When invoked from a constant object expression, a constant +/// constructor must throw an exception if any of its actual parameters is a +/// value that would prevent one of the potentially constant expressions within +/// it from being a valid compile-time constant. +/// @description Checks that compile-time error is produced if actual parameters +/// passed to the constructor make the constant initializer invalid. Note: this +/// mechanism is described in Classes.Constructors.Constant_Constructors. +/// @author iefremov + + +class A { + final x; + const A(var p) : x = p + 42; +} + +class IntPair { + const IntPair(this.x, this.y); + final int x; + final int y; + operator +(int v) => new IntPair(x + v, y + v); +} + +main() { + var a = const A(const IntPair(1, 2)); // parameter does not evaluate to int/bool/String, despite implementing the plus operator +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Classes/Constructors/Constant_Constructors/invalid_constant_initializer_t03.dart b/Language/Classes/Constructors/Constant_Constructors/invalid_constant_initializer_t03.dart index 97b8e414e0..bd7e0baf67 100644 --- a/Language/Classes/Constructors/Constant_Constructors/invalid_constant_initializer_t03.dart +++ b/Language/Classes/Constructors/Constant_Constructors/invalid_constant_initializer_t03.dart @@ -1,29 +1,29 @@ -// 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 When invoked from a constant object expression, a constant -/// constructor must throw an exception if any of its actual parameters is a -/// value that would prevent one of the potentially constant expressions within -/// it from being a valid compile-time constant. -/// @description Checks that compile-time error is produced if actual parameters -/// passed to the constructor make the constant initializer invalid. Note: this -/// mechanism is described in chapter Classes.Constructors.Constant_Constructors. -/// Constant constructor invocation is placed outside of main(), in a global -/// variable initialization expression. -/// @author iefremov - - -class A { - final x; - const A(var p) : x = p + 42; -} - -var a = const A(new DateTime.now().millisecondsSinceEpoch); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - var b = a; -} +// 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 When invoked from a constant object expression, a constant +/// constructor must throw an exception if any of its actual parameters is a +/// value that would prevent one of the potentially constant expressions within +/// it from being a valid compile-time constant. +/// @description Checks that compile-time error is produced if actual parameters +/// passed to the constructor make the constant initializer invalid. Note: this +/// mechanism is described in chapter Classes.Constructors.Constant_Constructors. +/// Constant constructor invocation is placed outside of main(), in a global +/// variable initialization expression. +/// @author iefremov + + +class A { + final x; + const A(var p) : x = p + 42; +} + +var a = const A(new DateTime.now().millisecondsSinceEpoch); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + var b = a; +} diff --git a/Language/Classes/Constructors/Constant_Constructors/non_final_instance_variable_t01.dart b/Language/Classes/Constructors/Constant_Constructors/non_final_instance_variable_t01.dart index ec4fccea7d..85f20536f7 100644 --- a/Language/Classes/Constructors/Constant_Constructors/non_final_instance_variable_t01.dart +++ b/Language/Classes/Constructors/Constant_Constructors/non_final_instance_variable_t01.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if a constant constructor is declared -/// by a class that has a non-final instance variable. -/// @description Checks that a compile-time error is produced when a class with -/// constant constructor also declares a non-final instance variable. -/// @author iefremov - - -class A { - const A(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - var x; -} - -main() { - const A(); -} +// 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 It is a compile-time error if a constant constructor is declared +/// by a class that has a non-final instance variable. +/// @description Checks that a compile-time error is produced when a class with +/// constant constructor also declares a non-final instance variable. +/// @author iefremov + + +class A { + const A(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + var x; +} + +main() { + const A(); +} diff --git a/Language/Classes/Constructors/Constant_Constructors/non_final_instance_variable_t02.dart b/Language/Classes/Constructors/Constant_Constructors/non_final_instance_variable_t02.dart index 22c88b4c3b..58b9fc5143 100644 --- a/Language/Classes/Constructors/Constant_Constructors/non_final_instance_variable_t02.dart +++ b/Language/Classes/Constructors/Constant_Constructors/non_final_instance_variable_t02.dart @@ -1,28 +1,28 @@ -// 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 It is a compile-time error if a constant constructor is declared -/// by a class that has a non-final instance variable. -/// @description Checks that compile-time error is produced when a class with -/// constant constructor inherits a non-final instance variable. -/// @author iefremov - - -class C { - var x; -} - -class CC extends C { -} - -class A extends CC { - const A(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - const A(); -} +// 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 It is a compile-time error if a constant constructor is declared +/// by a class that has a non-final instance variable. +/// @description Checks that compile-time error is produced when a class with +/// constant constructor inherits a non-final instance variable. +/// @author iefremov + + +class C { + var x; +} + +class CC extends C { +} + +class A extends CC { + const A(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + const A(); +} diff --git a/Language/Classes/Constructors/Constant_Constructors/potentially_constant_expression_t01.dart b/Language/Classes/Constructors/Constant_Constructors/potentially_constant_expression_t01.dart index ee3404d4e1..5bf36260f6 100644 --- a/Language/Classes/Constructors/Constant_Constructors/potentially_constant_expression_t01.dart +++ b/Language/Classes/Constructors/Constant_Constructors/potentially_constant_expression_t01.dart @@ -1,31 +1,31 @@ -// 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 Any expression that appears within the initializer list of a -/// constant constructor must be a potentially constant expression, or a -/// compile-time error occurs. -/// -/// A potentially constant expression is an expression E that would be a valid -/// constant expression if all formal parameters of E's immediately enclosing -/// constant constructor were treated as compile-time constants that were -/// guaranteed to evaluate to an integer, boolean or string value as required -/// by their immediately enclosing superexpression. -/// @description Checks that it is a compile-time error when a constant -/// constructor's initializer list contains non-constant list literal. -/// @author iefremov - - -class A { - final x; - const A(var p) : x = [p]; -// ^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - const A(1); -// ^ -// [analyzer] unspecified -} +// 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 Any expression that appears within the initializer list of a +/// constant constructor must be a potentially constant expression, or a +/// compile-time error occurs. +/// +/// A potentially constant expression is an expression E that would be a valid +/// constant expression if all formal parameters of E's immediately enclosing +/// constant constructor were treated as compile-time constants that were +/// guaranteed to evaluate to an integer, boolean or string value as required +/// by their immediately enclosing superexpression. +/// @description Checks that it is a compile-time error when a constant +/// constructor's initializer list contains non-constant list literal. +/// @author iefremov + + +class A { + final x; + const A(var p) : x = [p]; +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + const A(1); +// ^ +// [analyzer] unspecified +} diff --git a/Language/Classes/Constructors/Constant_Constructors/potentially_constant_expression_t02.dart b/Language/Classes/Constructors/Constant_Constructors/potentially_constant_expression_t02.dart index 77a8665c1e..7750983d14 100644 --- a/Language/Classes/Constructors/Constant_Constructors/potentially_constant_expression_t02.dart +++ b/Language/Classes/Constructors/Constant_Constructors/potentially_constant_expression_t02.dart @@ -1,33 +1,33 @@ -// 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 Any expression that appears within the initializer list of a -/// constant constructor must be a potentially constant expression, or a -/// compile-time error occurs. -/// -/// A potentially constant expression is an expression E that would be a valid -/// constant expression if all formal parameters of E's immediately enclosing -/// constant constructor were treated as compile-time constants that were -/// guaranteed to evaluate to an integer, boolean or string value as required -/// by their immediately enclosing superexpression. -/// @description Checks that it is a compile-time error when a constant -/// constructor's initializer list contains a function call. -/// @author iefremov - - -f() {} - -class A { - final x; - const A() : x = f(); -// ^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - const A(); -// ^ -// [analyzer] unspecified -} +// 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 Any expression that appears within the initializer list of a +/// constant constructor must be a potentially constant expression, or a +/// compile-time error occurs. +/// +/// A potentially constant expression is an expression E that would be a valid +/// constant expression if all formal parameters of E's immediately enclosing +/// constant constructor were treated as compile-time constants that were +/// guaranteed to evaluate to an integer, boolean or string value as required +/// by their immediately enclosing superexpression. +/// @description Checks that it is a compile-time error when a constant +/// constructor's initializer list contains a function call. +/// @author iefremov + + +f() {} + +class A { + final x; + const A() : x = f(); +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + const A(); +// ^ +// [analyzer] unspecified +} diff --git a/Language/Classes/Constructors/Constant_Constructors/potentially_constant_expression_t03.dart b/Language/Classes/Constructors/Constant_Constructors/potentially_constant_expression_t03.dart index 76e2fd885f..162be562f3 100644 --- a/Language/Classes/Constructors/Constant_Constructors/potentially_constant_expression_t03.dart +++ b/Language/Classes/Constructors/Constant_Constructors/potentially_constant_expression_t03.dart @@ -1,31 +1,31 @@ -// 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 Any expression that appears within the initializer list of a -/// constant constructor must be a potentially constant expression, or a -/// compile-time error occurs. -/// -/// A potentially constant expression is an expression E that would be a valid -/// constant expression if all formal parameters of E's immediately enclosing -/// constant constructor were treated as compile-time constants that were -/// guaranteed to evaluate to an integer, boolean or string value as required -/// by their immediately enclosing superexpression. -/// @description Checks that it is a compile-time error when a constant -/// constructor's initializer list contains an instance creation expression. -/// @author iefremov - - -class A { - final x; - const A() : x = new List.from([]); -// ^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - const A(); -// ^ -// [analyzer] unspecified -} +// 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 Any expression that appears within the initializer list of a +/// constant constructor must be a potentially constant expression, or a +/// compile-time error occurs. +/// +/// A potentially constant expression is an expression E that would be a valid +/// constant expression if all formal parameters of E's immediately enclosing +/// constant constructor were treated as compile-time constants that were +/// guaranteed to evaluate to an integer, boolean or string value as required +/// by their immediately enclosing superexpression. +/// @description Checks that it is a compile-time error when a constant +/// constructor's initializer list contains an instance creation expression. +/// @author iefremov + + +class A { + final x; + const A() : x = new List.from([]); +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + const A(); +// ^ +// [analyzer] unspecified +} diff --git a/Language/Classes/Constructors/Constant_Constructors/superinitializer_t01.dart b/Language/Classes/Constructors/Constant_Constructors/superinitializer_t01.dart index 5112a00f41..56e1b1f66e 100644 --- a/Language/Classes/Constructors/Constant_Constructors/superinitializer_t01.dart +++ b/Language/Classes/Constructors/Constant_Constructors/superinitializer_t01.dart @@ -1,27 +1,27 @@ -// 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 The superinitializer that appears, explicitly or implicitly, -/// in the initializer list of a constant constructor must specify a constant -/// constructor of the superclass of the immediately enclosing class or a -/// compile-time error occurs. -/// @description Checks that compile error is produced if implicit -/// superinitializer is a call to non const constructor -/// @author ilya - - -class C { - C(); -} - -class A extends C { - const A(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - const A(); -} +// 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 The superinitializer that appears, explicitly or implicitly, +/// in the initializer list of a constant constructor must specify a constant +/// constructor of the superclass of the immediately enclosing class or a +/// compile-time error occurs. +/// @description Checks that compile error is produced if implicit +/// superinitializer is a call to non const constructor +/// @author ilya + + +class C { + C(); +} + +class A extends C { + const A(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + const A(); +} diff --git a/Language/Classes/Constructors/Constant_Constructors/superinitializer_t02.dart b/Language/Classes/Constructors/Constant_Constructors/superinitializer_t02.dart index e4b7ed3930..7b585f53e0 100644 --- a/Language/Classes/Constructors/Constant_Constructors/superinitializer_t02.dart +++ b/Language/Classes/Constructors/Constant_Constructors/superinitializer_t02.dart @@ -1,28 +1,28 @@ -// 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 The superinitializer that appears, explicitly or implicitly, -/// in the initializer list of a constant constructor must specify a constant -/// constructor of the superclass of the immediately enclosing class or a -/// compile-time error occurs. -/// @description Checks that compile error is produced if explicit -/// superinitializer is a call to non const constructor -/// @author ilya - - -class C { - const C(); - C.nonConst(); -} - -class A extends C { - const A() : super.nonConst(); -// ^^^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - const A(); -} +// 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 The superinitializer that appears, explicitly or implicitly, +/// in the initializer list of a constant constructor must specify a constant +/// constructor of the superclass of the immediately enclosing class or a +/// compile-time error occurs. +/// @description Checks that compile error is produced if explicit +/// superinitializer is a call to non const constructor +/// @author ilya + + +class C { + const C(); + C.nonConst(); +} + +class A extends C { + const A() : super.nonConst(); +// ^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + const A(); +} diff --git a/Language/Classes/Constructors/Constant_Constructors/syntax_t02.dart b/Language/Classes/Constructors/Constant_Constructors/syntax_t02.dart index e426a83e55..9d907b5a19 100644 --- a/Language/Classes/Constructors/Constant_Constructors/syntax_t02.dart +++ b/Language/Classes/Constructors/Constant_Constructors/syntax_t02.dart @@ -1,26 +1,26 @@ -// 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 -/// constantConstructorSignature: -/// const qualified formalParameterList -/// ; -/// @description Checks that it is a compile-time error if the constructor name -/// is missing. -/// @author iefremov - - -class A { - const (); -//^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - const A(); -//^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// constantConstructorSignature: +/// const qualified formalParameterList +/// ; +/// @description Checks that it is a compile-time error if the constructor name +/// is missing. +/// @author iefremov + + +class A { + const (); +//^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + const A(); +//^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Classes/Constructors/Constant_Constructors/syntax_t03.dart b/Language/Classes/Constructors/Constant_Constructors/syntax_t03.dart index 86c5647f82..0d9e37419b 100644 --- a/Language/Classes/Constructors/Constant_Constructors/syntax_t03.dart +++ b/Language/Classes/Constructors/Constant_Constructors/syntax_t03.dart @@ -1,26 +1,26 @@ -// 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 -/// constantConstructorSignature: -/// const qualified formalParameterList -/// ; -/// @description Checks that it is a compile-time error if the constructor formal -/// parameters are missing. -/// @author iefremov - - -class A { - const A; -//^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - const A(); -//^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// constantConstructorSignature: +/// const qualified formalParameterList +/// ; +/// @description Checks that it is a compile-time error if the constructor formal +/// parameters are missing. +/// @author iefremov + + +class A { + const A; +//^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + const A(); +//^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Classes/Constructors/Constant_Constructors/syntax_t04.dart b/Language/Classes/Constructors/Constant_Constructors/syntax_t04.dart index 196f529719..bfdbc194dc 100644 --- a/Language/Classes/Constructors/Constant_Constructors/syntax_t04.dart +++ b/Language/Classes/Constructors/Constant_Constructors/syntax_t04.dart @@ -1,27 +1,27 @@ -// 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 -/// constantConstructorSignature: -/// const qualified formalParameterList -/// ; -/// @description Checks that it is a compile-time error if the semicolon at the -/// end of constructor declaration is missing. -/// @author iefremov - - -class A { - const A() -//^^^^^ -// [cfe] unspecified - } -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - const A(); -// ^ -// [cfe] unspecified -} +// 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 +/// constantConstructorSignature: +/// const qualified formalParameterList +/// ; +/// @description Checks that it is a compile-time error if the semicolon at the +/// end of constructor declaration is missing. +/// @author iefremov + + +class A { + const A() +//^^^^^ +// [cfe] unspecified + } +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + const A(); +// ^ +// [cfe] unspecified +} diff --git a/Language/Classes/Constructors/Constant_Constructors/syntax_t05.dart b/Language/Classes/Constructors/Constant_Constructors/syntax_t05.dart index dc656d75e2..eff727311b 100644 --- a/Language/Classes/Constructors/Constant_Constructors/syntax_t05.dart +++ b/Language/Classes/Constructors/Constant_Constructors/syntax_t05.dart @@ -1,23 +1,23 @@ -// 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 -/// constantConstructorSignature: -/// const qualified formalParameterList -/// ; -/// @description Checks that it is a compile-time error when a constant default -/// constructor is declared as abstract. -/// @author rodionov - - -class C { - const abstract C(); -// ^^^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - const C(); -} +// 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 +/// constantConstructorSignature: +/// const qualified formalParameterList +/// ; +/// @description Checks that it is a compile-time error when a constant default +/// constructor is declared as abstract. +/// @author rodionov + + +class C { + const abstract C(); +// ^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + const C(); +} diff --git a/Language/Classes/Constructors/Constant_Constructors/syntax_t06.dart b/Language/Classes/Constructors/Constant_Constructors/syntax_t06.dart index 44f894912b..1a76cd3d91 100644 --- a/Language/Classes/Constructors/Constant_Constructors/syntax_t06.dart +++ b/Language/Classes/Constructors/Constant_Constructors/syntax_t06.dart @@ -1,23 +1,23 @@ -// 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 -/// constantConstructorSignature: -/// const qualified formalParameterList -/// ; -/// @description Checks that it is a compile-time error when a constant named -/// constructor is declared as abstract. -/// @author rodionov - - -class C { - const abstract C.id(); -// ^^^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - const C.id(); -} +// 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 +/// constantConstructorSignature: +/// const qualified formalParameterList +/// ; +/// @description Checks that it is a compile-time error when a constant named +/// constructor is declared as abstract. +/// @author rodionov + + +class C { + const abstract C.id(); +// ^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + const C.id(); +} diff --git a/Language/Classes/Constructors/Factories/name_t01.dart b/Language/Classes/Constructors/Factories/name_t01.dart index 4c1464e790..432e2664cf 100644 --- a/Language/Classes/Constructors/Factories/name_t01.dart +++ b/Language/Classes/Constructors/Factories/name_t01.dart @@ -1,23 +1,23 @@ -// 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 It is a compile-time error if M is not the name of the immediately -/// enclosing class. -/// @description Checks that it's a compile-time error when factory keyword is -/// followed by a name that is not a constructor name. -/// @author rodionov - - -class C { - factory WrongClass() => throw "Should not reach here"; -// ^^^^^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -// ^ -// [cfe] unspecified -} +// 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 It is a compile-time error if M is not the name of the immediately +/// enclosing class. +/// @description Checks that it's a compile-time error when factory keyword is +/// followed by a name that is not a constructor name. +/// @author rodionov + + +class C { + factory WrongClass() => throw "Should not reach here"; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +// ^ +// [cfe] unspecified +} diff --git a/Language/Classes/Constructors/Factories/name_t02.dart b/Language/Classes/Constructors/Factories/name_t02.dart index e1e66e9bd3..3007427a5d 100644 --- a/Language/Classes/Constructors/Factories/name_t02.dart +++ b/Language/Classes/Constructors/Factories/name_t02.dart @@ -1,24 +1,24 @@ -// 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 It is a compile-time error if M is not the name of the immediately -/// enclosing class. -/// @description Checks that it's a compile-time error when factory keyword is -/// followed by a name that is not a constructor name. -/// @author rodionov - - -class C { - factory WrongClass.id() => throw "Should not reach here"; -// ^^^^^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error if M is not the name of the immediately +/// enclosing class. +/// @description Checks that it's a compile-time error when factory keyword is +/// followed by a name that is not a constructor name. +/// @author rodionov + + +class C { + factory WrongClass.id() => throw "Should not reach here"; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Classes/Constructors/Factories/name_t03.dart b/Language/Classes/Constructors/Factories/name_t03.dart index f9bc3139a2..c258ce6c1f 100644 --- a/Language/Classes/Constructors/Factories/name_t03.dart +++ b/Language/Classes/Constructors/Factories/name_t03.dart @@ -1,25 +1,25 @@ -// 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 It is a compile-time error if M is not the name of the immediately -/// enclosing class. -/// @description Checks that it's a compile-time error when M is the name of the -/// enclosing class's superclass. -/// @author rodionov - - -class S {} - -class C extends S { - factory S() => throw "Should not reach here"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -// ^ -// [cfe] unspecified -} +// 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 It is a compile-time error if M is not the name of the immediately +/// enclosing class. +/// @description Checks that it's a compile-time error when M is the name of the +/// enclosing class's superclass. +/// @author rodionov + + +class S {} + +class C extends S { + factory S() => throw "Should not reach here"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +// ^ +// [cfe] unspecified +} diff --git a/Language/Classes/Constructors/Factories/name_t04.dart b/Language/Classes/Constructors/Factories/name_t04.dart index a0db26da43..cc2f6e843b 100644 --- a/Language/Classes/Constructors/Factories/name_t04.dart +++ b/Language/Classes/Constructors/Factories/name_t04.dart @@ -1,25 +1,25 @@ -// 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 It is a compile-time error if M is not the name of the -/// immediately enclosing class. -/// @description Checks that it's a compile-time error when M is the name of a -/// function type alias available in the same scope. -/// @author rodionov - - -typedef foo(); - -class C { - factory foo() => throw "Should not reach here"; -// ^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -// ^ -// [cfe] unspecified -} +// 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 It is a compile-time error if M is not the name of the +/// immediately enclosing class. +/// @description Checks that it's a compile-time error when M is the name of a +/// function type alias available in the same scope. +/// @author rodionov + + +typedef foo(); + +class C { + factory foo() => throw "Should not reach here"; +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +// ^ +// [cfe] unspecified +} diff --git a/Language/Classes/Constructors/Factories/name_t05.dart b/Language/Classes/Constructors/Factories/name_t05.dart index d4652141fa..97afe168e0 100644 --- a/Language/Classes/Constructors/Factories/name_t05.dart +++ b/Language/Classes/Constructors/Factories/name_t05.dart @@ -1,25 +1,25 @@ -// 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 It is a compile-time error if M is not the name of the -/// immediately enclosing class. -/// @description Checks that it's a compile-time error when M is a name of an -/// unrelated class available in the same scope. -/// @author iefremov - - -class Z {} - -class C { - factory Z() => throw "Should not reach here"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -// ^ -// [cfe] unspecified -} +// 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 It is a compile-time error if M is not the name of the +/// immediately enclosing class. +/// @description Checks that it's a compile-time error when M is a name of an +/// unrelated class available in the same scope. +/// @author iefremov + + +class Z {} + +class C { + factory Z() => throw "Should not reach here"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +// ^ +// [cfe] unspecified +} diff --git a/Language/Classes/Constructors/Factories/syntax_t03.dart b/Language/Classes/Constructors/Factories/syntax_t03.dart index 78bca57753..46aef46d24 100644 --- a/Language/Classes/Constructors/Factories/syntax_t03.dart +++ b/Language/Classes/Constructors/Factories/syntax_t03.dart @@ -1,27 +1,27 @@ -// 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 factory is a constructor prefaced by the built-in identifier -/// factory. -/// factoryConstructorSignature: -/// factory identifier ('.' identifier)? formalParameterList -/// ; -/// @description Checks that it is a compile-time error if a factory constructor -/// declaration has the dot but not the named constructor identifier that should -/// follow it. -/// @author iefremov - - -class C { - factory C.() = A; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -class A implements C{} - -main() { - new C(); -} +// 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 factory is a constructor prefaced by the built-in identifier +/// factory. +/// factoryConstructorSignature: +/// factory identifier ('.' identifier)? formalParameterList +/// ; +/// @description Checks that it is a compile-time error if a factory constructor +/// declaration has the dot but not the named constructor identifier that should +/// follow it. +/// @author iefremov + + +class C { + factory C.() = A; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +class A implements C{} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Factories/syntax_t04.dart b/Language/Classes/Constructors/Factories/syntax_t04.dart index 3480c3ed19..ffa9cc6179 100644 --- a/Language/Classes/Constructors/Factories/syntax_t04.dart +++ b/Language/Classes/Constructors/Factories/syntax_t04.dart @@ -1,26 +1,26 @@ -// 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 factory is a constructor prefaced by the built-in identifier -/// factory. -/// factoryConstructorSignature: -/// factory identifier ('.' identifier)? formalParameterList -/// ; -/// @description Checks that it is a compile-time error if a factory constructor -/// declaration is missing the formal parameter list. -/// @author iefremov - - -class C { - factory C{} -// ^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -class A implements C{} - -main() { - new C(); -} +// 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 factory is a constructor prefaced by the built-in identifier +/// factory. +/// factoryConstructorSignature: +/// factory identifier ('.' identifier)? formalParameterList +/// ; +/// @description Checks that it is a compile-time error if a factory constructor +/// declaration is missing the formal parameter list. +/// @author iefremov + + +class C { + factory C{} +// ^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +class A implements C{} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Factories/syntax_t05.dart b/Language/Classes/Constructors/Factories/syntax_t05.dart index 26c934a578..46712f3e56 100644 --- a/Language/Classes/Constructors/Factories/syntax_t05.dart +++ b/Language/Classes/Constructors/Factories/syntax_t05.dart @@ -1,24 +1,24 @@ -// 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 factory is a constructor prefaced by the built-in identifier -/// factory. -/// factoryConstructorSignature: -/// factory identifier ('.' identifier)? formalParameterList -/// ; -/// @description Checks that it is a compile-time error if a factory constructor -/// is constant. -/// @author msyabro - - -class C { - const factory C() => C(); -//^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 factory is a constructor prefaced by the built-in identifier +/// factory. +/// factoryConstructorSignature: +/// factory identifier ('.' identifier)? formalParameterList +/// ; +/// @description Checks that it is a compile-time error if a factory constructor +/// is constant. +/// @author msyabro + + +class C { + const factory C() => C(); +//^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/execution_t04.dart b/Language/Classes/Constructors/Generative_Constructors/execution_t04.dart index e646e62340..973aa6c496 100644 --- a/Language/Classes/Constructors/Generative_Constructors/execution_t04.dart +++ b/Language/Classes/Constructors/Generative_Constructors/execution_t04.dart @@ -1,47 +1,47 @@ -// 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 Execution of a generative constructor k is always done with -/// respect to a set of bindings for its formal parameters and with this bound -/// to a fresh instance i and the type parameters of the immediately enclosing -/// class bound to a set of actual type arguments V1, ..., Vm. -/// If k is redirecting then its redirect clause has the form -/// this.g(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) -/// where g identifies another generative constructor of the immediately -/// surrounding class. Then execution of k proceeds by evaluating the argument -/// list (a1, ..., an, xn+1: an+1, ..., xn+k: an+k) and then executing g with -/// respect to the bindings resulting from the evaluation of (a1, ..., an, xn+1: -/// an+1, ..., xn+k: an+k) and with this bound to i and the type parameters of -/// the immediately enclosing class bound to V1, ..., Vm. -/// Otherwise, execution proceeds as follows: -/// Any initializing formals declared in k's parameter list are executed in the -/// order they appear in the program text. Then, k's initializers are executed -/// in the order they appear in the program. -/// After all the initializers have completed, the body of k is executed in a -/// scope where this is bound to i. Execution of the body begins with execution -/// of the body of the superconstructor with this bound to i, the type -/// parameters of the immediately enclosing class bound to a set of actual type -/// arguments V1, ..., Vm and the formal parameter bindings determined by the -/// argument list of the superinitializer of k. -/// @description Checks that 'this' is not accessible in initializers and an -/// unqualified invocation of an instance method in an initializer results in a -/// compile-time error. According to (Expressions/Function Invocation/Unqualied -/// Invocation), such unqualified invocation in the presence of an appropriately -/// named instance method is interpreted as ordinary method invocation and -/// attempts to access this. -/// @author iefremov - - -class C { - C() : v = f() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - f() => throw C(); - var v; -} - -main() { - new C(); -} +// 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 Execution of a generative constructor k is always done with +/// respect to a set of bindings for its formal parameters and with this bound +/// to a fresh instance i and the type parameters of the immediately enclosing +/// class bound to a set of actual type arguments V1, ..., Vm. +/// If k is redirecting then its redirect clause has the form +/// this.g(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) +/// where g identifies another generative constructor of the immediately +/// surrounding class. Then execution of k proceeds by evaluating the argument +/// list (a1, ..., an, xn+1: an+1, ..., xn+k: an+k) and then executing g with +/// respect to the bindings resulting from the evaluation of (a1, ..., an, xn+1: +/// an+1, ..., xn+k: an+k) and with this bound to i and the type parameters of +/// the immediately enclosing class bound to V1, ..., Vm. +/// Otherwise, execution proceeds as follows: +/// Any initializing formals declared in k's parameter list are executed in the +/// order they appear in the program text. Then, k's initializers are executed +/// in the order they appear in the program. +/// After all the initializers have completed, the body of k is executed in a +/// scope where this is bound to i. Execution of the body begins with execution +/// of the body of the superconstructor with this bound to i, the type +/// parameters of the immediately enclosing class bound to a set of actual type +/// arguments V1, ..., Vm and the formal parameter bindings determined by the +/// argument list of the superinitializer of k. +/// @description Checks that 'this' is not accessible in initializers and an +/// unqualified invocation of an instance method in an initializer results in a +/// compile-time error. According to (Expressions/Function Invocation/Unqualied +/// Invocation), such unqualified invocation in the presence of an appropriately +/// named instance method is interpreted as ordinary method invocation and +/// attempts to access this. +/// @author iefremov + + +class C { + C() : v = f() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + f() => throw C(); + var v; +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/execution_t05.dart b/Language/Classes/Constructors/Generative_Constructors/execution_t05.dart index 2fc1a7e60f..d8e5972be9 100644 --- a/Language/Classes/Constructors/Generative_Constructors/execution_t05.dart +++ b/Language/Classes/Constructors/Generative_Constructors/execution_t05.dart @@ -1,47 +1,47 @@ -// 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 Execution of a generative constructor k is always done with -/// respect to a set of bindings for its formal parameters and with this bound -/// to a fresh instance i and the type parameters of the immediately enclosing -/// class bound to a set of actual type arguments V1, ..., Vm. -/// If k is redirecting then its redirect clause has the form -/// this.g(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) -/// where g identifies another generative constructor of the immediately -/// surrounding class. Then execution of k proceeds by evaluating the argument -/// list (a1, ..., an, xn+1: an+1, ..., xn+k: an+k) and then executing g with -/// respect to the bindings resulting from the evaluation of (a1, ..., an, xn+1: -/// an+1, ..., xn+k: an+k) and with this bound to i and the type parameters of -/// the immediately enclosing class bound to V1, ..., Vm. -/// Otherwise, execution proceeds as follows: -/// Any initializing formals declared in k's parameter list are executed in the -/// order they appear in the program text. Then, k's initializers are executed -/// in the order they appear in the program. -/// After all the initializers have completed, the body of k is executed in a -/// scope where this is bound to i. Execution of the body begins with execution -/// of the body of the superconstructor with this bound to i, the type -/// parameters of the immediately enclosing class bound to a set of actual type -/// arguments V1, ..., Vm and the formal parameter bindings determined by the -/// argument list of the superinitializer of k. -/// @description Checks that 'this' is not accessible in initializers: it is a -/// compile-error if 'this' is passed to an external function as a parameter. -/// @author iefremov - - -f(var x) { - throw x; -} - -class C { - C() : v = f(this) {} -// ^^^^ -// [analyzer] unspecified -// [cfe] unspecified - - var v; -} - -main() { - new C(); -} +// 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 Execution of a generative constructor k is always done with +/// respect to a set of bindings for its formal parameters and with this bound +/// to a fresh instance i and the type parameters of the immediately enclosing +/// class bound to a set of actual type arguments V1, ..., Vm. +/// If k is redirecting then its redirect clause has the form +/// this.g(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) +/// where g identifies another generative constructor of the immediately +/// surrounding class. Then execution of k proceeds by evaluating the argument +/// list (a1, ..., an, xn+1: an+1, ..., xn+k: an+k) and then executing g with +/// respect to the bindings resulting from the evaluation of (a1, ..., an, xn+1: +/// an+1, ..., xn+k: an+k) and with this bound to i and the type parameters of +/// the immediately enclosing class bound to V1, ..., Vm. +/// Otherwise, execution proceeds as follows: +/// Any initializing formals declared in k's parameter list are executed in the +/// order they appear in the program text. Then, k's initializers are executed +/// in the order they appear in the program. +/// After all the initializers have completed, the body of k is executed in a +/// scope where this is bound to i. Execution of the body begins with execution +/// of the body of the superconstructor with this bound to i, the type +/// parameters of the immediately enclosing class bound to a set of actual type +/// arguments V1, ..., Vm and the formal parameter bindings determined by the +/// argument list of the superinitializer of k. +/// @description Checks that 'this' is not accessible in initializers: it is a +/// compile-error if 'this' is passed to an external function as a parameter. +/// @author iefremov + + +f(var x) { + throw x; +} + +class C { + C() : v = f(this) {} +// ^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + var v; +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/execution_t06.dart b/Language/Classes/Constructors/Generative_Constructors/execution_t06.dart index 87defacb03..a7b1d8b2c6 100644 --- a/Language/Classes/Constructors/Generative_Constructors/execution_t06.dart +++ b/Language/Classes/Constructors/Generative_Constructors/execution_t06.dart @@ -1,45 +1,45 @@ -// 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 Execution of a generative constructor k is always done with -/// respect to a set of bindings for its formal parameters and with this bound -/// to a fresh instance i and the type parameters of the immediately enclosing -/// class bound to a set of actual type arguments V1, ..., Vm. -/// If k is redirecting then its redirect clause has the form -/// this.g(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) -/// where g identifies another generative constructor of the immediately -/// surrounding class. Then execution of k proceeds by evaluating the argument -/// list (a1, ..., an, xn+1: an+1, ..., xn+k: an+k) and then executing g with -/// respect to the bindings resulting from the evaluation of (a1, ..., an, xn+1: -/// an+1, ..., xn+k: an+k) and with this bound to i and the type parameters of -/// the immediately enclosing class bound to V1, ..., Vm. -/// Otherwise, execution proceeds as follows: -/// Any initializing formals declared in k's parameter list are executed in the -/// order they appear in the program text. Then, k's initializers are executed -/// in the order they appear in the program. -/// After all the initializers have completed, the body of k is executed in a -/// scope where this is bound to i. Execution of the body begins with execution -/// of the body of the superconstructor with this bound to i, the type -/// parameters of the immediately enclosing class bound to a set of actual type -/// arguments V1, ..., Vm and the formal parameter bindings determined by the -/// argument list of the superinitializer of k. -/// @description Checks that 'this' is not accessible in initializers: it is a -/// compile-error when a constructor's initializer refers to a previously -/// initialized instance variable. -/// @author rodionov - - -class C { - C() : v = f {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - - var v; - final f = 1; -} - -main() { - new C(); -} +// 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 Execution of a generative constructor k is always done with +/// respect to a set of bindings for its formal parameters and with this bound +/// to a fresh instance i and the type parameters of the immediately enclosing +/// class bound to a set of actual type arguments V1, ..., Vm. +/// If k is redirecting then its redirect clause has the form +/// this.g(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) +/// where g identifies another generative constructor of the immediately +/// surrounding class. Then execution of k proceeds by evaluating the argument +/// list (a1, ..., an, xn+1: an+1, ..., xn+k: an+k) and then executing g with +/// respect to the bindings resulting from the evaluation of (a1, ..., an, xn+1: +/// an+1, ..., xn+k: an+k) and with this bound to i and the type parameters of +/// the immediately enclosing class bound to V1, ..., Vm. +/// Otherwise, execution proceeds as follows: +/// Any initializing formals declared in k's parameter list are executed in the +/// order they appear in the program text. Then, k's initializers are executed +/// in the order they appear in the program. +/// After all the initializers have completed, the body of k is executed in a +/// scope where this is bound to i. Execution of the body begins with execution +/// of the body of the superconstructor with this bound to i, the type +/// parameters of the immediately enclosing class bound to a set of actual type +/// arguments V1, ..., Vm and the formal parameter bindings determined by the +/// argument list of the superinitializer of k. +/// @description Checks that 'this' is not accessible in initializers: it is a +/// compile-error when a constructor's initializer refers to a previously +/// initialized instance variable. +/// @author rodionov + + +class C { + C() : v = f {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + + var v; + final f = 1; +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/execution_t07.dart b/Language/Classes/Constructors/Generative_Constructors/execution_t07.dart index 40f8d4cf13..cda4974003 100644 --- a/Language/Classes/Constructors/Generative_Constructors/execution_t07.dart +++ b/Language/Classes/Constructors/Generative_Constructors/execution_t07.dart @@ -1,44 +1,44 @@ -// 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 Execution of a generative constructor k is always done with -/// respect to a set of bindings for its formal parameters and with this bound -/// to a fresh instance i and the type parameters of the immediately enclosing -/// class bound to a set of actual type arguments V1, ..., Vm. -/// If k is redirecting then its redirect clause has the form -/// this.g(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) -/// where g identifies another generative constructor of the immediately -/// surrounding class. Then execution of k proceeds by evaluating the argument -/// list (a1, ..., an, xn+1: an+1, ..., xn+k: an+k) and then executing g with -/// respect to the bindings resulting from the evaluation of (a1, ..., an, xn+1: -/// an+1, ..., xn+k: an+k) and with this bound to i and the type parameters of -/// the immediately enclosing class bound to V1, ..., Vm. -/// Otherwise, execution proceeds as follows: -/// Any initializing formals declared in k's parameter list are executed in the -/// order they appear in the program text. Then, k's initializers are executed -/// in the order they appear in the program. -/// After all the initializers have completed, the body of k is executed in a -/// scope where this is bound to i. Execution of the body begins with execution -/// of the body of the superconstructor with this bound to i, the type -/// parameters of the immediately enclosing class bound to a set of actual type -/// arguments V1, ..., Vm and the formal parameter bindings determined by the -/// argument list of the superinitializer of k. -/// @description Checks that 'this' is not accessible in initializers: it is a -/// compile-error when a constructor's initializer refers to an instance method. -/// @author rodionov - - -class C { - C() : v = f {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - - var v; - f() {} -} - -main() { - new C(); -} +// 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 Execution of a generative constructor k is always done with +/// respect to a set of bindings for its formal parameters and with this bound +/// to a fresh instance i and the type parameters of the immediately enclosing +/// class bound to a set of actual type arguments V1, ..., Vm. +/// If k is redirecting then its redirect clause has the form +/// this.g(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) +/// where g identifies another generative constructor of the immediately +/// surrounding class. Then execution of k proceeds by evaluating the argument +/// list (a1, ..., an, xn+1: an+1, ..., xn+k: an+k) and then executing g with +/// respect to the bindings resulting from the evaluation of (a1, ..., an, xn+1: +/// an+1, ..., xn+k: an+k) and with this bound to i and the type parameters of +/// the immediately enclosing class bound to V1, ..., Vm. +/// Otherwise, execution proceeds as follows: +/// Any initializing formals declared in k's parameter list are executed in the +/// order they appear in the program text. Then, k's initializers are executed +/// in the order they appear in the program. +/// After all the initializers have completed, the body of k is executed in a +/// scope where this is bound to i. Execution of the body begins with execution +/// of the body of the superconstructor with this bound to i, the type +/// parameters of the immediately enclosing class bound to a set of actual type +/// arguments V1, ..., Vm and the formal parameter bindings determined by the +/// argument list of the superinitializer of k. +/// @description Checks that 'this' is not accessible in initializers: it is a +/// compile-error when a constructor's initializer refers to an instance method. +/// @author rodionov + + +class C { + C() : v = f {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + + var v; + f() {} +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/execution_t09.dart b/Language/Classes/Constructors/Generative_Constructors/execution_t09.dart index c9dde6d903..79b6ce6efe 100644 --- a/Language/Classes/Constructors/Generative_Constructors/execution_t09.dart +++ b/Language/Classes/Constructors/Generative_Constructors/execution_t09.dart @@ -1,45 +1,45 @@ -// 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 Execution of a generative constructor k is always done with -/// respect to a set of bindings for its formal parameters and with this bound -/// to a fresh instance i and the type parameters of the immediately enclosing -/// class bound to a set of actual type arguments V1, ..., Vm. -/// If k is redirecting then its redirect clause has the form -/// this.g(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) -/// where g identifies another generative constructor of the immediately -/// surrounding class. Then execution of k proceeds by evaluating the argument -/// list (a1, ..., an, xn+1: an+1, ..., xn+k: an+k) and then executing g with -/// respect to the bindings resulting from the evaluation of (a1, ..., an, xn+1: -/// an+1, ..., xn+k: an+k) and with this bound to i and the type parameters of -/// the immediately enclosing class bound to V1, ..., Vm. -/// Otherwise, execution proceeds as follows: -/// Any initializing formals declared in k's parameter list are executed in the -/// order they appear in the program text. Then, k's initializers are executed -/// in the order they appear in the program. -/// After all the initializers have completed, the body of k is executed in a -/// scope where this is bound to i. Execution of the body begins with execution -/// of the body of the superconstructor with this bound to i, the type -/// parameters of the immediately enclosing class bound to a set of actual type -/// arguments V1, ..., Vm and the formal parameter bindings determined by the -/// argument list of the superinitializer of k. -/// -/// @description Checks that 'this' is not accessible in the right-hand side of -/// an initialized instance variable declaration (e.g. a variable can't be -/// initialized using another variable). -/// @author msyabro - -class C { - const C(); - - final x = 1; - final y = x; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - const C(); -} +// 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 Execution of a generative constructor k is always done with +/// respect to a set of bindings for its formal parameters and with this bound +/// to a fresh instance i and the type parameters of the immediately enclosing +/// class bound to a set of actual type arguments V1, ..., Vm. +/// If k is redirecting then its redirect clause has the form +/// this.g(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) +/// where g identifies another generative constructor of the immediately +/// surrounding class. Then execution of k proceeds by evaluating the argument +/// list (a1, ..., an, xn+1: an+1, ..., xn+k: an+k) and then executing g with +/// respect to the bindings resulting from the evaluation of (a1, ..., an, xn+1: +/// an+1, ..., xn+k: an+k) and with this bound to i and the type parameters of +/// the immediately enclosing class bound to V1, ..., Vm. +/// Otherwise, execution proceeds as follows: +/// Any initializing formals declared in k's parameter list are executed in the +/// order they appear in the program text. Then, k's initializers are executed +/// in the order they appear in the program. +/// After all the initializers have completed, the body of k is executed in a +/// scope where this is bound to i. Execution of the body begins with execution +/// of the body of the superconstructor with this bound to i, the type +/// parameters of the immediately enclosing class bound to a set of actual type +/// arguments V1, ..., Vm and the formal parameter bindings determined by the +/// argument list of the superinitializer of k. +/// +/// @description Checks that 'this' is not accessible in the right-hand side of +/// an initialized instance variable declaration (e.g. a variable can't be +/// initialized using another variable). +/// @author msyabro + +class C { + const C(); + + final x = 1; + final y = x; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + const C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/execution_t12.dart b/Language/Classes/Constructors/Generative_Constructors/execution_t12.dart index 7d0e364f3e..136c1b4e41 100644 --- a/Language/Classes/Constructors/Generative_Constructors/execution_t12.dart +++ b/Language/Classes/Constructors/Generative_Constructors/execution_t12.dart @@ -1,46 +1,46 @@ -// 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 Execution of a generative constructor k is always done with -/// respect to a set of bindings for its formal parameters and with this bound -/// to a fresh instance i and the type parameters of the immediately enclosing -/// class bound to a set of actual type arguments V1, ..., Vm. -/// If k is redirecting then its redirect clause has the form -/// this.g(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) -/// where g identifies another generative constructor of the immediately -/// surrounding class. Then execution of k proceeds by evaluating the argument -/// list (a1, ..., an, xn+1: an+1, ..., xn+k: an+k) and then executing g with -/// respect to the bindings resulting from the evaluation of (a1, ..., an, xn+1: -/// an+1, ..., xn+k: an+k) and with this bound to i and the type parameters of -/// the immediately enclosing class bound to V1, ..., Vm. -/// Otherwise, execution proceeds as follows: -/// Any initializing formals declared in k's parameter list are executed in the -/// order they appear in the program text. Then, k's initializers are executed -/// in the order they appear in the program. -/// After all the initializers have completed, the body of k is executed in a -/// scope where this is bound to i. Execution of the body begins with execution -/// of the body of the superconstructor with this bound to i, the type -/// parameters of the immediately enclosing class bound to a set of actual type -/// arguments V1, ..., Vm and the formal parameter bindings determined by the -/// argument list of the superinitializer of k. -/// @description Checks that 'this' is not accessible in initializers and an -/// explicit access to a previously initialized final field in an initializer -/// results in a compile-time error. -/// @author rodionov - - -class C { - C() : v = this.fnl {} -// ^^^^ -// [analyzer] unspecified -// [cfe] unspecified - - f() => throw C(); - var v; - final fnl = 1; -} - -main() { - new C(); -} +// 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 Execution of a generative constructor k is always done with +/// respect to a set of bindings for its formal parameters and with this bound +/// to a fresh instance i and the type parameters of the immediately enclosing +/// class bound to a set of actual type arguments V1, ..., Vm. +/// If k is redirecting then its redirect clause has the form +/// this.g(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) +/// where g identifies another generative constructor of the immediately +/// surrounding class. Then execution of k proceeds by evaluating the argument +/// list (a1, ..., an, xn+1: an+1, ..., xn+k: an+k) and then executing g with +/// respect to the bindings resulting from the evaluation of (a1, ..., an, xn+1: +/// an+1, ..., xn+k: an+k) and with this bound to i and the type parameters of +/// the immediately enclosing class bound to V1, ..., Vm. +/// Otherwise, execution proceeds as follows: +/// Any initializing formals declared in k's parameter list are executed in the +/// order they appear in the program text. Then, k's initializers are executed +/// in the order they appear in the program. +/// After all the initializers have completed, the body of k is executed in a +/// scope where this is bound to i. Execution of the body begins with execution +/// of the body of the superconstructor with this bound to i, the type +/// parameters of the immediately enclosing class bound to a set of actual type +/// arguments V1, ..., Vm and the formal parameter bindings determined by the +/// argument list of the superinitializer of k. +/// @description Checks that 'this' is not accessible in initializers and an +/// explicit access to a previously initialized final field in an initializer +/// results in a compile-time error. +/// @author rodionov + + +class C { + C() : v = this.fnl {} +// ^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + f() => throw C(); + var v; + final fnl = 1; +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/final_variables_t01.dart b/Language/Classes/Constructors/Generative_Constructors/final_variables_t01.dart index a060c69e31..6f0b0a67ea 100644 --- a/Language/Classes/Constructors/Generative_Constructors/final_variables_t01.dart +++ b/Language/Classes/Constructors/Generative_Constructors/final_variables_t01.dart @@ -1,30 +1,30 @@ -// 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 Let k be a generative constructor. -/// Each final instance variable f declared in the immediately enclosing class -/// must have an initializer in k's initializer list unless it has already been -/// initialized by one of the following means: -/// - Initialization at the declaration of f. -/// - Initialization by means of an initializing formal of k. -/// or a compile-time error occurs. -/// @description Checks that it is a compile error if a final variable is not -/// initialized in one of the specified ways. -/// @author vasya -/// @author sgrekhov@unipro.ru - - -class C { - C() {} -//^ -// [analyzer] unspecified - - final _val; -// ^^^^ -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 Let k be a generative constructor. +/// Each final instance variable f declared in the immediately enclosing class +/// must have an initializer in k's initializer list unless it has already been +/// initialized by one of the following means: +/// - Initialization at the declaration of f. +/// - Initialization by means of an initializing formal of k. +/// or a compile-time error occurs. +/// @description Checks that it is a compile error if a final variable is not +/// initialized in one of the specified ways. +/// @author vasya +/// @author sgrekhov@unipro.ru + + +class C { + C() {} +//^ +// [analyzer] unspecified + + final _val; +// ^^^^ +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/final_variables_t02.dart b/Language/Classes/Constructors/Generative_Constructors/final_variables_t02.dart index 122f1315f8..312649b5a4 100644 --- a/Language/Classes/Constructors/Generative_Constructors/final_variables_t02.dart +++ b/Language/Classes/Constructors/Generative_Constructors/final_variables_t02.dart @@ -1,27 +1,27 @@ -// 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 Let k be a generative constructor. -/// Each final instance variable f declared in the immediately enclosing class -/// must have an initializer in k's initializer list unless it has already been -/// initialized by one of the following means: -/// - Initialization at the declaration of f. -/// - Initialization by means of an initializing formal of k. -/// or a static warning occurs. -/// @description Checks that no static warning occurs when all final variables -/// are initialized either at the declaration, via constructor's initializing -/// formal, or via an initializer in constructor's initializer list. -/// @author vasya - - -class C { - C(this.val2) : val3 = null {} - final val1 = null; - final val2; - final val3; -} - -main() { - new C("Initialization by means of an initializing formal of k"); -} +// 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 Let k be a generative constructor. +/// Each final instance variable f declared in the immediately enclosing class +/// must have an initializer in k's initializer list unless it has already been +/// initialized by one of the following means: +/// - Initialization at the declaration of f. +/// - Initialization by means of an initializing formal of k. +/// or a static warning occurs. +/// @description Checks that no static warning occurs when all final variables +/// are initialized either at the declaration, via constructor's initializing +/// formal, or via an initializer in constructor's initializer list. +/// @author vasya + + +class C { + C(this.val2) : val3 = null {} + final val1 = null; + final val2; + final val3; +} + +main() { + new C("Initialization by means of an initializing formal of k"); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t01.dart b/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t01.dart index 8e5f307a6a..48e0d84a3c 100644 --- a/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t01.dart +++ b/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t01.dart @@ -1,24 +1,24 @@ -// 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 formal constructor parameter is either a formal parameter or -/// an initializing formal. An initializing formal has the form this.id, where -/// id is the name of an instance variable of the immediately enclosing class. -/// It is a compile-time error if id is not the name of an instance variable of -/// the immediately enclosing class. -/// @description Checks that it is a compile-time error if id does not refer to -/// any member of the class. -/// @author msyabro - - -class C { - C(this.x) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(null); -} +// 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 formal constructor parameter is either a formal parameter or +/// an initializing formal. An initializing formal has the form this.id, where +/// id is the name of an instance variable of the immediately enclosing class. +/// It is a compile-time error if id is not the name of an instance variable of +/// the immediately enclosing class. +/// @description Checks that it is a compile-time error if id does not refer to +/// any member of the class. +/// @author msyabro + + +class C { + C(this.x) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(null); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t02.dart b/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t02.dart index af30b4f48e..58b3222123 100644 --- a/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t02.dart +++ b/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t02.dart @@ -1,26 +1,26 @@ -// 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 formal constructor parameter is either a formal parameter or -/// an initializing formal. An initializing formal has the form this.id, where -/// id is the name of an instance variable of the immediately enclosing class. -/// It is a compile-time error if id is not the name of an instance variable of -/// the immediately enclosing class. -/// @description Checks that it is a compile-time error if id is the name of a -/// static variable of the immediately enclosing class. -/// @author msyabro - - -class C { - C(this.x) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - - static var x; -} - -main() { - new C(null); -} +// 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 formal constructor parameter is either a formal parameter or +/// an initializing formal. An initializing formal has the form this.id, where +/// id is the name of an instance variable of the immediately enclosing class. +/// It is a compile-time error if id is not the name of an instance variable of +/// the immediately enclosing class. +/// @description Checks that it is a compile-time error if id is the name of a +/// static variable of the immediately enclosing class. +/// @author msyabro + + +class C { + C(this.x) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + + static var x; +} + +main() { + new C(null); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t03.dart b/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t03.dart index c79f775d97..0f07ea2625 100644 --- a/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t03.dart +++ b/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t03.dart @@ -1,26 +1,26 @@ -// 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 formal constructor parameter is either a formal parameter or -/// an initializing formal. An initializing formal has the form this.id, where -/// id is the name of an instance variable of the immediately enclosing class. -/// It is a compile-time error if id is not the name of an instance variable of -/// the immediately enclosing class. -/// @description Checks that it is a compile-time error if id is the name of a -/// static method of the immediately enclosing class. -/// @author msyabro - - -class C { - C(this.f) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - - static f() {} -} - -main() { - new C(null); -} +// 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 formal constructor parameter is either a formal parameter or +/// an initializing formal. An initializing formal has the form this.id, where +/// id is the name of an instance variable of the immediately enclosing class. +/// It is a compile-time error if id is not the name of an instance variable of +/// the immediately enclosing class. +/// @description Checks that it is a compile-time error if id is the name of a +/// static method of the immediately enclosing class. +/// @author msyabro + + +class C { + C(this.f) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + + static f() {} +} + +main() { + new C(null); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t04.dart b/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t04.dart index 153bf98305..7072c2d2e0 100644 --- a/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t04.dart +++ b/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t04.dart @@ -1,26 +1,26 @@ -// 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 formal constructor parameter is either a formal parameter or -/// an initializing formal. An initializing formal has the form this.id, where -/// id is the name of an instance variable of the immediately enclosing class. -/// It is a compile-time error if id is not the name of an instance variable of -/// the immediately enclosing class. -/// @description Checks that it is a compile-time error if id is the name of an -/// instance method of the immediately enclosing class. -/// @author msyabro - - -class C { - C(this.f) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - - void f() {} -} - -main() { - new C(null); -} +// 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 formal constructor parameter is either a formal parameter or +/// an initializing formal. An initializing formal has the form this.id, where +/// id is the name of an instance variable of the immediately enclosing class. +/// It is a compile-time error if id is not the name of an instance variable of +/// the immediately enclosing class. +/// @description Checks that it is a compile-time error if id is the name of an +/// instance method of the immediately enclosing class. +/// @author msyabro + + +class C { + C(this.f) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + + void f() {} +} + +main() { + new C(null); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t05.dart b/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t05.dart index 19176ad69d..5890623acc 100644 --- a/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t05.dart +++ b/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t05.dart @@ -1,28 +1,28 @@ -// 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 formal constructor parameter is either a formal parameter or -/// an initializing formal. An initializing formal has the form this.id, where -/// id is the name of an instance variable of the immediately enclosing class. -/// It is a compile-time error if id is not the name of an instance variable of -/// the immediately enclosing class. -/// @description Checks that it is a compile-time error if id is the name of an -/// instance variable of the superclass. -/// @author msyabro - - -class S { - var x; -} - -class C extends S { - C(this.x) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(null); -} +// 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 formal constructor parameter is either a formal parameter or +/// an initializing formal. An initializing formal has the form this.id, where +/// id is the name of an instance variable of the immediately enclosing class. +/// It is a compile-time error if id is not the name of an instance variable of +/// the immediately enclosing class. +/// @description Checks that it is a compile-time error if id is the name of an +/// instance variable of the superclass. +/// @author msyabro + + +class S { + var x; +} + +class C extends S { + C(this.x) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(null); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t06.dart b/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t06.dart index 76fa401d35..17ae0b2018 100644 --- a/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t06.dart +++ b/Language/Classes/Constructors/Generative_Constructors/formal_parameter_t06.dart @@ -1,32 +1,32 @@ -// 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 formal constructor parameter is either a formal parameter or -/// an initializing formal. An initializing formal has the form this.id, where -/// id is the name of an instance variable of the immediately enclosing class. -/// It is a compile-time error if id is not the name of an instance variable of -/// the immediately enclosing class. -/// @description Checks that it is a compile-time error if id is the name of a -/// variable of the superinterface. -/// @author msyabro - - -abstract class I { - var x; -} - -class C implements I { -// ^ -// [analyzer] unspecified -// [cfe] unspecified - - C(this.x) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(null); -} +// 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 formal constructor parameter is either a formal parameter or +/// an initializing formal. An initializing formal has the form this.id, where +/// id is the name of an instance variable of the immediately enclosing class. +/// It is a compile-time error if id is not the name of an instance variable of +/// the immediately enclosing class. +/// @description Checks that it is a compile-time error if id is the name of a +/// variable of the superinterface. +/// @author msyabro + + +abstract class I { + var x; +} + +class C implements I { +// ^ +// [analyzer] unspecified +// [cfe] unspecified + + C(this.x) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(null); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/initializers_t02.dart b/Language/Classes/Constructors/Generative_Constructors/initializers_t02.dart index 6c3bf8954e..1cd14ff190 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializers_t02.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializers_t02.dart @@ -1,29 +1,29 @@ -// 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 -/// initializers: -/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* -/// ; -/// superCallOrFieldInitializer: -/// super arguments | super '.' identifier arguments | fieldInitializer -/// ; -/// fieldInitializer: -/// (this '.')? identifier '=' conditionalExpression cascadeSection* -/// ; -/// @description Checks that it is a compile-time error when the initializer -/// list terminates with a comma. -/// @author iefremov - - -class C { - C() : super(), {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 +/// initializers: +/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* +/// ; +/// superCallOrFieldInitializer: +/// super arguments | super '.' identifier arguments | fieldInitializer +/// ; +/// fieldInitializer: +/// (this '.')? identifier '=' conditionalExpression cascadeSection* +/// ; +/// @description Checks that it is a compile-time error when the initializer +/// list terminates with a comma. +/// @author iefremov + + +class C { + C() : super(), {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/initializers_t03.dart b/Language/Classes/Constructors/Generative_Constructors/initializers_t03.dart index 2f60730aa2..02bc5b5257 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializers_t03.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializers_t03.dart @@ -1,29 +1,29 @@ -// 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 -/// initializers: -/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* -/// ; -/// superCallOrFieldInitializer: -/// super arguments | super '.' identifier arguments | fieldInitializer -/// ; -/// fieldInitializer: -/// (this '.')? identifier '=' conditionalExpression cascadeSection* -/// ; -/// @description Checks that it is a compile-time error when the initializer -/// list starts with a comma. -/// @author iefremov - - -class C { - C() : , super() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 +/// initializers: +/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* +/// ; +/// superCallOrFieldInitializer: +/// super arguments | super '.' identifier arguments | fieldInitializer +/// ; +/// fieldInitializer: +/// (this '.')? identifier '=' conditionalExpression cascadeSection* +/// ; +/// @description Checks that it is a compile-time error when the initializer +/// list starts with a comma. +/// @author iefremov + + +class C { + C() : , super() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/initializers_t04.dart b/Language/Classes/Constructors/Generative_Constructors/initializers_t04.dart index 027b076640..35270714b3 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializers_t04.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializers_t04.dart @@ -1,34 +1,34 @@ -// 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 -/// initializers: -/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* -/// ; -/// superCallOrFieldInitializer: -/// super arguments | super '.' identifier arguments | fieldInitializer -/// ; -/// fieldInitializer: -/// (this '.')? identifier '=' conditionalExpression cascadeSection* -/// ; -/// @description Checks that it is a compile-time error when the initializer -/// list is not prefixed with a colon. -/// @author iefremov - - -class C { - C() this.x = null {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - - var x; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 +/// initializers: +/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* +/// ; +/// superCallOrFieldInitializer: +/// super arguments | super '.' identifier arguments | fieldInitializer +/// ; +/// fieldInitializer: +/// (this '.')? identifier '=' conditionalExpression cascadeSection* +/// ; +/// @description Checks that it is a compile-time error when the initializer +/// list is not prefixed with a colon. +/// @author iefremov + + +class C { + C() this.x = null {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + + var x; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/initializers_t05.dart b/Language/Classes/Constructors/Generative_Constructors/initializers_t05.dart index 42eced056f..f5648f477a 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializers_t05.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializers_t05.dart @@ -1,29 +1,29 @@ -// 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 -/// initializers: -/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* -/// ; -/// superCallOrFieldInitializer: -/// super arguments | super '.' identifier arguments | fieldInitializer -/// ; -/// fieldInitializer: -/// (this '.')? identifier '=' conditionalExpression cascadeSection* -/// ; -/// @description Checks that it is a compile-time error when the initializer -/// list is empty (a lone colon). -/// @author iefremov - - -class C { - C() : {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 +/// initializers: +/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* +/// ; +/// superCallOrFieldInitializer: +/// super arguments | super '.' identifier arguments | fieldInitializer +/// ; +/// fieldInitializer: +/// (this '.')? identifier '=' conditionalExpression cascadeSection* +/// ; +/// @description Checks that it is a compile-time error when the initializer +/// list is empty (a lone colon). +/// @author iefremov + + +class C { + C() : {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/initializers_t06.dart b/Language/Classes/Constructors/Generative_Constructors/initializers_t06.dart index 4993892391..6c00d977d8 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializers_t06.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializers_t06.dart @@ -1,29 +1,29 @@ -// 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 -/// initializers: -/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* -/// ; -/// superCallOrFieldInitializer: -/// super arguments | super '.' identifier arguments | fieldInitializer -/// ; -/// fieldInitializer: -/// (this '.')? identifier '=' conditionalExpression cascadeSection* -/// ; -/// @description Checks that it is a compile-time error when the superconstructor -/// call does not include the constructor parameters in braces. -/// @author iefremov - - -class C { - C() : super {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 +/// initializers: +/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* +/// ; +/// superCallOrFieldInitializer: +/// super arguments | super '.' identifier arguments | fieldInitializer +/// ; +/// fieldInitializer: +/// (this '.')? identifier '=' conditionalExpression cascadeSection* +/// ; +/// @description Checks that it is a compile-time error when the superconstructor +/// call does not include the constructor parameters in braces. +/// @author iefremov + + +class C { + C() : super {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/initializers_t07.dart b/Language/Classes/Constructors/Generative_Constructors/initializers_t07.dart index 76f412b757..e2bcb0225f 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializers_t07.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializers_t07.dart @@ -1,32 +1,32 @@ -// 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 -/// initializers: -/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* -/// ; -/// superCallOrFieldInitializer: -/// super arguments | super '.' identifier arguments | fieldInitializer -/// ; -/// fieldInitializer: -/// (this '.')? identifier '=' conditionalExpression cascadeSection* -/// ; -/// @description Checks that it is a compile-time error when the identifier in -/// a named superconstructor call is empty. -/// @author iefremov - - -class S { -} - -class C extends S { - C() : super.() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 +/// initializers: +/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* +/// ; +/// superCallOrFieldInitializer: +/// super arguments | super '.' identifier arguments | fieldInitializer +/// ; +/// fieldInitializer: +/// (this '.')? identifier '=' conditionalExpression cascadeSection* +/// ; +/// @description Checks that it is a compile-time error when the identifier in +/// a named superconstructor call is empty. +/// @author iefremov + + +class S { +} + +class C extends S { + C() : super.() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/initializers_t08.dart b/Language/Classes/Constructors/Generative_Constructors/initializers_t08.dart index 576c0abded..6a884cea44 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializers_t08.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializers_t08.dart @@ -1,30 +1,30 @@ -// 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 -/// initializers: -/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* -/// ; -/// superCallOrFieldInitializer: -/// super arguments | super '.' identifier arguments | fieldInitializer -/// ; -/// fieldInitializer: -/// (this '.')? identifier '=' conditionalExpression cascadeSection* -/// ; -/// @description Checks that it is a compile-time error when a field initializer -/// does not include the actual assignment in addition to the field identifier. -/// @author iefremov - - -class C { - C() : x {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - var x; -} - -main() { - new C(); -} +// 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 +/// initializers: +/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* +/// ; +/// superCallOrFieldInitializer: +/// super arguments | super '.' identifier arguments | fieldInitializer +/// ; +/// fieldInitializer: +/// (this '.')? identifier '=' conditionalExpression cascadeSection* +/// ; +/// @description Checks that it is a compile-time error when a field initializer +/// does not include the actual assignment in addition to the field identifier. +/// @author iefremov + + +class C { + C() : x {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + var x; +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/initializers_t09.dart b/Language/Classes/Constructors/Generative_Constructors/initializers_t09.dart index 6826dc3484..c686ffd187 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializers_t09.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializers_t09.dart @@ -1,30 +1,30 @@ -// 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 -/// initializers: -/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* -/// ; -/// superCallOrFieldInitializer: -/// super arguments | super '.' identifier arguments | fieldInitializer -/// ; -/// fieldInitializer: -/// (this '.')? identifier '=' conditionalExpression cascadeSection* -/// ; -/// @description Checks that it is a compile-time error when the field -/// initializer does not include the right-side expression. -/// @author iefremov - - -class C { - C() : x = {} - var x; -//^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 +/// initializers: +/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* +/// ; +/// superCallOrFieldInitializer: +/// super arguments | super '.' identifier arguments | fieldInitializer +/// ; +/// fieldInitializer: +/// (this '.')? identifier '=' conditionalExpression cascadeSection* +/// ; +/// @description Checks that it is a compile-time error when the field +/// initializer does not include the right-side expression. +/// @author iefremov + + +class C { + C() : x = {} + var x; +//^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/initializers_t10.dart b/Language/Classes/Constructors/Generative_Constructors/initializers_t10.dart index f8dfa4216e..c82d54498b 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializers_t10.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializers_t10.dart @@ -1,31 +1,31 @@ -// 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 -/// initializers: -/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* -/// ; -/// superCallOrFieldInitializer: -/// super arguments | super '.' identifier arguments | fieldInitializer -/// ; -/// fieldInitializer: -/// (this '.')? identifier '=' conditionalExpression cascadeSection* -/// ; -/// @description Checks that it is a compile-time error when the field -/// initializer does not include the field identifier. -/// @author iefremov - - -class C { - C() : = 1 {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - - var x; -} - -main() { - new C(); -} +// 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 +/// initializers: +/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* +/// ; +/// superCallOrFieldInitializer: +/// super arguments | super '.' identifier arguments | fieldInitializer +/// ; +/// fieldInitializer: +/// (this '.')? identifier '=' conditionalExpression cascadeSection* +/// ; +/// @description Checks that it is a compile-time error when the field +/// initializer does not include the field identifier. +/// @author iefremov + + +class C { + C() : = 1 {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + + var x; +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/initializers_t11.dart b/Language/Classes/Constructors/Generative_Constructors/initializers_t11.dart index dfe4992510..4e7d646c6d 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializers_t11.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializers_t11.dart @@ -1,30 +1,30 @@ -// 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 -/// initializers: -/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* -/// ; -/// superCallOrFieldInitializer: -/// super arguments | super '.' identifier arguments | fieldInitializer -/// ; -/// fieldInitializer: -/// (this '.')? identifier '=' conditionalExpression cascadeSection* -/// ; -/// @description Checks that it is a compile-time error when the field -/// initializer does not include the field identifier. -/// @author iefremov - - -class C { - C() : this. = null {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - var x; -} - -main() { - new C(); -} +// 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 +/// initializers: +/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* +/// ; +/// superCallOrFieldInitializer: +/// super arguments | super '.' identifier arguments | fieldInitializer +/// ; +/// fieldInitializer: +/// (this '.')? identifier '=' conditionalExpression cascadeSection* +/// ; +/// @description Checks that it is a compile-time error when the field +/// initializer does not include the field identifier. +/// @author iefremov + + +class C { + C() : this. = null {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + var x; +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/initializers_t12.dart b/Language/Classes/Constructors/Generative_Constructors/initializers_t12.dart index fa98e8a5bd..96662e3385 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializers_t12.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializers_t12.dart @@ -1,31 +1,31 @@ -// 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 -/// initializers: -/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* -/// ; -/// superCallOrFieldInitializer: -/// super arguments | super '.' identifier arguments | fieldInitializer -/// ; -/// fieldInitializer: -/// (this '.')? identifier '=' conditionalExpression cascadeSection* -/// ; -/// @description Checks that it is a compile-time error when there's just the -/// right-side expression in place of a field initializer. -/// @author rodionov - - -class C { - C() : 2 + 2 {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - - var x; -} - -main() { - new C(); -} +// 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 +/// initializers: +/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* +/// ; +/// superCallOrFieldInitializer: +/// super arguments | super '.' identifier arguments | fieldInitializer +/// ; +/// fieldInitializer: +/// (this '.')? identifier '=' conditionalExpression cascadeSection* +/// ; +/// @description Checks that it is a compile-time error when there's just the +/// right-side expression in place of a field initializer. +/// @author rodionov + + +class C { + C() : 2 + 2 {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + + var x; +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/initializers_t13.dart b/Language/Classes/Constructors/Generative_Constructors/initializers_t13.dart index aec19b5961..8fc7a9f615 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializers_t13.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializers_t13.dart @@ -1,34 +1,34 @@ -// 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 -/// initializers: -/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* -/// ; -/// superCallOrFieldInitializer: -/// super arguments | super '.' identifier arguments | fieldInitializer -/// ; -/// fieldInitializer: -/// (this '.')? identifier '=' conditionalExpression cascadeSection* -/// ; -/// @description Checks that it is a compile-time error when identifier in an -/// initializer references an explicit setter method rather than a variable. -/// @author iefremov - - -class C { - C() : this.x = null {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - - void set x(var v) { - throw v; - } -} - -main() { - new C(); -} - +// 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 +/// initializers: +/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* +/// ; +/// superCallOrFieldInitializer: +/// super arguments | super '.' identifier arguments | fieldInitializer +/// ; +/// fieldInitializer: +/// (this '.')? identifier '=' conditionalExpression cascadeSection* +/// ; +/// @description Checks that it is a compile-time error when identifier in an +/// initializer references an explicit setter method rather than a variable. +/// @author iefremov + + +class C { + C() : this.x = null {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + + void set x(var v) { + throw v; + } +} + +main() { + new C(); +} + diff --git a/Language/Classes/Constructors/Generative_Constructors/initializers_t14.dart b/Language/Classes/Constructors/Generative_Constructors/initializers_t14.dart index cd782cd7a9..acc188993d 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializers_t14.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializers_t14.dart @@ -1,34 +1,34 @@ -// 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 -/// initializers: -/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* -/// ; -/// superCallOrFieldInitializer: -/// super arguments | super '.' identifier arguments | fieldInitializer -/// ; -/// fieldInitializer: -/// (this '.')? identifier '=' conditionalExpression cascadeSection* -/// ; -/// @description Checks that it is a compile-time error when identifier in an -/// initializer references an instance method rather than a variable. -/// @author rodionov - - -typedef void Foo(); - -class C { - C() : bar = null {} -// ^^^ -// [analyzer] unspecified -// [cfe] unspecified - - void bar() {} -} - -main() { - new C(); -} - +// 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 +/// initializers: +/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* +/// ; +/// superCallOrFieldInitializer: +/// super arguments | super '.' identifier arguments | fieldInitializer +/// ; +/// fieldInitializer: +/// (this '.')? identifier '=' conditionalExpression cascadeSection* +/// ; +/// @description Checks that it is a compile-time error when identifier in an +/// initializer references an instance method rather than a variable. +/// @author rodionov + + +typedef void Foo(); + +class C { + C() : bar = null {} +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified + + void bar() {} +} + +main() { + new C(); +} + diff --git a/Language/Classes/Constructors/Generative_Constructors/initializers_t16.dart b/Language/Classes/Constructors/Generative_Constructors/initializers_t16.dart index 7a8b5c1b52..eda65d8b94 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializers_t16.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializers_t16.dart @@ -1,31 +1,31 @@ -// 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 -/// initializers: -/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* -/// ; -/// superCallOrFieldInitializer: -/// super arguments | super '.' identifier arguments | fieldInitializer -/// ; -/// fieldInitializer: -/// (this '.')? identifier '=' conditionalExpression cascadeSection* -/// ; -/// @description Checks that an invalid cascaded invocation in a field -/// initializer results in a compile-time error. -/// @author rodionov - - -class C { - C() : this.foo = null..("arguments without a selector not allowed") {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - - var foo; -} - -main() { - new C(); -} +// 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 +/// initializers: +/// ':' superCallOrFieldInitializer (', ' superCallOrFieldInitializer)* +/// ; +/// superCallOrFieldInitializer: +/// super arguments | super '.' identifier arguments | fieldInitializer +/// ; +/// fieldInitializer: +/// (this '.')? identifier '=' conditionalExpression cascadeSection* +/// ; +/// @description Checks that an invalid cascaded invocation in a field +/// initializer results in a compile-time error. +/// @author rodionov + + +class C { + C() : this.foo = null..("arguments without a selector not allowed") {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + + var foo; +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t01.dart b/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t01.dart index 4d4fe526ce..1b4dac75ed 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t01.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t01.dart @@ -1,27 +1,27 @@ -// 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 It is a compile-time error if an initializing formal is used by a -/// function other than a non-redirecting generative constructor. -/// @description Checks that it is a compile-time error when the initializing -/// formal syntax is used by a factory constructor. -/// @author rodionov - - -class C { - int? x; - - factory C.i(this.x) => new A(); -// ^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -class A implements C { - int? x = 42; -} - -main() { - new C.i(42); -} +// 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 It is a compile-time error if an initializing formal is used by a +/// function other than a non-redirecting generative constructor. +/// @description Checks that it is a compile-time error when the initializing +/// formal syntax is used by a factory constructor. +/// @author rodionov + + +class C { + int? x; + + factory C.i(this.x) => new A(); +// ^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +class A implements C { + int? x = 42; +} + +main() { + new C.i(42); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t02.dart b/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t02.dart index 7b48da898e..20e55977ac 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t02.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t02.dart @@ -1,26 +1,26 @@ -// 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 It is a compile-time error if an initializing formal is used by a -/// function other than a non-redirecting generative constructor. -/// @description Checks that it is a compile-time error when the initializing -/// formal syntax is used by a factory constructor (as an optional parameter). -/// @author rodionov - - -class C { - int? x; - factory C.i([this.x]) => new A(); -// ^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -class A implements C { - int? x = 42; -} - -main() { - new C.i(42); -} +// 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 It is a compile-time error if an initializing formal is used by a +/// function other than a non-redirecting generative constructor. +/// @description Checks that it is a compile-time error when the initializing +/// formal syntax is used by a factory constructor (as an optional parameter). +/// @author rodionov + + +class C { + int? x; + factory C.i([this.x]) => new A(); +// ^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +class A implements C { + int? x = 42; +} + +main() { + new C.i(42); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t03.dart b/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t03.dart index 2b1f5b3f5b..59706ba3f6 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t03.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t03.dart @@ -1,23 +1,23 @@ -// 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 It is a compile-time error if an initializing formal is used by a -/// function other than a non-redirecting generative constructor. -/// @description Checks that it is a compile-time error when the initializing -/// formal syntax is used by an instance method. -/// @author rodionov - - -class C { - int x = 0; - - foo(this.x) {} -// ^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - (new C()).foo(42); -} +// 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 It is a compile-time error if an initializing formal is used by a +/// function other than a non-redirecting generative constructor. +/// @description Checks that it is a compile-time error when the initializing +/// formal syntax is used by an instance method. +/// @author rodionov + + +class C { + int x = 0; + + foo(this.x) {} +// ^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + (new C()).foo(42); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t04.dart b/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t04.dart index 8a81728403..d1ba7e3bb0 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t04.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t04.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if an initializing formal is used by a -/// function other than a non-redirecting generative constructor. -/// @description Checks that it is a compile-time error when the initializing -/// formal syntax is used by an instance method (as an optional parameter). -/// @author rodionov - - -class C { - int x = 0; - foo([this.x]) {} -// ^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C().foo(); -} +// 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 It is a compile-time error if an initializing formal is used by a +/// function other than a non-redirecting generative constructor. +/// @description Checks that it is a compile-time error when the initializing +/// formal syntax is used by an instance method (as an optional parameter). +/// @author rodionov + + +class C { + int x = 0; + foo([this.x]) {} +// ^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C().foo(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t05.dart b/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t05.dart index a82d49c383..fddad392b8 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t05.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t05.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if an initializing formal is used by a -/// function other than a non-redirecting generative constructor. -/// @description Checks that it is a compile-time error when the initializing -/// formal syntax is used by a static method. -/// @author rodionov - - -class C { - int x = 0; - static foo(this.x) {} -// ^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.foo(42); -} +// 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 It is a compile-time error if an initializing formal is used by a +/// function other than a non-redirecting generative constructor. +/// @description Checks that it is a compile-time error when the initializing +/// formal syntax is used by a static method. +/// @author rodionov + + +class C { + int x = 0; + static foo(this.x) {} +// ^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.foo(42); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t06.dart b/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t06.dart index e9997e2dde..27be5064c0 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t06.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t06.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if an initializing formal is used by a -/// function other than a non-redirecting generative constructor. -/// @description Checks that it is a compile-time error when the initializing -/// formal syntax is used by a setter. -/// @author msyabro - - -class C { - var _x; - set x(this.x) {} -// ^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().x = 1; -} +// 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 It is a compile-time error if an initializing formal is used by a +/// function other than a non-redirecting generative constructor. +/// @description Checks that it is a compile-time error when the initializing +/// formal syntax is used by a setter. +/// @author msyabro + + +class C { + var _x; + set x(this.x) {} +// ^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().x = 1; +} diff --git a/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t07.dart b/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t07.dart index 4ca0acd6a1..fcfc735a54 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t07.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializing_other_function_t07.dart @@ -1,24 +1,24 @@ -// 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 It is a compile-time error if an initializing formal is used by a -/// function other than a non-redirecting generative constructor. -/// @description Checks that it is a compile-time error when the initializing -/// formal syntax is used by a redirecting generative constructor. -/// @author msyabro - - -class C { - var x; - C() {} - - C.redirect(this.x): this(); -// ^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C.redirect(null); -} +// 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 It is a compile-time error if an initializing formal is used by a +/// function other than a non-redirecting generative constructor. +/// @description Checks that it is a compile-time error when the initializing +/// formal syntax is used by a redirecting generative constructor. +/// @author msyabro + + +class C { + var x; + C() {} + + C.redirect(this.x): this(); +// ^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C.redirect(null); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/initializing_this_t02.dart b/Language/Classes/Constructors/Generative_Constructors/initializing_this_t02.dart index ca44cf90e8..ecb9aa0103 100644 --- a/Language/Classes/Constructors/Generative_Constructors/initializing_this_t02.dart +++ b/Language/Classes/Constructors/Generative_Constructors/initializing_this_t02.dart @@ -1,27 +1,27 @@ -// 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 Using an initializing formal this.id in a formal parameter list -/// does not introduce a formal parameter name into the scope of the constructor. -/// However, the initializing formal does effect the type of the constructor -/// function exactly as if a formal parameter named id of the same type were -/// introduced in the same position. -/// @description Checks that a compile-time error is produced if there is no -/// field with the same name as initializing formal name (so, the initializing -/// formal doesn't introduce it's name into any scopes). -/// @author iefremov -/// @needsreview Not sure how to verify the type of the constructor function. - - -class C { - C([this.id = 1]) {} -// ^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(1); -} - +// 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 Using an initializing formal this.id in a formal parameter list +/// does not introduce a formal parameter name into the scope of the constructor. +/// However, the initializing formal does effect the type of the constructor +/// function exactly as if a formal parameter named id of the same type were +/// introduced in the same position. +/// @description Checks that a compile-time error is produced if there is no +/// field with the same name as initializing formal name (so, the initializing +/// formal doesn't introduce it's name into any scopes). +/// @author iefremov +/// @needsreview Not sure how to verify the type of the constructor function. + + +class C { + C([this.id = 1]) {} +// ^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(1); +} + diff --git a/Language/Classes/Constructors/Generative_Constructors/not_an_instance_variable_t01.dart b/Language/Classes/Constructors/Generative_Constructors/not_an_instance_variable_t01.dart index 59faafeb98..1e6d4fc9c7 100644 --- a/Language/Classes/Constructors/Generative_Constructors/not_an_instance_variable_t01.dart +++ b/Language/Classes/Constructors/Generative_Constructors/not_an_instance_variable_t01.dart @@ -1,26 +1,26 @@ -// 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 It is a compile-time error if k's initializer list contains -/// an initializer for a variable that is not an instance variable declared in -/// the immediately surrounding class. -/// @description Checks that error is produced if the initializer list contains -/// an initializer for a superclass instance variable. -/// @author vasya - - -class A { - var x; -} - -class C extends A { - C() : x = 5 {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 It is a compile-time error if k's initializer list contains +/// an initializer for a variable that is not an instance variable declared in +/// the immediately surrounding class. +/// @description Checks that error is produced if the initializer list contains +/// an initializer for a superclass instance variable. +/// @author vasya + + +class A { + var x; +} + +class C extends A { + C() : x = 5 {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/not_an_instance_variable_t02.dart b/Language/Classes/Constructors/Generative_Constructors/not_an_instance_variable_t02.dart index 1348cc46fb..39845ec1eb 100644 --- a/Language/Classes/Constructors/Generative_Constructors/not_an_instance_variable_t02.dart +++ b/Language/Classes/Constructors/Generative_Constructors/not_an_instance_variable_t02.dart @@ -1,24 +1,24 @@ -// 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 It is a compile-time error if k's initializer list contains -/// an initializer for a variable that is not an instance variable declared in -/// the immediately surrounding class. -/// @description Checks that error is produced if the initializer list contains -/// an initializer for a global variable. -/// @author vasya - - -var x; - -class C { - C() : x = 5 {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 It is a compile-time error if k's initializer list contains +/// an initializer for a variable that is not an instance variable declared in +/// the immediately surrounding class. +/// @description Checks that error is produced if the initializer list contains +/// an initializer for a global variable. +/// @author vasya + + +var x; + +class C { + C() : x = 5 {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/not_an_instance_variable_t03.dart b/Language/Classes/Constructors/Generative_Constructors/not_an_instance_variable_t03.dart index b90c82e1cb..663560f0af 100644 --- a/Language/Classes/Constructors/Generative_Constructors/not_an_instance_variable_t03.dart +++ b/Language/Classes/Constructors/Generative_Constructors/not_an_instance_variable_t03.dart @@ -1,24 +1,24 @@ -// 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 It is a compile-time error if k's initializer list contains -/// an initializer for a variable that is not an instance variable declared in -/// the immediately surrounding class. -/// @description Checks that error is produced if the initializer list contains -/// an initializer for a static class variable. -/// @author rodionov - - -class C { - static var x = null; - - C() : x = 5 {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 It is a compile-time error if k's initializer list contains +/// an initializer for a variable that is not an instance variable declared in +/// the immediately surrounding class. +/// @description Checks that error is produced if the initializer list contains +/// an initializer for a static class variable. +/// @author rodionov + + +class C { + static var x = null; + + C() : x = 5 {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/not_an_instance_variable_t04.dart b/Language/Classes/Constructors/Generative_Constructors/not_an_instance_variable_t04.dart index 18008c0977..d8fe2a95b7 100644 --- a/Language/Classes/Constructors/Generative_Constructors/not_an_instance_variable_t04.dart +++ b/Language/Classes/Constructors/Generative_Constructors/not_an_instance_variable_t04.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if k's initializer list contains -/// an initializer for a variable that is not an instance variable declared in -/// the immediately surrounding class. -/// @description Checks that error is produced if the initializer list contains -/// an initializer for a constructor argument. -/// @author iefremov - - -class C { - C(var x) : x = 5 {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(1); -} +// 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 It is a compile-time error if k's initializer list contains +/// an initializer for a variable that is not an instance variable declared in +/// the immediately surrounding class. +/// @description Checks that error is produced if the initializer list contains +/// an initializer for a constructor argument. +/// @author iefremov + + +class C { + C(var x) : x = 5 {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(1); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/redirection_t02.dart b/Language/Classes/Constructors/Generative_Constructors/redirection_t02.dart index 7dda36608f..82d1903655 100644 --- a/Language/Classes/Constructors/Generative_Constructors/redirection_t02.dart +++ b/Language/Classes/Constructors/Generative_Constructors/redirection_t02.dart @@ -1,28 +1,28 @@ -// 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 a compile error is produced if a redirecting -/// constructor has a body. -/// @author pagolubev - - -class C { - C() : this.init() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - - C.init(); -} - -main() { - new C(); -} +// 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 a compile error is produced if a redirecting +/// constructor has a body. +/// @author pagolubev + + +class C { + C() : this.init() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + + C.init(); +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/redirection_t03.dart b/Language/Classes/Constructors/Generative_Constructors/redirection_t03.dart index d5a10c3ef0..19122906a7 100644 --- a/Language/Classes/Constructors/Generative_Constructors/redirection_t03.dart +++ b/Language/Classes/Constructors/Generative_Constructors/redirection_t03.dart @@ -1,30 +1,30 @@ -// 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 a cyclic dependency in constructor redirection -/// results in a compile error (using a minimal redirection chain). -/// @author pagolubev - - -class C { - C() : this.init(); -// ^ -// [analyzer] unspecified - - C.init() : this(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 a cyclic dependency in constructor redirection +/// results in a compile error (using a minimal redirection chain). +/// @author pagolubev + + +class C { + C() : this.init(); +// ^ +// [analyzer] unspecified + + C.init() : this(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/redirection_t04.dart b/Language/Classes/Constructors/Generative_Constructors/redirection_t04.dart index 34ffa0f46a..a5824a9e39 100644 --- a/Language/Classes/Constructors/Generative_Constructors/redirection_t04.dart +++ b/Language/Classes/Constructors/Generative_Constructors/redirection_t04.dart @@ -1,28 +1,28 @@ -// 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. -/// @author pagolubev - - -class C { - C() : x = -1, this.init(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - C.init(); - var x; -} - -main() { - new C(); -} +// 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. +/// @author pagolubev + + +class C { + C() : x = -1, this.init(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + C.init(); + var x; +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/redirection_t05.dart b/Language/Classes/Constructors/Generative_Constructors/redirection_t05.dart index c5db30bdae..aa95732657 100644 --- a/Language/Classes/Constructors/Generative_Constructors/redirection_t05.dart +++ b/Language/Classes/Constructors/Generative_Constructors/redirection_t05.dart @@ -1,29 +1,29 @@ -// 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 redirecting constructor can not have initializing -/// formals. -/// @author pagolubev - - -class C { - C(this.x) : this.init(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - - C.init(); - var x; -} - -main() { - new C(1); -} +// 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 redirecting constructor can not have initializing +/// formals. +/// @author pagolubev + + +class C { + C(this.x) : this.init(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + + C.init(); + var x; +} + +main() { + new C(1); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/redirection_t06.dart b/Language/Classes/Constructors/Generative_Constructors/redirection_t06.dart index c9b0b8a1f6..b9e0179162 100644 --- a/Language/Classes/Constructors/Generative_Constructors/redirection_t06.dart +++ b/Language/Classes/Constructors/Generative_Constructors/redirection_t06.dart @@ -1,30 +1,30 @@ -// 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 constructor redirection cannot be combined with a -/// superinitializer. -/// @author pagolubev - - -class A {} - -class C extends A { - C() : super(), this.init(); -// ^^^^^ -// [analyzer] unspecified -// [cfe] unspecified - - C.init(); -} - -main() { - new C(); -} +// 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 constructor redirection cannot be combined with a +/// superinitializer. +/// @author pagolubev + + +class A {} + +class C extends A { + C() : super(), this.init(); +// ^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + C.init(); +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/redirection_t07.dart b/Language/Classes/Constructors/Generative_Constructors/redirection_t07.dart index d5053605fe..77e7af364f 100644 --- a/Language/Classes/Constructors/Generative_Constructors/redirection_t07.dart +++ b/Language/Classes/Constructors/Generative_Constructors/redirection_t07.dart @@ -1,62 +1,62 @@ -// 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 cyclic dependency in constructor redirection -/// produces a compile error (Using a longer redirection chain). -/// @author iefremov - - -class C { - C.c0() : this.c9(); -// ^^^^^^^^^ -// [analyzer] unspecified - - C.c1() : this.c0(); -// ^^^^^^^^^ -// [analyzer] unspecified - - C.c2() : this.c1(); -// ^^^^^^^^^ -// [analyzer] unspecified - - C.c3() : this.c2(); -// ^^^^^^^^^ -// [analyzer] unspecified - - C.c4() : this.c3(); -// ^^^^^^^^^ -// [analyzer] unspecified - - C.c5() : this.c4(); -// ^^^^^^^^^ -// [analyzer] unspecified - - C.c6() : this.c5(); -// ^^^^^^^^^ -// [analyzer] unspecified - - C.c7() : this.c6(); -// ^^^^^^^^^ -// [analyzer] unspecified - - C.c8() : this.c7(); -// ^^^^^^^^^ -// [analyzer] unspecified - - C.c9() : this.c8(); -// ^^^^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C.c0(); -} +// 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 cyclic dependency in constructor redirection +/// produces a compile error (Using a longer redirection chain). +/// @author iefremov + + +class C { + C.c0() : this.c9(); +// ^^^^^^^^^ +// [analyzer] unspecified + + C.c1() : this.c0(); +// ^^^^^^^^^ +// [analyzer] unspecified + + C.c2() : this.c1(); +// ^^^^^^^^^ +// [analyzer] unspecified + + C.c3() : this.c2(); +// ^^^^^^^^^ +// [analyzer] unspecified + + C.c4() : this.c3(); +// ^^^^^^^^^ +// [analyzer] unspecified + + C.c5() : this.c4(); +// ^^^^^^^^^ +// [analyzer] unspecified + + C.c6() : this.c5(); +// ^^^^^^^^^ +// [analyzer] unspecified + + C.c7() : this.c6(); +// ^^^^^^^^^ +// [analyzer] unspecified + + C.c8() : this.c7(); +// ^^^^^^^^^ +// [analyzer] unspecified + + C.c9() : this.c8(); +// ^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C.c0(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/redirection_t08.dart b/Language/Classes/Constructors/Generative_Constructors/redirection_t08.dart index 4cadfd56b0..d65c015b87 100644 --- a/Language/Classes/Constructors/Generative_Constructors/redirection_t08.dart +++ b/Language/Classes/Constructors/Generative_Constructors/redirection_t08.dart @@ -1,26 +1,26 @@ -// 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 the constructor redirection clause cannot reference -/// the same constructor it is a part of. -/// @author iefremov - - -class C { - C() : this(); -// ^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 the constructor redirection clause cannot reference +/// the same constructor it is a part of. +/// @author iefremov + + +class C { + C() : this(); +// ^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/redirection_t09.dart b/Language/Classes/Constructors/Generative_Constructors/redirection_t09.dart index ac57e5c62a..b394d5e11a 100644 --- a/Language/Classes/Constructors/Generative_Constructors/redirection_t09.dart +++ b/Language/Classes/Constructors/Generative_Constructors/redirection_t09.dart @@ -1,29 +1,29 @@ -// 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 it is a compile error when a redirecting -/// constructor references a method rather than another constructor. -/// @author iefremov - - - -class C { - C() : f(); -// ^^^ -// [analyzer] unspecified -// [cfe] unspecified - - f() { throw "Should not be thrown!"; } -} - -main() { - new C(); -} +// 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 it is a compile error when a redirecting +/// constructor references a method rather than another constructor. +/// @author iefremov + + + +class C { + C() : f(); +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified + + f() { throw "Should not be thrown!"; } +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/redirection_t10.dart b/Language/Classes/Constructors/Generative_Constructors/redirection_t10.dart index 1780554886..fbafa64b52 100644 --- a/Language/Classes/Constructors/Generative_Constructors/redirection_t10.dart +++ b/Language/Classes/Constructors/Generative_Constructors/redirection_t10.dart @@ -1,30 +1,30 @@ -// 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 a redirecting constructor can't be followed by -/// the initializer list. -/// @author iefremov - - - -class C { - C() : this.redirect(1, 2), a(0); -// ^^^^ -// [analyzer] unspecified -// [cfe] unspecified - - C.redirect(p1, p2) {} - var a; -} - -main() { - new C(); -} +// 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 a redirecting constructor can't be followed by +/// the initializer list. +/// @author iefremov + + + +class C { + C() : this.redirect(1, 2), a(0); +// ^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + C.redirect(p1, p2) {} + var a; +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/redirection_t11.dart b/Language/Classes/Constructors/Generative_Constructors/redirection_t11.dart index 8d7d36e7bf..c6f0445e27 100644 --- a/Language/Classes/Constructors/Generative_Constructors/redirection_t11.dart +++ b/Language/Classes/Constructors/Generative_Constructors/redirection_t11.dart @@ -1,30 +1,30 @@ -// 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 only one constructor redirect clause is allowed. -/// @author kaigorodov - - -class A {} - -class C extends A { - C() : this.init1(), this.init2(); -// ^^^^^^^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified - - C.init1(); - C.init2(); -} - -main() { - new C(); -} +// 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 only one constructor redirect clause is allowed. +/// @author kaigorodov + + +class A {} + +class C extends A { + C() : this.init1(), this.init2(); +// ^^^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + C.init1(); + C.init2(); +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t01.dart b/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t01.dart index 952fe7fd9b..f2b503cab5 100644 --- a/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t01.dart +++ b/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t01.dart @@ -1,26 +1,26 @@ -// 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 Let C be the class in which the superinitializer super() -/// (respectively, super.id()) appears and let S be the superclass of C. It is -/// a compile-time error if class S does not declare a generative constructor -/// named S (respectively S.id) -/// @description Checks that it is a compile-time error when the superclass S -/// does not declare any constructors named S and its subclass's constructor -/// contains an implicit super() superinitializer. -/// @author iefremov - - -class S { - S.smth() {} -} - -class C extends S {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new C(); -} +// 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 Let C be the class in which the superinitializer super() +/// (respectively, super.id()) appears and let S be the superclass of C. It is +/// a compile-time error if class S does not declare a generative constructor +/// named S (respectively S.id) +/// @description Checks that it is a compile-time error when the superclass S +/// does not declare any constructors named S and its subclass's constructor +/// contains an implicit super() superinitializer. +/// @author iefremov + + +class S { + S.smth() {} +} + +class C extends S {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t02.dart b/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t02.dart index 813b30006c..36ca3dcdcf 100644 --- a/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t02.dart +++ b/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t02.dart @@ -1,28 +1,28 @@ -// 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 Let C be the class in which the superinitializer super() -/// (respectively, super.id()) appears and let S be the superclass of C. It is -/// a compile-time error if class S does not declare a generative constructor -/// named S (respectively S.id) -/// @description Checks that it is a compile-time error when the superclass S -/// does not declare any constructors named S and its subclass's constructor -/// contains an explicit super() superinitializer. -/// @author iefremov - - -class S { - S.smth() {} -} - -class C extends S { - C() : super() {} -// ^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 Let C be the class in which the superinitializer super() +/// (respectively, super.id()) appears and let S be the superclass of C. It is +/// a compile-time error if class S does not declare a generative constructor +/// named S (respectively S.id) +/// @description Checks that it is a compile-time error when the superclass S +/// does not declare any constructors named S and its subclass's constructor +/// contains an explicit super() superinitializer. +/// @author iefremov + + +class S { + S.smth() {} +} + +class C extends S { + C() : super() {} +// ^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t03.dart b/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t03.dart index b01de27ee3..b4086f3962 100644 --- a/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t03.dart +++ b/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t03.dart @@ -1,26 +1,26 @@ -// 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 Let C be the class in which the superinitializer super() -/// (respectively, super.id()) appears and let S be the superclass of C. It is -/// a compile-time error if class S does not declare a generative constructor -/// named S (respectively S.id) -/// @description Checks that it is a compile-time error when the superclass S -/// does not declare any named constructors referenced by a superinitializer in -/// its subclass's initializer list. -/// @author iefremov - - -class S {} - -class C extends S { - C() : super.smth() {} -// ^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 Let C be the class in which the superinitializer super() +/// (respectively, super.id()) appears and let S be the superclass of C. It is +/// a compile-time error if class S does not declare a generative constructor +/// named S (respectively S.id) +/// @description Checks that it is a compile-time error when the superclass S +/// does not declare any named constructors referenced by a superinitializer in +/// its subclass's initializer list. +/// @author iefremov + + +class S {} + +class C extends S { + C() : super.smth() {} +// ^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t04.dart b/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t04.dart index f8de72a47e..2a539cbd1d 100644 --- a/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t04.dart +++ b/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t04.dart @@ -1,27 +1,27 @@ -// 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 Let C be the class in which the superinitializer super() -/// (respectively, super.id()) appears and let S be the superclass of C. It is -/// a compile-time error if class S does not declare a generative constructor -/// named S (respectively S.id) -/// @description Checks that it is a compile-time error when the superclass S -/// declares a factory constructor named S and its subclass's constructor -/// contains an implicit super() superinitializer. -/// @author rodionov - - -class S { - factory S() {return new S.ctor();} - S.ctor() {} -} - -class C extends S {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new C(); -} +// 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 Let C be the class in which the superinitializer super() +/// (respectively, super.id()) appears and let S be the superclass of C. It is +/// a compile-time error if class S does not declare a generative constructor +/// named S (respectively S.id) +/// @description Checks that it is a compile-time error when the superclass S +/// declares a factory constructor named S and its subclass's constructor +/// contains an implicit super() superinitializer. +/// @author rodionov + + +class S { + factory S() {return new S.ctor();} + S.ctor() {} +} + +class C extends S {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t05.dart b/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t05.dart index 2b6054e838..b1b0b83670 100644 --- a/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t05.dart +++ b/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t05.dart @@ -1,29 +1,29 @@ -// 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 Let C be the class in which the superinitializer super() -/// (respectively, super.id()) appears and let S be the superclass of C. It is -/// a compile-time error if class S does not declare a generative constructor -/// named S (respectively S.id) -/// @description Checks that it is a compile-time error when the superclass S -/// declares a factory constructor named S and its subclass's constructor -/// contains an explicit super() superinitializer. -/// @author rodionov - - -class S { - factory S() {return new S.ctor();} - S.ctor() {} -} - -class C extends S { - C() : super() {} -// ^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 Let C be the class in which the superinitializer super() +/// (respectively, super.id()) appears and let S be the superclass of C. It is +/// a compile-time error if class S does not declare a generative constructor +/// named S (respectively S.id) +/// @description Checks that it is a compile-time error when the superclass S +/// declares a factory constructor named S and its subclass's constructor +/// contains an explicit super() superinitializer. +/// @author rodionov + + +class S { + factory S() {return new S.ctor();} + S.ctor() {} +} + +class C extends S { + C() : super() {} +// ^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t06.dart b/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t06.dart index c6f22ddc1c..ed7ff10d91 100644 --- a/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t06.dart +++ b/Language/Classes/Constructors/Generative_Constructors/superclass_constructor_t06.dart @@ -1,29 +1,29 @@ -// 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 Let C be the class in which the superinitializer super() -/// (respectively, super.id()) appears and let S be the superclass of C. It is -/// a compile-time error if class S does not declare a generative constructor -/// named S (respectively S.id) -/// @description Checks that it is a compile-time error when the superclass S -/// declares a named factory constructor referenced by a superinitializer in its -/// subclass's initializer list. -/// @author rodionov - - -class S { - S() {} - factory S.ctor() {return new S();} -} - -class C extends S { - C() : super.ctor() {} -// ^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 Let C be the class in which the superinitializer super() +/// (respectively, super.id()) appears and let S be the superclass of C. It is +/// a compile-time error if class S does not declare a generative constructor +/// named S (respectively S.id) +/// @description Checks that it is a compile-time error when the superclass S +/// declares a named factory constructor referenced by a superinitializer in its +/// subclass's initializer list. +/// @author rodionov + + +class S { + S() {} + factory S.ctor() {return new S();} +} + +class C extends S { + C() : super.ctor() {} +// ^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/superinitializer_t01.dart b/Language/Classes/Constructors/Generative_Constructors/superinitializer_t01.dart index 7d5092c947..519f5cdf08 100644 --- a/Language/Classes/Constructors/Generative_Constructors/superinitializer_t01.dart +++ b/Language/Classes/Constructors/Generative_Constructors/superinitializer_t01.dart @@ -1,26 +1,26 @@ -// 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 Let k be a generative constructor. Then k may include at most one -/// superinitializer in its initializer list or a compile-time error occurs. -/// @description Checks that it is a compile-time error if a generative -/// constructor includes two different superinitializers in its initializer list. -/// @author vasya - - -class A { - A(); - A.foo(); -} - -class B extends A { - B() : super(), super.foo(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new B(); -} +// 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 Let k be a generative constructor. Then k may include at most one +/// superinitializer in its initializer list or a compile-time error occurs. +/// @description Checks that it is a compile-time error if a generative +/// constructor includes two different superinitializers in its initializer list. +/// @author vasya + + +class A { + A(); + A.foo(); +} + +class B extends A { + B() : super(), super.foo(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new B(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/superinitializer_t02.dart b/Language/Classes/Constructors/Generative_Constructors/superinitializer_t02.dart index 88209084c2..4279a25a5b 100644 --- a/Language/Classes/Constructors/Generative_Constructors/superinitializer_t02.dart +++ b/Language/Classes/Constructors/Generative_Constructors/superinitializer_t02.dart @@ -1,25 +1,25 @@ -// 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 Let k be a generative constructor. Then k may include at most one -/// superinitializer in its initializer list or a compile-time error occurs. -/// @description Checks that it is a compile-time error if a generative -/// constructor includes two identical superinitializers in its initializer list. -/// @author iefremov - - -class A { - A(); -} - -class B extends A { - B() : super(), super(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new B(); -} +// 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 Let k be a generative constructor. Then k may include at most one +/// superinitializer in its initializer list or a compile-time error occurs. +/// @description Checks that it is a compile-time error if a generative +/// constructor includes two identical superinitializers in its initializer list. +/// @author iefremov + + +class A { + A(); +} + +class B extends A { + B() : super(), super(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new B(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/superinitializer_t03.dart b/Language/Classes/Constructors/Generative_Constructors/superinitializer_t03.dart index 8d7e871a89..0f35f5a9fb 100644 --- a/Language/Classes/Constructors/Generative_Constructors/superinitializer_t03.dart +++ b/Language/Classes/Constructors/Generative_Constructors/superinitializer_t03.dart @@ -1,26 +1,26 @@ -// 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 Let k be a generative constructor. Then k may include at most one -/// superinitializer in its initializer list or a compile-time error occurs. -/// @description Checks that it is a compile-time error if a generative -/// constructor includes two identical superinitializers in its initializer list. -/// @author iefremov - - -class A { - A(); - A.foo(); -} - -class B extends A { - B() : super.foo(), super.foo(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new B(); -} +// 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 Let k be a generative constructor. Then k may include at most one +/// superinitializer in its initializer list or a compile-time error occurs. +/// @description Checks that it is a compile-time error if a generative +/// constructor includes two identical superinitializers in its initializer list. +/// @author iefremov + + +class A { + A(); + A.foo(); +} + +class B extends A { + B() : super.foo(), super.foo(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new B(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/syntax_t02.dart b/Language/Classes/Constructors/Generative_Constructors/syntax_t02.dart index 45efd62ce4..bcca52d02c 100644 --- a/Language/Classes/Constructors/Generative_Constructors/syntax_t02.dart +++ b/Language/Classes/Constructors/Generative_Constructors/syntax_t02.dart @@ -1,22 +1,22 @@ -// 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 constructorSignature: -/// identifier (‘.’ identifier)? formalParameterList -/// ; -/// @description Checks that constructor declaration without a formal parameter -/// list produces a compile-time error. -/// @author pagolubev - - -class C { - C; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 constructorSignature: +/// identifier (‘.’ identifier)? formalParameterList +/// ; +/// @description Checks that constructor declaration without a formal parameter +/// list produces a compile-time error. +/// @author pagolubev + + +class C { + C; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/syntax_t03.dart b/Language/Classes/Constructors/Generative_Constructors/syntax_t03.dart index a69b33a5be..b702c1aaf5 100644 --- a/Language/Classes/Constructors/Generative_Constructors/syntax_t03.dart +++ b/Language/Classes/Constructors/Generative_Constructors/syntax_t03.dart @@ -1,22 +1,22 @@ -// 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 constructorSignature: -/// identifier (‘.’ identifier)? formalParameterList -/// ; -/// @description Checks that omitting a named constructor's identifier results -/// in a compile-time error. -/// @author pagolubev - - -class C { - C.(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 constructorSignature: +/// identifier (‘.’ identifier)? formalParameterList +/// ; +/// @description Checks that omitting a named constructor's identifier results +/// in a compile-time error. +/// @author pagolubev + + +class C { + C.(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/syntax_t04.dart b/Language/Classes/Constructors/Generative_Constructors/syntax_t04.dart index 91e0ff1777..7c580e8000 100644 --- a/Language/Classes/Constructors/Generative_Constructors/syntax_t04.dart +++ b/Language/Classes/Constructors/Generative_Constructors/syntax_t04.dart @@ -1,22 +1,22 @@ -// 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 constructorSignature: -/// identifier (‘.’ identifier)? formalParameterList -/// ; -/// @description Checks that it is a compile-time error if a constructor -/// declares a return type. -/// @author msyabro - - -class C { - C C(); -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 constructorSignature: +/// identifier (‘.’ identifier)? formalParameterList +/// ; +/// @description Checks that it is a compile-time error if a constructor +/// declares a return type. +/// @author msyabro + + +class C { + C C(); +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/syntax_t05.dart b/Language/Classes/Constructors/Generative_Constructors/syntax_t05.dart index f414f544c2..5cd2249260 100644 --- a/Language/Classes/Constructors/Generative_Constructors/syntax_t05.dart +++ b/Language/Classes/Constructors/Generative_Constructors/syntax_t05.dart @@ -1,22 +1,22 @@ -// 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 constructorSignature: -/// identifier (‘.’ identifier)? formalParameterList -/// ; -/// @description Checks that it is a compile-time error if a named constructor -/// declares a return type -/// @author msyabro - - -class C { - C C.name(); -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C.name(); -} +// 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 constructorSignature: +/// identifier (‘.’ identifier)? formalParameterList +/// ; +/// @description Checks that it is a compile-time error if a named constructor +/// declares a return type +/// @author msyabro + + +class C { + C C.name(); +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C.name(); +} diff --git a/Language/Classes/Constructors/Generative_Constructors/syntax_t06.dart b/Language/Classes/Constructors/Generative_Constructors/syntax_t06.dart index d319bb4506..58854f2c99 100644 --- a/Language/Classes/Constructors/Generative_Constructors/syntax_t06.dart +++ b/Language/Classes/Constructors/Generative_Constructors/syntax_t06.dart @@ -1,24 +1,24 @@ -// 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 constructorSignature: -/// identifier (‘.’ identifier)? formalParameterList -/// ; -/// @description Checks that constructor name cannot contain 3 identifiers. -/// @author kaigorodov - - -class C { -// ^ -// [cfe] unspecified - C.c1.c2(); -//^ -// [analyzer] unspecified -// [cfe] unspecified - C.c3() {} -} - -main() { - new C.c3(); -} +// 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 constructorSignature: +/// identifier (‘.’ identifier)? formalParameterList +/// ; +/// @description Checks that constructor name cannot contain 3 identifiers. +/// @author kaigorodov + + +class C { +// ^ +// [cfe] unspecified + C.c1.c2(); +//^ +// [analyzer] unspecified +// [cfe] unspecified + C.c3() {} +} + +main() { + new C.c3(); +} diff --git a/Language/Classes/Constructors/name_t01.dart b/Language/Classes/Constructors/name_t01.dart index ccfbe75483..6219dafe2a 100644 --- a/Language/Classes/Constructors/name_t01.dart +++ b/Language/Classes/Constructors/name_t01.dart @@ -1,26 +1,26 @@ -// 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 constructor name always begins with the name of its immediately -/// enclosing class, and may optionally be followed by a dot and an identifier -/// id. It is a compile-time error if the name of a constructor is not a -/// constructor name. -/// A constructor declaration may conflict with static member declarations -/// (10.11). -/// Let C be a class. It is a compile-time error if C declares a -/// • constructor named C.n and a static member with basename n. -/// -/// @description Checks that it is not a compile-error when a constructor's id -/// is the name of an instance field in the same class. -/// @author kaigorodov - - -class C { - var foo; - C.foo(); -} - -main() { - new C.foo(); -} +// 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 constructor name always begins with the name of its immediately +/// enclosing class, and may optionally be followed by a dot and an identifier +/// id. It is a compile-time error if the name of a constructor is not a +/// constructor name. +/// A constructor declaration may conflict with static member declarations +/// (10.11). +/// Let C be a class. It is a compile-time error if C declares a +/// • constructor named C.n and a static member with basename n. +/// +/// @description Checks that it is not a compile-error when a constructor's id +/// is the name of an instance field in the same class. +/// @author kaigorodov + + +class C { + var foo; + C.foo(); +} + +main() { + new C.foo(); +} diff --git a/Language/Classes/Constructors/name_t02.dart b/Language/Classes/Constructors/name_t02.dart index 5a22f1cede..db8bd9e868 100644 --- a/Language/Classes/Constructors/name_t02.dart +++ b/Language/Classes/Constructors/name_t02.dart @@ -1,26 +1,26 @@ -// 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 constructor name always begins with the name of its immediately -/// enclosing class, and may optionally be followed by a dot and an identifier -/// id. It is a compile-time error if the name of a constructor is not a -/// constructor name. -/// A constructor declaration may conflict with static member declarations -/// (10.11). -/// Let C be a class. It is a compile-time error if C declares a -/// • constructor named C.n and a static member with basename n. -/// -/// @description Checks that it is not a compile-error when a constructor's id -/// is the name of an instance getter in the same class. -/// @author kaigorodov - - -class C { - get foo {} - C.foo(); -} - -main() { - new C.foo(); -} +// 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 constructor name always begins with the name of its immediately +/// enclosing class, and may optionally be followed by a dot and an identifier +/// id. It is a compile-time error if the name of a constructor is not a +/// constructor name. +/// A constructor declaration may conflict with static member declarations +/// (10.11). +/// Let C be a class. It is a compile-time error if C declares a +/// • constructor named C.n and a static member with basename n. +/// +/// @description Checks that it is not a compile-error when a constructor's id +/// is the name of an instance getter in the same class. +/// @author kaigorodov + + +class C { + get foo {} + C.foo(); +} + +main() { + new C.foo(); +} diff --git a/Language/Classes/Constructors/name_t03.dart b/Language/Classes/Constructors/name_t03.dart index 7b4a1950e2..5615a35818 100644 --- a/Language/Classes/Constructors/name_t03.dart +++ b/Language/Classes/Constructors/name_t03.dart @@ -1,26 +1,26 @@ -// 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 constructor name always begins with the name of its immediately -/// enclosing class, and may optionally be followed by a dot and an identifier -/// id. It is a compile-time error if the name of a constructor is not a -/// constructor name. -/// A constructor declaration may conflict with static member declarations -/// (10.11). -/// Let C be a class. It is a compile-time error if C declares a -/// • constructor named C.n and a static member with basename n. -/// -/// @description Checks that it is not a compile-error when a constructor's id -/// is the name of an instance method in the same class. -/// @author kaigorodov - - -class C { - foo() {} - C.foo(); -} - -main() { - new C.foo(); -} +// 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 constructor name always begins with the name of its immediately +/// enclosing class, and may optionally be followed by a dot and an identifier +/// id. It is a compile-time error if the name of a constructor is not a +/// constructor name. +/// A constructor declaration may conflict with static member declarations +/// (10.11). +/// Let C be a class. It is a compile-time error if C declares a +/// • constructor named C.n and a static member with basename n. +/// +/// @description Checks that it is not a compile-error when a constructor's id +/// is the name of an instance method in the same class. +/// @author kaigorodov + + +class C { + foo() {} + C.foo(); +} + +main() { + new C.foo(); +} diff --git a/Language/Classes/Constructors/name_t04.dart b/Language/Classes/Constructors/name_t04.dart index fdeac5687c..acfb3ed5f5 100644 --- a/Language/Classes/Constructors/name_t04.dart +++ b/Language/Classes/Constructors/name_t04.dart @@ -1,32 +1,32 @@ -// 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 constructor name always begins with the name of its immediately -/// enclosing class, and may optionally be followed by a dot and an identifier -/// id. It is a compile-time error if the name of a constructor is not a -/// constructor name. -/// A constructor declaration may conflict with static member declarations -/// (10.11). -/// Let C be a class. It is a compile-time error if C declares a -/// • constructor named C.n and a static member with basename n. -/// -/// @description Checks that a compile-error is produced when a constructor's id -/// coincides with the name of a static method declared in the same class. -/// @author kaigorodov - - -class C { - C.foo() {} -// ^^^ -// [analyzer] unspecified -// [cfe] unspecified - - static foo() {} -// ^^^ -// [cfe] unspecified -} - -main() { - new C.foo(); -} +// 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 constructor name always begins with the name of its immediately +/// enclosing class, and may optionally be followed by a dot and an identifier +/// id. It is a compile-time error if the name of a constructor is not a +/// constructor name. +/// A constructor declaration may conflict with static member declarations +/// (10.11). +/// Let C be a class. It is a compile-time error if C declares a +/// • constructor named C.n and a static member with basename n. +/// +/// @description Checks that a compile-error is produced when a constructor's id +/// coincides with the name of a static method declared in the same class. +/// @author kaigorodov + + +class C { + C.foo() {} +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified + + static foo() {} +// ^^^ +// [cfe] unspecified +} + +main() { + new C.foo(); +} diff --git a/Language/Classes/Constructors/name_t05.dart b/Language/Classes/Constructors/name_t05.dart index b8b332c735..fecaeeadb4 100644 --- a/Language/Classes/Constructors/name_t05.dart +++ b/Language/Classes/Constructors/name_t05.dart @@ -1,32 +1,32 @@ -// 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 * @assertion A constructor name always begins with the name of its immediately -/// enclosing class, and may optionally be followed by a dot and an identifier -/// id. It is a compile-time error if the name of a constructor is not a -/// constructor name. -/// A constructor declaration may conflict with static member declarations -/// (10.11). -/// Let C be a class. It is a compile-time error if C declares a -/// • constructor named C.n and a static member with basename n. -/// -/// @description Checks that a compile-error is produced when a constructor's id -/// coincides with the name of a static field declared in the same class. -/// @author kaigorodov - - -class C { - C.foo() {} -// ^^^ -// [analyzer] unspecified -// [cfe] unspecified - - static var foo; -// ^^^ -// [cfe] unspecified -} - -main() { - new C.foo(); -} +// 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 * @assertion A constructor name always begins with the name of its immediately +/// enclosing class, and may optionally be followed by a dot and an identifier +/// id. It is a compile-time error if the name of a constructor is not a +/// constructor name. +/// A constructor declaration may conflict with static member declarations +/// (10.11). +/// Let C be a class. It is a compile-time error if C declares a +/// • constructor named C.n and a static member with basename n. +/// +/// @description Checks that a compile-error is produced when a constructor's id +/// coincides with the name of a static field declared in the same class. +/// @author kaigorodov + + +class C { + C.foo() {} +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified + + static var foo; +// ^^^ +// [cfe] unspecified +} + +main() { + new C.foo(); +} diff --git a/Language/Classes/Constructors/name_t06.dart b/Language/Classes/Constructors/name_t06.dart index e561984b77..654054088f 100644 --- a/Language/Classes/Constructors/name_t06.dart +++ b/Language/Classes/Constructors/name_t06.dart @@ -1,32 +1,32 @@ -// 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 constructor name always begins with the name of its immediately -/// enclosing class, and may optionally be followed by a dot and an identifier -/// id. It is a compile-time error if the name of a constructor is not a -/// constructor name. -/// A constructor declaration may conflict with static member declarations -/// (10.11). -/// Let C be a class. It is a compile-time error if C declares a -/// • constructor named C.n and a static member with basename n. -/// -/// @description Checks that a compile-error is produced when a constructor's id -/// coincides with the name of a static getter declared in the same class. -/// @author kaigorodov - - -class C { - C.foo() {} -// ^^^ -// [analyzer] unspecified -// [cfe] unspecified - - static int get foo => 1; -// ^^^ -// [cfe] unspecified -} - -main() { - new C.foo(); -} +// 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 constructor name always begins with the name of its immediately +/// enclosing class, and may optionally be followed by a dot and an identifier +/// id. It is a compile-time error if the name of a constructor is not a +/// constructor name. +/// A constructor declaration may conflict with static member declarations +/// (10.11). +/// Let C be a class. It is a compile-time error if C declares a +/// • constructor named C.n and a static member with basename n. +/// +/// @description Checks that a compile-error is produced when a constructor's id +/// coincides with the name of a static getter declared in the same class. +/// @author kaigorodov + + +class C { + C.foo() {} +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified + + static int get foo => 1; +// ^^^ +// [cfe] unspecified +} + +main() { + new C.foo(); +} diff --git a/Language/Classes/Constructors/wrong_name_t01.dart b/Language/Classes/Constructors/wrong_name_t01.dart index 80b2d41de6..052b6e5713 100644 --- a/Language/Classes/Constructors/wrong_name_t01.dart +++ b/Language/Classes/Constructors/wrong_name_t01.dart @@ -1,26 +1,26 @@ -// 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 constructor name always begins with the name of its immediately -/// enclosing class or interface, and may optionally be followed by a dot and an -/// identifier id. . . . It is a compile-time error if the name of a -/// constructor is not a constructor name. -/// @description Checks that a compile-error is produced when a named constructor -/// definition does not begin with the name of its class. -/// @author iefremov - - -class C { - Z.wrongNamedConstructor(); -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 constructor name always begins with the name of its immediately +/// enclosing class or interface, and may optionally be followed by a dot and an +/// identifier id. . . . It is a compile-time error if the name of a +/// constructor is not a constructor name. +/// @description Checks that a compile-error is produced when a named constructor +/// definition does not begin with the name of its class. +/// @author iefremov + + +class C { + Z.wrongNamedConstructor(); +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Classes/Getters/same_name_method_t01.dart b/Language/Classes/Getters/same_name_method_t01.dart index 8c41f68e0f..36f592aa72 100644 --- a/Language/Classes/Getters/same_name_method_t01.dart +++ b/Language/Classes/Getters/same_name_method_t01.dart @@ -1,23 +1,23 @@ -// 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 It is a compile-time error if a class has both a getter and a -/// method with the same name. This restriction holds regardless of whether the -/// getter is defined explicitly or implicitly, or whether the getter or the -/// method are inherited or not. -/// @description Checks that a compile-time error is produced if a class has -/// an explicitly declared getter and a method with the same name. -/// @author vasya - -class C { - get foo => "foo"; - foo() => "foo()"; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().foo(); -} +// 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 It is a compile-time error if a class has both a getter and a +/// method with the same name. This restriction holds regardless of whether the +/// getter is defined explicitly or implicitly, or whether the getter or the +/// method are inherited or not. +/// @description Checks that a compile-time error is produced if a class has +/// an explicitly declared getter and a method with the same name. +/// @author vasya + +class C { + get foo => "foo"; + foo() => "foo()"; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().foo(); +} diff --git a/Language/Classes/Getters/same_name_method_t02.dart b/Language/Classes/Getters/same_name_method_t02.dart index 6a7cded416..14f53bcab2 100644 --- a/Language/Classes/Getters/same_name_method_t02.dart +++ b/Language/Classes/Getters/same_name_method_t02.dart @@ -1,23 +1,23 @@ -// 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 It is a compile-time error if a class has both a getter and a -/// method with the same name. This restriction holds regardless of whether the -/// getter is defined explicitly or implicitly, or whether the getter or the -/// method are inherited or not. -/// @description Checks that a compile-time error is produced if a class has -/// an implicit getter and a method with the same name. -/// @author iefremov - -class C { - var foo; - foo() => "foo()"; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C().foo(); -} +// 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 It is a compile-time error if a class has both a getter and a +/// method with the same name. This restriction holds regardless of whether the +/// getter is defined explicitly or implicitly, or whether the getter or the +/// method are inherited or not. +/// @description Checks that a compile-time error is produced if a class has +/// an implicit getter and a method with the same name. +/// @author iefremov + +class C { + var foo; + foo() => "foo()"; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C().foo(); +} diff --git a/Language/Classes/Getters/same_name_method_t03.dart b/Language/Classes/Getters/same_name_method_t03.dart index 8aa9042c65..0db1df0f92 100644 --- a/Language/Classes/Getters/same_name_method_t03.dart +++ b/Language/Classes/Getters/same_name_method_t03.dart @@ -1,27 +1,27 @@ -// 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 It is a compile-time error if a class has both a getter and a -/// method with the same name. This restriction holds regardless of whether the -/// getter is defined explicitly or implicitly, or whether the getter or the -/// method are inherited or not. -/// @description Checks that a compile-time error is produced if a class has -/// an implicit getter inherited from a superclass and a method with the same -/// name. -/// @author iefremov - -class A { - var foo; -} - -class C extends A { - foo() { return "foo()"; } -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().foo(); -} +// 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 It is a compile-time error if a class has both a getter and a +/// method with the same name. This restriction holds regardless of whether the +/// getter is defined explicitly or implicitly, or whether the getter or the +/// method are inherited or not. +/// @description Checks that a compile-time error is produced if a class has +/// an implicit getter inherited from a superclass and a method with the same +/// name. +/// @author iefremov + +class A { + var foo; +} + +class C extends A { + foo() { return "foo()"; } +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().foo(); +} diff --git a/Language/Classes/Getters/same_name_method_t04.dart b/Language/Classes/Getters/same_name_method_t04.dart index bd38ba6b08..fc491cfd4b 100644 --- a/Language/Classes/Getters/same_name_method_t04.dart +++ b/Language/Classes/Getters/same_name_method_t04.dart @@ -1,27 +1,27 @@ -// 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 It is a compile-time error if a class has both a getter and a -/// method with the same name. This restriction holds regardless of whether the -/// getter is defined explicitly or implicitly, or whether the getter or the -/// method are inherited or not. -/// @description Checks that a compile-time error is produced if a class has -/// an explicitly declared getter inherited from a superclass and a method with -/// the same name. -/// @author iefremov - -class A { - get foo => throw A(); -} - -class C extends A { - foo() => "foo()"; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().foo(); -} +// 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 It is a compile-time error if a class has both a getter and a +/// method with the same name. This restriction holds regardless of whether the +/// getter is defined explicitly or implicitly, or whether the getter or the +/// method are inherited or not. +/// @description Checks that a compile-time error is produced if a class has +/// an explicitly declared getter inherited from a superclass and a method with +/// the same name. +/// @author iefremov + +class A { + get foo => throw A(); +} + +class C extends A { + foo() => "foo()"; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().foo(); +} diff --git a/Language/Classes/Getters/same_name_method_t05.dart b/Language/Classes/Getters/same_name_method_t05.dart index 490cddd9d5..82ae41e0bf 100644 --- a/Language/Classes/Getters/same_name_method_t05.dart +++ b/Language/Classes/Getters/same_name_method_t05.dart @@ -1,27 +1,27 @@ -// 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 It is a compile-time error if a class has both a getter and a -/// method with the same name. This restriction holds regardless of whether the -/// getter is defined explicitly or implicitly, or whether the getter or the -/// method are inherited or not. -/// @description Checks that a compile-time error is produced if a class has -/// an explicitly declared getter and a method with the same name that is -/// inherited from a superclass. -/// @author iefremov - -class A { - foo() => throw A(); -} - -class C extends A { - get foo => "foo()"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().foo(); -} +// 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 It is a compile-time error if a class has both a getter and a +/// method with the same name. This restriction holds regardless of whether the +/// getter is defined explicitly or implicitly, or whether the getter or the +/// method are inherited or not. +/// @description Checks that a compile-time error is produced if a class has +/// an explicitly declared getter and a method with the same name that is +/// inherited from a superclass. +/// @author iefremov + +class A { + foo() => throw A(); +} + +class C extends A { + get foo => "foo()"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().foo(); +} diff --git a/Language/Classes/Getters/same_name_method_t07.dart b/Language/Classes/Getters/same_name_method_t07.dart index 1042ad16f5..67e3935b21 100644 --- a/Language/Classes/Getters/same_name_method_t07.dart +++ b/Language/Classes/Getters/same_name_method_t07.dart @@ -1,26 +1,26 @@ -// 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 It is a compile-time error if a class has both a getter and a -/// method with the same name. This restriction holds regardless of whether the -/// getter is defined explicitly or implicitly, or whether the getter or the -/// method are inherited or not. -/// @description Checks that a compile-time error is produced if a class has an -/// implicit getter and a method with the same name inherited from a superclass. -/// @author iefremov - -class A { - foo() => throw A(); -} - -class C extends A { - var foo; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().foo(); -} +// 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 It is a compile-time error if a class has both a getter and a +/// method with the same name. This restriction holds regardless of whether the +/// getter is defined explicitly or implicitly, or whether the getter or the +/// method are inherited or not. +/// @description Checks that a compile-time error is produced if a class has an +/// implicit getter and a method with the same name inherited from a superclass. +/// @author iefremov + +class A { + foo() => throw A(); +} + +class C extends A { + var foo; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().foo(); +} diff --git a/Language/Classes/Getters/same_name_method_t08.dart b/Language/Classes/Getters/same_name_method_t08.dart index 4f9d85c354..1b079e694f 100644 --- a/Language/Classes/Getters/same_name_method_t08.dart +++ b/Language/Classes/Getters/same_name_method_t08.dart @@ -1,26 +1,26 @@ -// 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 It is a compile-time error if a class has both a getter and a -/// method with the same name. This restriction holds regardless of whether the -/// getter is defined explicitly or implicitly, or whether the getter or the -/// method are inherited or not. -/// @description Checks that a compile-time error is produced if a class has -/// an implicit getter and a static method with the same name. -/// @author iefremov - -class C { - var foo; - static foo() { throw C(); } -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.foo(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error if a class has both a getter and a +/// method with the same name. This restriction holds regardless of whether the +/// getter is defined explicitly or implicitly, or whether the getter or the +/// method are inherited or not. +/// @description Checks that a compile-time error is produced if a class has +/// an implicit getter and a static method with the same name. +/// @author iefremov + +class C { + var foo; + static foo() { throw C(); } +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.foo(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Classes/Getters/same_name_method_t09.dart b/Language/Classes/Getters/same_name_method_t09.dart index 4db6d809a1..d0c3af6dc0 100644 --- a/Language/Classes/Getters/same_name_method_t09.dart +++ b/Language/Classes/Getters/same_name_method_t09.dart @@ -1,27 +1,27 @@ -// 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 It is a compile-time error if a class has both a getter and a -/// method with the same name. This restriction holds regardless of whether the -/// getter is defined explicitly or implicitly, or whether the getter or the -/// method are inherited or not. -/// @description Checks that a compile-time error is produced if a class has -/// an explicitly declared getter and a static method with the same name. -/// @author iefremov - -class C { - get foo { throw new C(); } - - static foo() { throw new C(); } -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.foo(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error if a class has both a getter and a +/// method with the same name. This restriction holds regardless of whether the +/// getter is defined explicitly or implicitly, or whether the getter or the +/// method are inherited or not. +/// @description Checks that a compile-time error is produced if a class has +/// an explicitly declared getter and a static method with the same name. +/// @author iefremov + +class C { + get foo { throw new C(); } + + static foo() { throw new C(); } +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.foo(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Classes/Getters/same_name_method_t10.dart b/Language/Classes/Getters/same_name_method_t10.dart index 822c737020..6fe82fb4e9 100644 --- a/Language/Classes/Getters/same_name_method_t10.dart +++ b/Language/Classes/Getters/same_name_method_t10.dart @@ -1,27 +1,27 @@ -// 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 It is a compile-time error if a class has both a getter and a -/// method with the same name. This restriction holds regardless of whether the -/// getter is defined explicitly or implicitly, or whether the getter or the -/// method are inherited or not. -/// @description Checks that a compile-time error is produced if a class has -/// an explicitly declared static getter and a method with the same name. -/// @author iefremov - -class C { - static get foo { throw new C(); } -// ^ -// [analyzer] unspecified - - foo() { throw new C(); } -//^ -// [cfe] unspecified -} - -main() { - C().foo(); -// ^ -// [cfe] unspecified -} +// 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 It is a compile-time error if a class has both a getter and a +/// method with the same name. This restriction holds regardless of whether the +/// getter is defined explicitly or implicitly, or whether the getter or the +/// method are inherited or not. +/// @description Checks that a compile-time error is produced if a class has +/// an explicitly declared static getter and a method with the same name. +/// @author iefremov + +class C { + static get foo { throw new C(); } +// ^ +// [analyzer] unspecified + + foo() { throw new C(); } +//^ +// [cfe] unspecified +} + +main() { + C().foo(); +// ^ +// [cfe] unspecified +} diff --git a/Language/Classes/Getters/same_name_method_t11.dart b/Language/Classes/Getters/same_name_method_t11.dart index 2c242ad6ee..2ccb2a5d8b 100644 --- a/Language/Classes/Getters/same_name_method_t11.dart +++ b/Language/Classes/Getters/same_name_method_t11.dart @@ -1,28 +1,28 @@ -// 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 It is a compile-time error if a class has both a getter and a -/// method with the same name. This restriction holds regardless of whether the -/// getter is defined explicitly or implicitly, or whether the getter or the -/// method are inherited or not. -/// @description Checks that a compile-time error is produced if a class has -/// an implicit static getter and a method with the same name. -/// @author iefremov - -class C { - static var foo; -// ^ -// [analyzer] unspecified - - foo() { throw C(); } -//^ -// [cfe] unspecified - -} - -main() { - C().foo(); -// ^ -// [cfe] unspecified -} +// 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 It is a compile-time error if a class has both a getter and a +/// method with the same name. This restriction holds regardless of whether the +/// getter is defined explicitly or implicitly, or whether the getter or the +/// method are inherited or not. +/// @description Checks that a compile-time error is produced if a class has +/// an implicit static getter and a method with the same name. +/// @author iefremov + +class C { + static var foo; +// ^ +// [analyzer] unspecified + + foo() { throw C(); } +//^ +// [cfe] unspecified + +} + +main() { + C().foo(); +// ^ +// [cfe] unspecified +} diff --git a/Language/Classes/Getters/same_name_method_t12.dart b/Language/Classes/Getters/same_name_method_t12.dart index 028245f8e9..07680c3af8 100644 --- a/Language/Classes/Getters/same_name_method_t12.dart +++ b/Language/Classes/Getters/same_name_method_t12.dart @@ -1,25 +1,25 @@ -// 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 It is a compile-time error if a class has both a getter and a -/// method with the same name. This restriction holds regardless of whether the -/// getter is defined explicitly or implicitly, or whether the getter or the -/// method are inherited or not. -/// @description Checks that a compile-time error is produced if a class has -/// an implicit static getter and a static method with the same name. -/// @author iefremov - -class C { - static var foo; - static foo() { throw C(); } -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.foo(); -// ^ -// [cfe] unspecified -} +// 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 It is a compile-time error if a class has both a getter and a +/// method with the same name. This restriction holds regardless of whether the +/// getter is defined explicitly or implicitly, or whether the getter or the +/// method are inherited or not. +/// @description Checks that a compile-time error is produced if a class has +/// an implicit static getter and a static method with the same name. +/// @author iefremov + +class C { + static var foo; + static foo() { throw C(); } +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.foo(); +// ^ +// [cfe] unspecified +} diff --git a/Language/Classes/Getters/syntax_t02.dart b/Language/Classes/Getters/syntax_t02.dart index cffb7e9c84..4f7b105cf8 100644 --- a/Language/Classes/Getters/syntax_t02.dart +++ b/Language/Classes/Getters/syntax_t02.dart @@ -1,23 +1,23 @@ -// 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 -/// getterSignature: -/// returnType? get identifier -/// ; -/// @description Checks that it is a compile-time error if the getter identifier -/// is missing. -/// @author iefremov - -class C { - get => null; -//^^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} - +// 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 +/// getterSignature: +/// returnType? get identifier +/// ; +/// @description Checks that it is a compile-time error if the getter identifier +/// is missing. +/// @author iefremov + +class C { + get => null; +//^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} + diff --git a/Language/Classes/Getters/syntax_t04.dart b/Language/Classes/Getters/syntax_t04.dart index 5bd96b79bd..5f06056673 100644 --- a/Language/Classes/Getters/syntax_t04.dart +++ b/Language/Classes/Getters/syntax_t04.dart @@ -1,21 +1,21 @@ -// 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 -/// getterSignature: -/// returnType? get identifier -/// ; -/// @description Checks that a compile-time error is produced when a getter -/// declaration includes a non-empty formal parameter list. -/// @author kaigorodov - -class C { - get getter([var value = null]) { throw new C(); } -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().getter; -} +// 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 +/// getterSignature: +/// returnType? get identifier +/// ; +/// @description Checks that a compile-time error is produced when a getter +/// declaration includes a non-empty formal parameter list. +/// @author kaigorodov + +class C { + get getter([var value = null]) { throw new C(); } +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().getter; +} diff --git a/Language/Classes/Getters/syntax_t06.dart b/Language/Classes/Getters/syntax_t06.dart index b7490e5aba..97a9ba636b 100644 --- a/Language/Classes/Getters/syntax_t06.dart +++ b/Language/Classes/Getters/syntax_t06.dart @@ -1,23 +1,23 @@ -// 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 -/// getterSignature: -/// returnType? get identifier -/// ; -/// @description Checks that a compile-time error is produced if an arbitrary -/// static getter specifies -/// a single formal parameter. -/// @author vasya - -class C { - static get getter(var value) {throw new C();} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.getter; -} +// 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 +/// getterSignature: +/// returnType? get identifier +/// ; +/// @description Checks that a compile-time error is produced if an arbitrary +/// static getter specifies +/// a single formal parameter. +/// @author vasya + +class C { + static get getter(var value) {throw new C();} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.getter; +} diff --git a/Language/Classes/Getters/syntax_t07.dart b/Language/Classes/Getters/syntax_t07.dart index a98b84185c..c0936b823d 100644 --- a/Language/Classes/Getters/syntax_t07.dart +++ b/Language/Classes/Getters/syntax_t07.dart @@ -1,22 +1,22 @@ -// 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 -/// getterSignature: -/// returnType? get identifier -/// ; -/// @description Checks that a compile-time error is produced if an arbitrary -/// instance getter specifies a single formal parameter. -/// @author vasya - -class C { - get getter(var value) { throw new C(); } -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().getter; -} +// 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 +/// getterSignature: +/// returnType? get identifier +/// ; +/// @description Checks that a compile-time error is produced if an arbitrary +/// instance getter specifies a single formal parameter. +/// @author vasya + +class C { + get getter(var value) { throw new C(); } +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().getter; +} diff --git a/Language/Classes/Instance_Methods/Operators/allowed_names_t02.dart b/Language/Classes/Instance_Methods/Operators/allowed_names_t02.dart index 0375500dc4..4befa81b9e 100644 --- a/Language/Classes/Instance_Methods/Operators/allowed_names_t02.dart +++ b/Language/Classes/Instance_Methods/Operators/allowed_names_t02.dart @@ -1,20 +1,20 @@ -// 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 The following names are allowed for user-defined operators: -/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜. -/// -/// @description Checks that operator != cannot be defined in a user class. -/// @author vasya - -class C { - operator !=(other) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C() != new C(); -} +// 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 The following names are allowed for user-defined operators: +/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜. +/// +/// @description Checks that operator != cannot be defined in a user class. +/// @author vasya + +class C { + operator !=(other) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C() != new C(); +} diff --git a/Language/Classes/Instance_Methods/Operators/allowed_names_t03.dart b/Language/Classes/Instance_Methods/Operators/allowed_names_t03.dart index c948f53724..74265c00c5 100644 --- a/Language/Classes/Instance_Methods/Operators/allowed_names_t03.dart +++ b/Language/Classes/Instance_Methods/Operators/allowed_names_t03.dart @@ -1,23 +1,23 @@ -// 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 The following names are allowed for user-defined operators: -/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜. -/// -/// @description Checks that operator !== cannot be defined in a user class. -/// @author iefremov - -class C { - operator !==(other) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C() !== new C(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The following names are allowed for user-defined operators: +/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜. +/// +/// @description Checks that operator !== cannot be defined in a user class. +/// @author iefremov + +class C { + operator !==(other) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C() !== new C(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Classes/Instance_Methods/Operators/allowed_names_t04.dart b/Language/Classes/Instance_Methods/Operators/allowed_names_t04.dart index 22aedfff07..2b4ebb5f01 100644 --- a/Language/Classes/Instance_Methods/Operators/allowed_names_t04.dart +++ b/Language/Classes/Instance_Methods/Operators/allowed_names_t04.dart @@ -1,23 +1,23 @@ -// 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 The following names are allowed for user-defined operators: -/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜. -/// -/// @description Checks that operator === cannot be defined in a user class. -/// @author iefremov - -class C { - operator ===(other) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C() === new C(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The following names are allowed for user-defined operators: +/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜. +/// +/// @description Checks that operator === cannot be defined in a user class. +/// @author iefremov + +class C { + operator ===(other) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C() === new C(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Classes/Instance_Methods/Operators/allowed_names_t05.dart b/Language/Classes/Instance_Methods/Operators/allowed_names_t05.dart index 8b0a42b946..d60496d9e5 100644 --- a/Language/Classes/Instance_Methods/Operators/allowed_names_t05.dart +++ b/Language/Classes/Instance_Methods/Operators/allowed_names_t05.dart @@ -1,25 +1,25 @@ -// 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 The following names are allowed for user-defined operators: -/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜. -/// -/// @description Checks that operator ! cannot be defined in a user class. -/// @author iefremov - -class C { - bool operator !() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C? c = new C(); - c!; -// ^ -// [analyzer] STATIC_WARNING.UNNECESSARY_NON_NULL_ASSERTION -//^ -// [cfe] Operand of null-aware operation '!' has type 'C' which excludes null. -} +// 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 The following names are allowed for user-defined operators: +/// <, >, <=, >=, ==, -, +, /, ˜/, *, %, |, ˆ, &, <<, >>, >>>, []=, [], ˜. +/// +/// @description Checks that operator ! cannot be defined in a user class. +/// @author iefremov + +class C { + bool operator !() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C? c = new C(); + c!; +// ^ +// [analyzer] STATIC_WARNING.UNNECESSARY_NON_NULL_ASSERTION +//^ +// [cfe] Operand of null-aware operation '!' has type 'C' which excludes null. +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_0_or_1_t02.dart b/Language/Classes/Instance_Methods/Operators/arity_0_or_1_t02.dart index b93e76f8e0..1a0e0ad9a5 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_0_or_1_t02.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_0_or_1_t02.dart @@ -1,24 +1,24 @@ -// 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 It is a compile-time error if the arity of the user-declared -/// operator - is not 0 or 1. -/// The - operator is unique in that two overloaded versions are permitted. -/// If the operator has no arguments, it denotes unary minus. -/// If it as an argument, it denotes binary subtraction. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator `-` specifies two parameters. -/// @author kaigorodov - -class C { - operator -(var val, var val2) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C() - new C(); -} +// 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 It is a compile-time error if the arity of the user-declared +/// operator - is not 0 or 1. +/// The - operator is unique in that two overloaded versions are permitted. +/// If the operator has no arguments, it denotes unary minus. +/// If it as an argument, it denotes binary subtraction. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator `-` specifies two parameters. +/// @author kaigorodov + +class C { + operator -(var val, var val2) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C() - new C(); +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_0_t02.dart b/Language/Classes/Instance_Methods/Operators/arity_0_t02.dart index bbf6d53f9e..6227ab28eb 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_0_t02.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_0_t02.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if the arity of the user-declared -/// operator ~ is not 0. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator ~ specifies one parameter. -/// @author vasya - -class C { - operator ~(var v) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - ~(new C()); -} +// 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 It is a compile-time error if the arity of the user-declared +/// operator ~ is not 0. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator ~ specifies one parameter. +/// @author vasya + +class C { + operator ~(var v) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + ~(new C()); +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_1_t01.dart b/Language/Classes/Instance_Methods/Operators/arity_1_t01.dart index 6948af230a..f8dc8d67ff 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_1_t01.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_1_t01.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if the arity of a user-declared -/// operator with one of the names: -/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator == specifies two parameters. -/// @author vasya - -class C { - operator ==(var val, var val2) => true; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C() == new C(); -} +// 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 It is a compile-time error if the arity of a user-declared +/// operator with one of the names: +/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator == specifies two parameters. +/// @author vasya + +class C { + operator ==(var val, var val2) => true; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C() == new C(); +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_1_t02.dart b/Language/Classes/Instance_Methods/Operators/arity_1_t02.dart index 0d43960072..cfa3cd6708 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_1_t02.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_1_t02.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if the arity of a user-declared -/// operator with one of the names: -/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator < specifies two parameters. -/// @author vasya - -class C { - operator <(var val, var val2) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C() < new C(); -} +// 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 It is a compile-time error if the arity of a user-declared +/// operator with one of the names: +/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator < specifies two parameters. +/// @author vasya + +class C { + operator <(var val, var val2) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C() < new C(); +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_1_t03.dart b/Language/Classes/Instance_Methods/Operators/arity_1_t03.dart index 8b00c1cb6d..bc1264a703 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_1_t03.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_1_t03.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if the arity of a user-declared -/// operator with one of the names: -/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator > specifies two parameters. -/// @author vasya - -class C { - operator >(var val, var val2) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C() > new C(); -} +// 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 It is a compile-time error if the arity of a user-declared +/// operator with one of the names: +/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator > specifies two parameters. +/// @author vasya + +class C { + operator >(var val, var val2) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C() > new C(); +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_1_t04.dart b/Language/Classes/Instance_Methods/Operators/arity_1_t04.dart index b71ad0f41d..5a87fb18b2 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_1_t04.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_1_t04.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if the arity of a user-declared -/// operator with one of the names: -/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator <= specifies two parameters. -/// @author vasya - -class C { - operator <=(var val, var val2) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C() <= new C(); -} +// 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 It is a compile-time error if the arity of a user-declared +/// operator with one of the names: +/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator <= specifies two parameters. +/// @author vasya + +class C { + operator <=(var val, var val2) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C() <= new C(); +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_1_t05.dart b/Language/Classes/Instance_Methods/Operators/arity_1_t05.dart index a511fb23ca..43787a9063 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_1_t05.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_1_t05.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if the arity of a user-declared -/// operator with one of the names: -/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator >= specifies two parameters. -/// @author vasya - -class C { - operator >=(var val, var val2) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C() >= new C(); -} +// 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 It is a compile-time error if the arity of a user-declared +/// operator with one of the names: +/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator >= specifies two parameters. +/// @author vasya + +class C { + operator >=(var val, var val2) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C() >= new C(); +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_1_t06.dart b/Language/Classes/Instance_Methods/Operators/arity_1_t06.dart index 45cacfbccd..68e824be00 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_1_t06.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_1_t06.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if the arity of a user-declared -/// operator with one of the names: -/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator - specifies two parameters. -/// @author vasya - -class C { - operator -(var val, var val2) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C() - new C(); -} +// 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 It is a compile-time error if the arity of a user-declared +/// operator with one of the names: +/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator - specifies two parameters. +/// @author vasya + +class C { + operator -(var val, var val2) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C() - new C(); +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_1_t07.dart b/Language/Classes/Instance_Methods/Operators/arity_1_t07.dart index a45d8e6575..f4ff6ab901 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_1_t07.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_1_t07.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if the arity of a user-declared -/// operator with one of the names: -/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator + specifies two parameters. -/// @author vasya - -class C { - operator +(var val, var val2) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C() + new C(); -} +// 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 It is a compile-time error if the arity of a user-declared +/// operator with one of the names: +/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator + specifies two parameters. +/// @author vasya + +class C { + operator +(var val, var val2) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C() + new C(); +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_1_t08.dart b/Language/Classes/Instance_Methods/Operators/arity_1_t08.dart index abff46b1f3..4e87ae2fe6 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_1_t08.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_1_t08.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if the arity of a user-declared -/// operator with one of the names: -/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator ~/ specifies two parameters. -/// @author vasya - -class C { - operator ~/(var val, var val2) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C() ~/ new C(); -} +// 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 It is a compile-time error if the arity of a user-declared +/// operator with one of the names: +/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator ~/ specifies two parameters. +/// @author vasya + +class C { + operator ~/(var val, var val2) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C() ~/ new C(); +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_1_t09.dart b/Language/Classes/Instance_Methods/Operators/arity_1_t09.dart index 6017f7dfad..4e56cede5e 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_1_t09.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_1_t09.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if the arity of a user-declared -/// operator with one of the names: -/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator / specifies two parameters. -/// @author vasya - -class C { - operator /(var val, var val2) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C() / new C(); -} +// 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 It is a compile-time error if the arity of a user-declared +/// operator with one of the names: +/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator / specifies two parameters. +/// @author vasya + +class C { + operator /(var val, var val2) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C() / new C(); +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_1_t10.dart b/Language/Classes/Instance_Methods/Operators/arity_1_t10.dart index 8655708044..a38acb0557 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_1_t10.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_1_t10.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if the arity of a user-declared -/// operator with one of the names: -/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator * specifies two parameters. -/// @author vasya - -class C { - operator *(var val, var val2) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C() * new C(); -} +// 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 It is a compile-time error if the arity of a user-declared +/// operator with one of the names: +/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator * specifies two parameters. +/// @author vasya + +class C { + operator *(var val, var val2) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C() * new C(); +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_1_t11.dart b/Language/Classes/Instance_Methods/Operators/arity_1_t11.dart index ca8bf23f7f..68968e6283 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_1_t11.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_1_t11.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if the arity of a user-declared -/// operator with one of the names: -/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator % specifies two parameters. -/// @author vasya - -class C { - operator %(var val, var val2) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C() % new C(); -} +// 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 It is a compile-time error if the arity of a user-declared +/// operator with one of the names: +/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator % specifies two parameters. +/// @author vasya + +class C { + operator %(var val, var val2) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C() % new C(); +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_1_t12.dart b/Language/Classes/Instance_Methods/Operators/arity_1_t12.dart index 4d2a4a5910..565d8263a9 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_1_t12.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_1_t12.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if the arity of a user-declared -/// operator with one of the names: -/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator & specifies two parameters. -/// @author vasya - -class C { - operator &(var val, var val2) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C() & new C(); -} +// 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 It is a compile-time error if the arity of a user-declared +/// operator with one of the names: +/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator & specifies two parameters. +/// @author vasya + +class C { + operator &(var val, var val2) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C() & new C(); +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_1_t13.dart b/Language/Classes/Instance_Methods/Operators/arity_1_t13.dart index 896e7fe16b..247d5cf454 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_1_t13.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_1_t13.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if the arity of a user-declared -/// operator with one of the names: -/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator << specifies two parameters. -/// @author vasya - -class C { - operator <<(var val, var val2) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C() << new C(); -} +// 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 It is a compile-time error if the arity of a user-declared +/// operator with one of the names: +/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator << specifies two parameters. +/// @author vasya + +class C { + operator <<(var val, var val2) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C() << new C(); +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_1_t14.dart b/Language/Classes/Instance_Methods/Operators/arity_1_t14.dart index 45d4331bf5..67d3a30c67 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_1_t14.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_1_t14.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if the arity of a user-declared -/// operator with one of the names: -/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator >> specifies two parameters. -/// @author vasya - -class C { - operator >>(var val, var val2) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C() >> new C(); -} +// 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 It is a compile-time error if the arity of a user-declared +/// operator with one of the names: +/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator >> specifies two parameters. +/// @author vasya + +class C { + operator >>(var val, var val2) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C() >> new C(); +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_1_t15.dart b/Language/Classes/Instance_Methods/Operators/arity_1_t15.dart index 308677d4f9..8e89ff7ff9 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_1_t15.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_1_t15.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if the arity of a user-declared -/// operator with one of the names: -/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator [] specifies two parameters. -/// @author vasya - -class C { - operator [](var index, var val) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C()[1]; -} +// 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 It is a compile-time error if the arity of a user-declared +/// operator with one of the names: +/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator [] specifies two parameters. +/// @author vasya + +class C { + operator [](var index, var val) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C()[1]; +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_1_t16.dart b/Language/Classes/Instance_Methods/Operators/arity_1_t16.dart index 3fc482fd48..7dadc984ed 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_1_t16.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_1_t16.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if the arity of a user-declared -/// operator with one of the names: -/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator [] specifies no parameters. -/// @author iefremov - -class C { - operator []() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C()[0]; -} +// 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 It is a compile-time error if the arity of a user-declared +/// operator with one of the names: +/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator [] specifies no parameters. +/// @author iefremov + +class C { + operator []() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C()[0]; +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_1_t17.dart b/Language/Classes/Instance_Methods/Operators/arity_1_t17.dart index 39ae04d66d..d0e6f6cecc 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_1_t17.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_1_t17.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if the arity of a user-declared -/// operator with one of the names: -/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator | specifies two parameters. -/// @author iefremov - -class C { - operator |(var val, var val2) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C() | new C(); -} +// 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 It is a compile-time error if the arity of a user-declared +/// operator with one of the names: +/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator | specifies two parameters. +/// @author iefremov + +class C { + operator |(var val, var val2) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C() | new C(); +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_1_t18.dart b/Language/Classes/Instance_Methods/Operators/arity_1_t18.dart index 7873440419..769d0de4fc 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_1_t18.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_1_t18.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if the arity of a user-declared -/// operator with one of the names: -/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator ^ specifies two parameters. -/// @author iefremov - -class C { - operator ^(var val, var val2) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C() ^ new C(); -} +// 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 It is a compile-time error if the arity of a user-declared +/// operator with one of the names: +/// <, >, <=, >=, ==, -, +, ̃/, /, *, %, |, ˆ, &, <<, >>, >>>, [] is not 1. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator ^ specifies two parameters. +/// @author iefremov + +class C { + operator ^(var val, var val2) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C() ^ new C(); +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_2_t01.dart b/Language/Classes/Instance_Methods/Operators/arity_2_t01.dart index f86ffe2edc..870068b798 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_2_t01.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_2_t01.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if arity of the user-declared operator -/// []= is not 2. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator []= specifies three parameters. -/// @author vasya - -class C { - operator []=(var index, var val, var val2) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C()[0] = new C(); -} +// 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 It is a compile-time error if arity of the user-declared operator +/// []= is not 2. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator []= specifies three parameters. +/// @author vasya + +class C { + operator []=(var index, var val, var val2) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C()[0] = new C(); +} diff --git a/Language/Classes/Instance_Methods/Operators/arity_2_t02.dart b/Language/Classes/Instance_Methods/Operators/arity_2_t02.dart index 3f4bfe5739..60f17cbdc6 100644 --- a/Language/Classes/Instance_Methods/Operators/arity_2_t02.dart +++ b/Language/Classes/Instance_Methods/Operators/arity_2_t02.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if arity of the user-declared operator -/// []= is not 2. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator []= specifies a single parameter. -/// @author iefremov - -class C { - operator []=(var index) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C()[0] = new C(); -} +// 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 It is a compile-time error if arity of the user-declared operator +/// []= is not 2. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator []= specifies a single parameter. +/// @author iefremov + +class C { + operator []=(var index) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C()[0] = new C(); +} diff --git a/Language/Classes/Instance_Methods/Operators/optional_parameter_t01.dart b/Language/Classes/Instance_Methods/Operators/optional_parameter_t01.dart index 69bd1a86f9..16b3fbe3ac 100644 --- a/Language/Classes/Instance_Methods/Operators/optional_parameter_t01.dart +++ b/Language/Classes/Instance_Methods/Operators/optional_parameter_t01.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error to declare an optional parameter in an -/// operator. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator [] specifies an optional positional parameter. -/// @author iefremov - -class C { - operator []([var o]) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C()[1]; -} +// 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 It is a compile-time error to declare an optional parameter in an +/// operator. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator [] specifies an optional positional parameter. +/// @author iefremov + +class C { + operator []([var o]) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C()[1]; +} diff --git a/Language/Classes/Instance_Methods/Operators/optional_parameter_t02.dart b/Language/Classes/Instance_Methods/Operators/optional_parameter_t02.dart index 18671576e8..99f51924c1 100644 --- a/Language/Classes/Instance_Methods/Operators/optional_parameter_t02.dart +++ b/Language/Classes/Instance_Methods/Operators/optional_parameter_t02.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error to declare an optional parameter in an -/// operator. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator [] specifies an optional positional parameter in addition to the -/// required one. -/// @author rodionov - -class C { - operator [](var r, [var o]) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C()[1]; -} +// 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 It is a compile-time error to declare an optional parameter in an +/// operator. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator [] specifies an optional positional parameter in addition to the +/// required one. +/// @author rodionov + +class C { + operator [](var r, [var o]) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C()[1]; +} diff --git a/Language/Classes/Instance_Methods/Operators/optional_parameter_t05.dart b/Language/Classes/Instance_Methods/Operators/optional_parameter_t05.dart index 3dcc606d24..79224b6710 100644 --- a/Language/Classes/Instance_Methods/Operators/optional_parameter_t05.dart +++ b/Language/Classes/Instance_Methods/Operators/optional_parameter_t05.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error to declare an optional parameter in an -/// operator. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator [] specifies one optional named parameter. -/// @author ilya - -class C { - operator []({var o}) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C()[1]; -} +// 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 It is a compile-time error to declare an optional parameter in an +/// operator. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator [] specifies one optional named parameter. +/// @author ilya + +class C { + operator []({var o}) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C()[1]; +} diff --git a/Language/Classes/Instance_Methods/Operators/optional_parameter_t06.dart b/Language/Classes/Instance_Methods/Operators/optional_parameter_t06.dart index dcad215d6a..9475bd9b9c 100644 --- a/Language/Classes/Instance_Methods/Operators/optional_parameter_t06.dart +++ b/Language/Classes/Instance_Methods/Operators/optional_parameter_t06.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error to declare an optional parameter in an -/// operator. -/// -/// @description Checks that a compile-time error is produced if a user-defined -/// operator [] specifies an optional named parameter in addition to the -/// required one. -/// @author ilya - -class C { - operator [](var r, {var o}) {} -// ^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C()[1]; -} +// 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 It is a compile-time error to declare an optional parameter in an +/// operator. +/// +/// @description Checks that a compile-time error is produced if a user-defined +/// operator [] specifies an optional named parameter in addition to the +/// required one. +/// @author ilya + +class C { + operator [](var r, {var o}) {} +// ^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C()[1]; +} diff --git a/Language/Classes/Instance_Methods/Operators/syntax_t01.dart b/Language/Classes/Instance_Methods/Operators/syntax_t01.dart index 3cea945042..c0ad90c5aa 100644 --- a/Language/Classes/Instance_Methods/Operators/syntax_t01.dart +++ b/Language/Classes/Instance_Methods/Operators/syntax_t01.dart @@ -1,45 +1,45 @@ -// 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 -/// ⟨operatorSignature⟩ ::= -/// ⟨type⟩? operator ⟨operator⟩ ⟨formalParameterList⟩ -/// ⟨operator⟩ ::= ‘~’ -/// | ⟨binaryOperator⟩ -/// | ‘[]’ -/// | ‘[]=’ -/// ⟨binaryOperator⟩ ::= ⟨multiplicativeOperator⟩ -/// | ⟨additiveOperator⟩ -/// | ⟨shiftOperator⟩ -/// | ⟨relationalOperator⟩ -/// | ‘==’ -/// | ⟨bitwiseOperator⟩ -/// -/// @description Checks that any return type (including function type, type -/// parameter, void or no return type at all) can be specified for any operator. -/// @author iefremov - -typedef int Foo(double d); - -class C { - int operator +(var v) => 42; - List operator [](var v) => []; - operator -() {} - operator -(var v) {} - operator []=(var v, var v2) {} - dynamic operator ~() {} - Foo operator *(var v) => (double s) => 42; - T operator >(T t) => t; -} - -main() { - C c = new C(); - dynamic x = c + c; - x = c - c; - x = c[c]; - c[c] = c; - -c; - x = ~c; - x = c == c; -} +// 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 +/// ⟨operatorSignature⟩ ::= +/// ⟨type⟩? operator ⟨operator⟩ ⟨formalParameterList⟩ +/// ⟨operator⟩ ::= ‘~’ +/// | ⟨binaryOperator⟩ +/// | ‘[]’ +/// | ‘[]=’ +/// ⟨binaryOperator⟩ ::= ⟨multiplicativeOperator⟩ +/// | ⟨additiveOperator⟩ +/// | ⟨shiftOperator⟩ +/// | ⟨relationalOperator⟩ +/// | ‘==’ +/// | ⟨bitwiseOperator⟩ +/// +/// @description Checks that any return type (including function type, type +/// parameter, void or no return type at all) can be specified for any operator. +/// @author iefremov + +typedef int Foo(double d); + +class C { + int operator +(var v) => 42; + List operator [](var v) => []; + operator -() {} + operator -(var v) {} + operator []=(var v, var v2) {} + dynamic operator ~() {} + Foo operator *(var v) => (double s) => 42; + T operator >(T t) => t; +} + +main() { + C c = new C(); + dynamic x = c + c; + x = c - c; + x = c[c]; + c[c] = c; + -c; + x = ~c; + x = c == c; +} diff --git a/Language/Classes/Instance_Methods/Operators/syntax_t03.dart b/Language/Classes/Instance_Methods/Operators/syntax_t03.dart index 1c78d238c1..859c086fbe 100644 --- a/Language/Classes/Instance_Methods/Operators/syntax_t03.dart +++ b/Language/Classes/Instance_Methods/Operators/syntax_t03.dart @@ -1,33 +1,33 @@ -// 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 -/// ⟨operatorSignature⟩ ::= -/// ⟨type⟩? operator ⟨operator⟩ ⟨formalParameterList⟩ -/// ⟨operator⟩ ::= ‘~’ -/// | ⟨binaryOperator⟩ -/// | ‘[]’ -/// | ‘[]=’ -/// ⟨binaryOperator⟩ ::= ⟨multiplicativeOperator⟩ -/// | ⟨additiveOperator⟩ -/// | ⟨shiftOperator⟩ -/// | ⟨relationalOperator⟩ -/// | ‘==’ -/// | ⟨bitwiseOperator⟩ -/// -/// @description Checks that it is not a compile-time error if a class attempts -/// to define an operator without a name because an instance method named -/// 'operator' is allowed by the spec. -/// @author iefremov - -import "../../../../Utils/expect.dart"; - -class C { - int operator(var v) => 42; -} - -main() { - C c = new C(); - Expect.equals(42, c.operator(3)); -} +// 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 +/// ⟨operatorSignature⟩ ::= +/// ⟨type⟩? operator ⟨operator⟩ ⟨formalParameterList⟩ +/// ⟨operator⟩ ::= ‘~’ +/// | ⟨binaryOperator⟩ +/// | ‘[]’ +/// | ‘[]=’ +/// ⟨binaryOperator⟩ ::= ⟨multiplicativeOperator⟩ +/// | ⟨additiveOperator⟩ +/// | ⟨shiftOperator⟩ +/// | ⟨relationalOperator⟩ +/// | ‘==’ +/// | ⟨bitwiseOperator⟩ +/// +/// @description Checks that it is not a compile-time error if a class attempts +/// to define an operator without a name because an instance method named +/// 'operator' is allowed by the spec. +/// @author iefremov + +import "../../../../Utils/expect.dart"; + +class C { + int operator(var v) => 42; +} + +main() { + C c = new C(); + Expect.equals(42, c.operator(3)); +} diff --git a/Language/Classes/Instance_Methods/same_name_getter_t02.dart b/Language/Classes/Instance_Methods/same_name_getter_t02.dart index 975d2c949c..4d14c70aae 100644 --- a/Language/Classes/Instance_Methods/same_name_getter_t02.dart +++ b/Language/Classes/Instance_Methods/same_name_getter_t02.dart @@ -1,31 +1,31 @@ -// 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 method declaration may conflict with other declarations (10.11). -/// Let C be a class. It is a compile-time error if C declares a -/// • constructor named C.n and a static member with basename n. -/// • getter or a setter with basename n, and has a method named n. -/// • method named n, and has a getter or a setter with basename n. -/// • static member with basename n, and has an instance member with basename n. -/// -/// @description Checks that it is a compile error if a class C declares an -/// instance method named n and an inherited instance getter named n. -/// @author ngl@unipro.ru - - -class A { - get foo {} -} - -class C extends A { - foo() {} -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C c = new C(); - c.foo(); -} +// 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 method declaration may conflict with other declarations (10.11). +/// Let C be a class. It is a compile-time error if C declares a +/// • constructor named C.n and a static member with basename n. +/// • getter or a setter with basename n, and has a method named n. +/// • method named n, and has a getter or a setter with basename n. +/// • static member with basename n, and has an instance member with basename n. +/// +/// @description Checks that it is a compile error if a class C declares an +/// instance method named n and an inherited instance getter named n. +/// @author ngl@unipro.ru + + +class A { + get foo {} +} + +class C extends A { + foo() {} +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C c = new C(); + c.foo(); +} diff --git a/Language/Classes/Instance_Methods/same_name_setter_t02.dart b/Language/Classes/Instance_Methods/same_name_setter_t02.dart index 0cb50e5e74..85097f0e2f 100644 --- a/Language/Classes/Instance_Methods/same_name_setter_t02.dart +++ b/Language/Classes/Instance_Methods/same_name_setter_t02.dart @@ -1,32 +1,32 @@ -// 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 method declaration may conflict with other declarations (10.11). -/// Let C be a class. It is a compile-time error if C declares a -/// • constructor named C.n and a static member with basename n. -/// • getter or a setter with basename n, and has a method named n. -/// • method named n, and has a getter or a setter with basename n. -/// • static member with basename n, and has an instance member with basename n. -/// -/// @description Checks that it is a compile error if a class C declares an -/// instance method named n and inherits a setter named n=. -/// @author kaigorodov - - -class A { - set foo(int a) {} -} - -class C extends A { - foo() {} -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C c = new C(); - c.foo(); -} +// 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 method declaration may conflict with other declarations (10.11). +/// Let C be a class. It is a compile-time error if C declares a +/// • constructor named C.n and a static member with basename n. +/// • getter or a setter with basename n, and has a method named n. +/// • method named n, and has a getter or a setter with basename n. +/// • static member with basename n, and has an instance member with basename n. +/// +/// @description Checks that it is a compile error if a class C declares an +/// instance method named n and inherits a setter named n=. +/// @author kaigorodov + + +class A { + set foo(int a) {} +} + +class C extends A { + foo() {} +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C c = new C(); + c.foo(); +} diff --git a/Language/Classes/Setters/parameter_t01.dart b/Language/Classes/Setters/parameter_t01.dart index 907b722ba6..a43b5cdc77 100644 --- a/Language/Classes/Setters/parameter_t01.dart +++ b/Language/Classes/Setters/parameter_t01.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if a setter's formal parameter list -/// does not consist of exactly one required formal parameter p. -/// @description Checks that a compile-time error is produced if a setter's -/// formal parameter list contains two required parameters. -/// @author vasya - - -class C { - void set setter(v1, v2) {throw new C();} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().setter = null; -} +// 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 It is a compile-time error if a setter's formal parameter list +/// does not consist of exactly one required formal parameter p. +/// @description Checks that a compile-time error is produced if a setter's +/// formal parameter list contains two required parameters. +/// @author vasya + + +class C { + void set setter(v1, v2) {throw new C();} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().setter = null; +} diff --git a/Language/Classes/Setters/parameter_t02.dart b/Language/Classes/Setters/parameter_t02.dart index b5b5780954..823175891f 100644 --- a/Language/Classes/Setters/parameter_t02.dart +++ b/Language/Classes/Setters/parameter_t02.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if a setter's formal parameter list -/// does not consist of exactly one required formal parameter p. -/// @description Checks that a compile-time error is produced if a setter's -/// formal parameter list consists of a single optional parameter. -/// @author vasya - - -class C { - void set setter([value]) { } -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - (new C()).setter = null; -} +// 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 It is a compile-time error if a setter's formal parameter list +/// does not consist of exactly one required formal parameter p. +/// @description Checks that a compile-time error is produced if a setter's +/// formal parameter list consists of a single optional parameter. +/// @author vasya + + +class C { + void set setter([value]) { } +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + (new C()).setter = null; +} diff --git a/Language/Classes/Setters/parameter_t03.dart b/Language/Classes/Setters/parameter_t03.dart index 1c72e5c821..48982722a9 100644 --- a/Language/Classes/Setters/parameter_t03.dart +++ b/Language/Classes/Setters/parameter_t03.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if a setter's formal parameter list -/// does not consist of exactly one required formal parameter p. -/// @description Checks that a compile-time error is produced if a setter's -/// formal parameter list is empty. -/// @author iefremov - - -class C { - void set setter() { } -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - (new C()).setter = null; -} +// 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 It is a compile-time error if a setter's formal parameter list +/// does not consist of exactly one required formal parameter p. +/// @description Checks that a compile-time error is produced if a setter's +/// formal parameter list is empty. +/// @author iefremov + + +class C { + void set setter() { } +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + (new C()).setter = null; +} diff --git a/Language/Classes/Setters/parameter_t04.dart b/Language/Classes/Setters/parameter_t04.dart index 054936925d..5e3f0a199d 100644 --- a/Language/Classes/Setters/parameter_t04.dart +++ b/Language/Classes/Setters/parameter_t04.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if a setter's formal parameter list -/// does not consist of exactly one required formal parameter p. -/// @description Checks that a compile-time error is produced if a setter's -/// formal parameter list contains a single optional parameter with a default -/// value. -/// @author iefremov - - -class C { - void set setter([var x = null]) { } -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - (new C()).setter = null; -} +// 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 It is a compile-time error if a setter's formal parameter list +/// does not consist of exactly one required formal parameter p. +/// @description Checks that a compile-time error is produced if a setter's +/// formal parameter list contains a single optional parameter with a default +/// value. +/// @author iefremov + + +class C { + void set setter([var x = null]) { } +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + (new C()).setter = null; +} diff --git a/Language/Classes/Setters/parameter_t05.dart b/Language/Classes/Setters/parameter_t05.dart index 988a9eadc8..effb800c9a 100644 --- a/Language/Classes/Setters/parameter_t05.dart +++ b/Language/Classes/Setters/parameter_t05.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if a setter's formal parameter list -/// does not consist of exactly one required formal parameter p. -/// @description Checks that a compile-time error is produced if a static -/// setter's formal parameter list contains two required parameters. -/// @author vasya - - -class C { - static void set setter(v1, v2) {throw new C();} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.setter = null; -} +// 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 It is a compile-time error if a setter's formal parameter list +/// does not consist of exactly one required formal parameter p. +/// @description Checks that a compile-time error is produced if a static +/// setter's formal parameter list contains two required parameters. +/// @author vasya + + +class C { + static void set setter(v1, v2) {throw new C();} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.setter = null; +} diff --git a/Language/Classes/Setters/parameter_t06.dart b/Language/Classes/Setters/parameter_t06.dart index fce209e60a..a29358333e 100644 --- a/Language/Classes/Setters/parameter_t06.dart +++ b/Language/Classes/Setters/parameter_t06.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if a setter's formal parameter list -/// does not consist of exactly one required formal parameter p. -/// @description Checks that a compile-time error is produced if a static -/// setter's formal parameter list consists of a single optional parameter. -/// @author vasya - - -class C { - static void set setter([value]) { } -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.setter = null; -} +// 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 It is a compile-time error if a setter's formal parameter list +/// does not consist of exactly one required formal parameter p. +/// @description Checks that a compile-time error is produced if a static +/// setter's formal parameter list consists of a single optional parameter. +/// @author vasya + + +class C { + static void set setter([value]) { } +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.setter = null; +} diff --git a/Language/Classes/Setters/parameter_t07.dart b/Language/Classes/Setters/parameter_t07.dart index 83d0765a2a..f75eb8ff24 100644 --- a/Language/Classes/Setters/parameter_t07.dart +++ b/Language/Classes/Setters/parameter_t07.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if a setter's formal parameter list -/// does not consist of exactly one required formal parameter p. -/// @description Checks that a compile-time error is produced if a static -/// setter's formal parameter list is empty. -/// @author iefremov - - -class C { - static void set setter() { } -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.setter = null; -} +// 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 It is a compile-time error if a setter's formal parameter list +/// does not consist of exactly one required formal parameter p. +/// @description Checks that a compile-time error is produced if a static +/// setter's formal parameter list is empty. +/// @author iefremov + + +class C { + static void set setter() { } +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.setter = null; +} diff --git a/Language/Classes/Setters/parameter_t08.dart b/Language/Classes/Setters/parameter_t08.dart index 850db710d2..94e5bb98a4 100644 --- a/Language/Classes/Setters/parameter_t08.dart +++ b/Language/Classes/Setters/parameter_t08.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if a setter's formal parameter list -/// does not consist of exactly one required formal parameter p. -/// @description Checks that a compile-time error is produced if a static -/// setter's formal parameter list contains a single optional parameter with a -/// default value. -/// @author iefremov - - -class C { - static void set setter([var x = null]) { } -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.setter = null; -} +// 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 It is a compile-time error if a setter's formal parameter list +/// does not consist of exactly one required formal parameter p. +/// @description Checks that a compile-time error is produced if a static +/// setter's formal parameter list contains a single optional parameter with a +/// default value. +/// @author iefremov + + +class C { + static void set setter([var x = null]) { } +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.setter = null; +} diff --git a/Language/Classes/Setters/syntax_t03.dart b/Language/Classes/Setters/syntax_t03.dart index 2ce2f40ea0..7719d11594 100644 --- a/Language/Classes/Setters/syntax_t03.dart +++ b/Language/Classes/Setters/syntax_t03.dart @@ -1,23 +1,23 @@ -// 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 -/// setterSignature: -/// returnType? set identifier formalParameterList -/// ; -/// @description Checks that it is a compile-time error if the setter parameter -/// list is missing. -/// @author iefremov - - -class C { - set setter {}; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 +/// setterSignature: +/// returnType? set identifier formalParameterList +/// ; +/// @description Checks that it is a compile-time error if the setter parameter +/// list is missing. +/// @author iefremov + + +class C { + set setter {}; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/Static_Methods/declaration_t01.dart b/Language/Classes/Static_Methods/declaration_t01.dart index 3cb9534980..fc24e9adb8 100644 --- a/Language/Classes/Static_Methods/declaration_t01.dart +++ b/Language/Classes/Static_Methods/declaration_t01.dart @@ -1,24 +1,24 @@ -// 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 Static methods are functions, other than getters or setters, -/// whose declarations are immediately contained within a class declaration -/// and that are declared static. -/// The static methods of a class C are those static methods declared by C. -/// @description Checks that static methods cannot access instance fields. -/// @author vasya - - -class C { - static foo() { return bar; } -// ^ -// [analyzer] unspecified -// [cfe] unspecified - - var bar; -} - -main() { - C.foo(); -} +// 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 Static methods are functions, other than getters or setters, +/// whose declarations are immediately contained within a class declaration +/// and that are declared static. +/// The static methods of a class C are those static methods declared by C. +/// @description Checks that static methods cannot access instance fields. +/// @author vasya + + +class C { + static foo() { return bar; } +// ^ +// [analyzer] unspecified +// [cfe] unspecified + + var bar; +} + +main() { + C.foo(); +} diff --git a/Language/Classes/Superclasses/superclass_of_itself_t01.dart b/Language/Classes/Superclasses/superclass_of_itself_t01.dart index 6bb3669de4..8f85507bff 100644 --- a/Language/Classes/Superclasses/superclass_of_itself_t01.dart +++ b/Language/Classes/Superclasses/superclass_of_itself_t01.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if a class C is a superclass of itself -/// -/// @description Checks that it is a compile-time error if a class references -/// itself in its extends clause. -/// @author pagolubev - -class A extends A {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 It is a compile-time error if a class C is a superclass of itself +/// +/// @description Checks that it is a compile-time error if a class references +/// itself in its extends clause. +/// @author pagolubev + +class A extends A {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/Superclasses/superclass_of_itself_t02.dart b/Language/Classes/Superclasses/superclass_of_itself_t02.dart index 7442113e26..004bca769b 100644 --- a/Language/Classes/Superclasses/superclass_of_itself_t02.dart +++ b/Language/Classes/Superclasses/superclass_of_itself_t02.dart @@ -1,30 +1,30 @@ -// 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 It is a compile-time error if a class C is a superclass of itself -/// -/// @description Checks that it is a compile-time error if a class attempts to -/// extend itself indirectly, by transition. -/// @author msyabro - -class A extends D {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -class B extends A {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -class C extends B {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -class D extends C {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 It is a compile-time error if a class C is a superclass of itself +/// +/// @description Checks that it is a compile-time error if a class attempts to +/// extend itself indirectly, by transition. +/// @author msyabro + +class A extends D {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +class B extends A {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +class C extends B {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +class D extends C {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/Superclasses/wrong_superclass_t01.dart b/Language/Classes/Superclasses/wrong_superclass_t01.dart index 4999317deb..9885a5b8cf 100644 --- a/Language/Classes/Superclasses/wrong_superclass_t01.dart +++ b/Language/Classes/Superclasses/wrong_superclass_t01.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if the type in the extends clause of a -/// class C is a type variable, a type alias that does not denote a class, an -/// enumerated type, a deferred type, type dynamic, or type FutureOr for any -/// T. -/// -/// @description Checks that it is a compile-time error if a type expression in -/// a class's `extends` clause denotes an unavailable type. -/// @author pagolubev - -class A extends Unavailable {} -// ^^^^^^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 It is a compile-time error if the type in the extends clause of a +/// class C is a type variable, a type alias that does not denote a class, an +/// enumerated type, a deferred type, type dynamic, or type FutureOr for any +/// T. +/// +/// @description Checks that it is a compile-time error if a type expression in +/// a class's `extends` clause denotes an unavailable type. +/// @author pagolubev + +class A extends Unavailable {} +// ^^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/Superclasses/wrong_superclass_t02.dart b/Language/Classes/Superclasses/wrong_superclass_t02.dart index 67307926c1..568f7aa617 100644 --- a/Language/Classes/Superclasses/wrong_superclass_t02.dart +++ b/Language/Classes/Superclasses/wrong_superclass_t02.dart @@ -1,39 +1,39 @@ -// 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 It is a compile-time error if the type in the extends clause of a -/// class C is a type variable, a type alias that does not denote a class, an -/// enumerated type, a deferred type, type dynamic, or type FutureOr for any -/// T. -/// -/// @description Checks that it is a compile-time error if a type expression in -/// a class's `extends` clause denotes a type alias that does not denote a class -/// @author rodionov - -enum E {e1, e2} - -typedef EAlias = E; -typedef void Foo(); -typedef D = dynamic; - -class A1 extends Foo {} -// ^^^ -// [analyzer] unspecified -// [cfe] unspecified - -class A2 extends EAlias {} -// ^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified - -class A3 extends D {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - A1(); - A2(); - A3(); -} +// 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 It is a compile-time error if the type in the extends clause of a +/// class C is a type variable, a type alias that does not denote a class, an +/// enumerated type, a deferred type, type dynamic, or type FutureOr for any +/// T. +/// +/// @description Checks that it is a compile-time error if a type expression in +/// a class's `extends` clause denotes a type alias that does not denote a class +/// @author rodionov + +enum E {e1, e2} + +typedef EAlias = E; +typedef void Foo(); +typedef D = dynamic; + +class A1 extends Foo {} +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified + +class A2 extends EAlias {} +// ^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + +class A3 extends D {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + A1(); + A2(); + A3(); +} diff --git a/Language/Classes/Superclasses/wrong_superclass_t03.dart b/Language/Classes/Superclasses/wrong_superclass_t03.dart index 63d39247a6..8a9ae23cdf 100644 --- a/Language/Classes/Superclasses/wrong_superclass_t03.dart +++ b/Language/Classes/Superclasses/wrong_superclass_t03.dart @@ -1,23 +1,23 @@ -// 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 It is a compile-time error if the type in the extends clause of a -/// class C is a type variable, a type alias that does not denote a class, an -/// enumerated type, a deferred type, type dynamic, or type FutureOr for any -/// T. -/// -/// @description Checks that it is a compile-time error when the type expression -/// in a class's extends clause denotes a variable. -/// @author rodionov - -int Foo = 42; - -class A extends Foo {} -// ^^^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 It is a compile-time error if the type in the extends clause of a +/// class C is a type variable, a type alias that does not denote a class, an +/// enumerated type, a deferred type, type dynamic, or type FutureOr for any +/// T. +/// +/// @description Checks that it is a compile-time error when the type expression +/// in a class's extends clause denotes a variable. +/// @author rodionov + +int Foo = 42; + +class A extends Foo {} +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/Superclasses/wrong_superclass_t05.dart b/Language/Classes/Superclasses/wrong_superclass_t05.dart index 7e039cd38d..1d0599c5c3 100644 --- a/Language/Classes/Superclasses/wrong_superclass_t05.dart +++ b/Language/Classes/Superclasses/wrong_superclass_t05.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if the type in the extends clause of a -/// class C is a type variable, a type alias that does not denote a class, an -/// enumerated type, a deferred type, type dynamic, or type FutureOr for any -/// T. -/// -/// @description Checks that it is a compile-time error if a type expression -/// in a class's `extends` clause denotes a type variable. -/// @author rodionov - -class A extends T {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 It is a compile-time error if the type in the extends clause of a +/// class C is a type variable, a type alias that does not denote a class, an +/// enumerated type, a deferred type, type dynamic, or type FutureOr for any +/// T. +/// +/// @description Checks that it is a compile-time error if a type expression +/// in a class's `extends` clause denotes a type variable. +/// @author rodionov + +class A extends T {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/Superinterfaces/dynamic_type_t01.dart b/Language/Classes/Superinterfaces/dynamic_type_t01.dart index 34a5a60934..f77ce2192f 100644 --- a/Language/Classes/Superinterfaces/dynamic_type_t01.dart +++ b/Language/Classes/Superinterfaces/dynamic_type_t01.dart @@ -1,19 +1,19 @@ -// 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 It is a compile-time error if the implements clause of a class C -/// specifies type dynamic as a superinterface. -/// -/// @description Checks that it is a compile-time error if dynamic is included -/// in the type list of a class's implements clause. -/// @author pagolubev - -class A implements dynamic {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 It is a compile-time error if the implements clause of a class C +/// specifies type dynamic as a superinterface. +/// +/// @description Checks that it is a compile-time error if dynamic is included +/// in the type list of a class's implements clause. +/// @author pagolubev + +class A implements dynamic {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/Superinterfaces/dynamic_type_t02.dart b/Language/Classes/Superinterfaces/dynamic_type_t02.dart index 7d9194f273..65c8e8215b 100644 --- a/Language/Classes/Superinterfaces/dynamic_type_t02.dart +++ b/Language/Classes/Superinterfaces/dynamic_type_t02.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if the implements clause of a class C -/// specifies type dynamic as a superinterface. -/// -/// @description Checks that it is a compile-time error if dynamic is included -/// in the type list of a class's implements clause. -/// @author rodionov - -abstract class I {} -abstract class J {} - -class A implements I, dynamic, J {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 It is a compile-time error if the implements clause of a class C +/// specifies type dynamic as a superinterface. +/// +/// @description Checks that it is a compile-time error if dynamic is included +/// in the type list of a class's implements clause. +/// @author rodionov + +abstract class I {} +abstract class J {} + +class A implements I, dynamic, J {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/Superinterfaces/itself_t01.dart b/Language/Classes/Superinterfaces/itself_t01.dart index 63484dd008..81593178b0 100644 --- a/Language/Classes/Superinterfaces/itself_t01.dart +++ b/Language/Classes/Superinterfaces/itself_t01.dart @@ -1,23 +1,23 @@ -// 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 It is a compile-time error if the interface of a class C is a -/// superinterface of itself. -/// -/// @description When a class name appears as a type or interface, that name -/// denotes the interface of the class. -/// Test checks that it is a compile-time error when a class's own name is -/// included in its implements clause. -/// @author rodionov - -abstract class I {} - -class C implements I, C {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main () { - new C(); -} +// 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 It is a compile-time error if the interface of a class C is a +/// superinterface of itself. +/// +/// @description When a class name appears as a type or interface, that name +/// denotes the interface of the class. +/// Test checks that it is a compile-time error when a class's own name is +/// included in its implements clause. +/// @author rodionov + +abstract class I {} + +class C implements I, C {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main () { + new C(); +} diff --git a/Language/Classes/Superinterfaces/more_than_once_t01.dart b/Language/Classes/Superinterfaces/more_than_once_t01.dart index eed87bc667..582d135dcd 100644 --- a/Language/Classes/Superinterfaces/more_than_once_t01.dart +++ b/Language/Classes/Superinterfaces/more_than_once_t01.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if the implements clause of a class -/// C specifies a type T as a superinterface more than once. -/// -/// @description Checks that it is a compile-time error if the same type appears -/// more than once in the implements clause. -/// @author pagolubev - -abstract class I {} -abstract class J {} - -class A implements I, J, I {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 It is a compile-time error if the implements clause of a class +/// C specifies a type T as a superinterface more than once. +/// +/// @description Checks that it is a compile-time error if the same type appears +/// more than once in the implements clause. +/// @author pagolubev + +abstract class I {} +abstract class J {} + +class A implements I, J, I {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/Superinterfaces/superclass_as_superinterface_t01.dart b/Language/Classes/Superinterfaces/superclass_as_superinterface_t01.dart index b97bdf2a4e..6b70e9561f 100644 --- a/Language/Classes/Superinterfaces/superclass_as_superinterface_t01.dart +++ b/Language/Classes/Superinterfaces/superclass_as_superinterface_t01.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if the superclass of a class C is -/// specified as a superinterface of C. -/// -/// @description Test checks that it is a compile-time error when a class has -/// the same class as superclass and interface. -/// @author hlodvig - -abstract class A {} - -class C extends A implements A {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main () { - new C(); -} +// 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 It is a compile-time error if the superclass of a class C is +/// specified as a superinterface of C. +/// +/// @description Test checks that it is a compile-time error when a class has +/// the same class as superclass and interface. +/// @author hlodvig + +abstract class A {} + +class C extends A implements A {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main () { + new C(); +} diff --git a/Language/Classes/Superinterfaces/syntax_t02.dart b/Language/Classes/Superinterfaces/syntax_t02.dart index 3861834b09..0cf0c2e212 100644 --- a/Language/Classes/Superinterfaces/syntax_t02.dart +++ b/Language/Classes/Superinterfaces/syntax_t02.dart @@ -1,22 +1,22 @@ -// 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 class has a set of direct superinterfaces. This set includes -/// the interface of its superclass and the interfaces specified in the -/// implements clause of the class. -/// interfaces: -/// implements typeList -/// ; -/// @description Checks that it is a compile-time error if the implements -/// clause of a class does not list any types. -/// @author rodionov - -class A implements {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 class has a set of direct superinterfaces. This set includes +/// the interface of its superclass and the interfaces specified in the +/// implements clause of the class. +/// interfaces: +/// implements typeList +/// ; +/// @description Checks that it is a compile-time error if the implements +/// clause of a class does not list any types. +/// @author rodionov + +class A implements {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/Superinterfaces/type_variable_as_superinterface_t01.dart b/Language/Classes/Superinterfaces/type_variable_as_superinterface_t01.dart index 93bb37c340..c3e5c5c0c4 100644 --- a/Language/Classes/Superinterfaces/type_variable_as_superinterface_t01.dart +++ b/Language/Classes/Superinterfaces/type_variable_as_superinterface_t01.dart @@ -1,25 +1,25 @@ -// 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 It is a compile-time error if the implements clause of a class -/// C species a type variable as a superinterface. -/// -/// @description Checks that it is a compile-time error when the type expression -/// in a class's implements clause denotes a type variable. -/// @author rodionov - -class A implements T {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -class B implements T {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - A(); - B(); -} +// 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 It is a compile-time error if the implements clause of a class +/// C species a type variable as a superinterface. +/// +/// @description Checks that it is a compile-time error when the type expression +/// in a class's implements clause denotes a type variable. +/// @author rodionov + +class A implements T {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +class B implements T {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + A(); + B(); +} diff --git a/Language/Classes/Superinterfaces/wrong_type_t01.dart b/Language/Classes/Superinterfaces/wrong_type_t01.dart index 1071650b28..2021e06796 100644 --- a/Language/Classes/Superinterfaces/wrong_type_t01.dart +++ b/Language/Classes/Superinterfaces/wrong_type_t01.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if an element in the type list of the -/// implements clause of a class C is a type variable, a type alias that does -/// not denote a class, an enumerated type, a deferred type, type dynamic, or -/// type FutureOr for any T. -/// -/// @description Checks that it is a compile-time error when the type expression -/// in a class's implements clause denotes an unavailable type. -/// @author pagolubev - -class A implements Unavailable {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 It is a compile-time error if an element in the type list of the +/// implements clause of a class C is a type variable, a type alias that does +/// not denote a class, an enumerated type, a deferred type, type dynamic, or +/// type FutureOr for any T. +/// +/// @description Checks that it is a compile-time error when the type expression +/// in a class's implements clause denotes an unavailable type. +/// @author pagolubev + +class A implements Unavailable {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/Superinterfaces/wrong_type_t02.dart b/Language/Classes/Superinterfaces/wrong_type_t02.dart index 6a0fd882a4..22153dc218 100644 --- a/Language/Classes/Superinterfaces/wrong_type_t02.dart +++ b/Language/Classes/Superinterfaces/wrong_type_t02.dart @@ -1,36 +1,36 @@ -// 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 It is a compile-time error if an element in the type list of the -/// implements clause of a class C is a type variable, a type alias that does -/// not denote a class, an enumerated type, a deferred type, type dynamic, or -/// type FutureOr for any T. -/// -/// @description Checks that it is a compile-time error when the type expression -/// in a class's implements clause denotes a function type. -/// @author rodionov - -typedef void Foo(); -typedef int Baz(T t, {String s}); - -class A implements Foo {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -class B implements Baz {} -// ^^^ -// [analyzer] unspecified -// [cfe] unspecified - -class C implements Baz {} -// ^^^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - A(); - B(); - C(); -} +// 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 It is a compile-time error if an element in the type list of the +/// implements clause of a class C is a type variable, a type alias that does +/// not denote a class, an enumerated type, a deferred type, type dynamic, or +/// type FutureOr for any T. +/// +/// @description Checks that it is a compile-time error when the type expression +/// in a class's implements clause denotes a function type. +/// @author rodionov + +typedef void Foo(); +typedef int Baz(T t, {String s}); + +class A implements Foo {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +class B implements Baz {} +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified + +class C implements Baz {} +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + A(); + B(); + C(); +} diff --git a/Language/Classes/Superinterfaces/wrong_type_t03.dart b/Language/Classes/Superinterfaces/wrong_type_t03.dart index 6695822732..94279375e4 100644 --- a/Language/Classes/Superinterfaces/wrong_type_t03.dart +++ b/Language/Classes/Superinterfaces/wrong_type_t03.dart @@ -1,23 +1,23 @@ -// 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 It is a compile-time error if an element in the type list of the -/// implements clause of a class C is a type variable, a type alias that does -/// not denote a class, an enumerated type, a deferred type, type dynamic, or -/// type FutureOr for any T. -/// -/// @description Checks that it is a compile-time error when the type expression -/// in a class's implements clause denotes a variable name. -/// @author rodionov - -int foo = 42; - -class A implements foo {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 It is a compile-time error if an element in the type list of the +/// implements clause of a class C is a type variable, a type alias that does +/// not denote a class, an enumerated type, a deferred type, type dynamic, or +/// type FutureOr for any T. +/// +/// @description Checks that it is a compile-time error when the type expression +/// in a class's implements clause denotes a variable name. +/// @author rodionov + +int foo = 42; + +class A implements foo {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/declarations_t02.dart b/Language/Classes/declarations_t02.dart index b19d0ebf89..e96728c600 100644 --- a/Language/Classes/declarations_t02.dart +++ b/Language/Classes/declarations_t02.dart @@ -1,51 +1,51 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error if a constant -/// constructor declaration includes a body. -/// @author msyabro - - -class A { - const A() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - const A(); -// ^ -// [cfe] unspecified -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error if a constant +/// constructor declaration includes a body. +/// @author msyabro + + +class A { + const A() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + const A(); +// ^ +// [cfe] unspecified +} diff --git a/Language/Classes/declarations_t03.dart b/Language/Classes/declarations_t03.dart index 2f193fe491..c376c3df20 100644 --- a/Language/Classes/declarations_t03.dart +++ b/Language/Classes/declarations_t03.dart @@ -1,52 +1,52 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error if a redirecting -/// constant constructor declaration includes a body. -/// @author msyabro - - -class A { - const A(): this.anotherConstructor() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - A.anotherConstructor() {} -} - -main() { - const A(); -// ^ -// [cfe] unspecified -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error if a redirecting +/// constant constructor declaration includes a body. +/// @author msyabro + + +class A { + const A(): this.anotherConstructor() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + A.anotherConstructor() {} +} + +main() { + const A(); +// ^ +// [cfe] unspecified +} diff --git a/Language/Classes/declarations_t04.dart b/Language/Classes/declarations_t04.dart index fd32fea9fe..633b703acd 100644 --- a/Language/Classes/declarations_t04.dart +++ b/Language/Classes/declarations_t04.dart @@ -1,52 +1,52 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error if a constant -/// constructor declaration with initializers includes a body. -/// @author msyabro - - -class A { - const A(): x = 1 {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - final x; -} - -main() { - const A(); -// ^ -// [cfe] unspecified -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error if a constant +/// constructor declaration with initializers includes a body. +/// @author msyabro + + +class A { + const A(): x = 1 {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + final x; +} + +main() { + const A(); +// ^ +// [cfe] unspecified +} diff --git a/Language/Classes/declarations_t06.dart b/Language/Classes/declarations_t06.dart index e3bd03a5db..d8dba7bc20 100644 --- a/Language/Classes/declarations_t06.dart +++ b/Language/Classes/declarations_t06.dart @@ -1,50 +1,50 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error if a redirecting -/// constructor declaration includes a body. -/// @author msyabro - - -class A { - A(): this.B() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - A.B() {} -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error if a redirecting +/// constructor declaration includes a body. +/// @author msyabro + + +class A { + A(): this.B() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + A.B() {} +} + +main() { + new A(); +} diff --git a/Language/Classes/declarations_t08.dart b/Language/Classes/declarations_t08.dart index 35a89a53bc..93d7ac56fa 100644 --- a/Language/Classes/declarations_t08.dart +++ b/Language/Classes/declarations_t08.dart @@ -1,50 +1,50 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error if a redirecting named -/// constructor declaration includes a body. -/// @author msyabro - - -class A { - A.B(): this.C() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - A.C() {} -} - -main() { - new A.B(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error if a redirecting named +/// constructor declaration includes a body. +/// @author msyabro + + +class A { + A.B(): this.C() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + A.C() {} +} + +main() { + new A.B(); +} diff --git a/Language/Classes/declarations_t12.dart b/Language/Classes/declarations_t12.dart index bd6333bfb9..efe93d4af4 100644 --- a/Language/Classes/declarations_t12.dart +++ b/Language/Classes/declarations_t12.dart @@ -1,49 +1,49 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error if a static initialized -/// variable declaration does not end with a semicolon. -/// @author msyabro - - -class A { - static int v -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - A.v; -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error if a static initialized +/// variable declaration does not end with a semicolon. +/// @author msyabro + + +class A { + static int v +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + A.v; +} diff --git a/Language/Classes/declarations_t13.dart b/Language/Classes/declarations_t13.dart index 2f437364bf..d65a7f4974 100644 --- a/Language/Classes/declarations_t13.dart +++ b/Language/Classes/declarations_t13.dart @@ -1,53 +1,53 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error if a constant -/// constructor declaration does not end with a semicolon. -/// @author msyabro - - -class A { - const A() -//^ -// [cfe] unspecified -} -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - const A(); -// ^ -// [cfe] unspecified -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error if a constant +/// constructor declaration does not end with a semicolon. +/// @author msyabro + + +class A { + const A() +//^ +// [cfe] unspecified +} +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + const A(); +// ^ +// [cfe] unspecified +} diff --git a/Language/Classes/declarations_t14.dart b/Language/Classes/declarations_t14.dart index 01c37fa14b..f42704ea94 100644 --- a/Language/Classes/declarations_t14.dart +++ b/Language/Classes/declarations_t14.dart @@ -1,55 +1,55 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error if a redirecting -/// constant constructor declaration does not end with a semicolon. -/// @author msyabro - - -class A { - const A(): this.A() -// ^ -// [analyzer] unspecified -// [cfe] unspecified - A.A() {} -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - const A(); -// ^ -// [cfe] unspecified -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error if a redirecting +/// constant constructor declaration does not end with a semicolon. +/// @author msyabro + + +class A { + const A(): this.A() +// ^ +// [analyzer] unspecified +// [cfe] unspecified + A.A() {} +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + const A(); +// ^ +// [cfe] unspecified +} diff --git a/Language/Classes/declarations_t15.dart b/Language/Classes/declarations_t15.dart index 0ab909f027..78b7952585 100644 --- a/Language/Classes/declarations_t15.dart +++ b/Language/Classes/declarations_t15.dart @@ -1,54 +1,54 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error if a constant -/// constructor declaration with initializers does not end with a semicolon. -/// @author msyabro - - -class A { - const A(): x = 1 -//^ -// [cfe] unspecified - final x; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - const A(); -// ^ -// [cfe] unspecified -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error if a constant +/// constructor declaration with initializers does not end with a semicolon. +/// @author msyabro + + +class A { + const A(): x = 1 +//^ +// [cfe] unspecified + final x; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + const A(); +// ^ +// [cfe] unspecified +} diff --git a/Language/Classes/declarations_t16.dart b/Language/Classes/declarations_t16.dart index 5d977380af..c1a8e22a70 100644 --- a/Language/Classes/declarations_t16.dart +++ b/Language/Classes/declarations_t16.dart @@ -1,49 +1,49 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error if a constructor -/// declaration without a body does not end with a semicolon. -/// @author msyabro - - -class A { - A() -} -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error if a constructor +/// declaration without a body does not end with a semicolon. +/// @author msyabro + + +class A { + A() +} +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/declarations_t17.dart b/Language/Classes/declarations_t17.dart index 3e698a7825..52ec3efd2a 100644 --- a/Language/Classes/declarations_t17.dart +++ b/Language/Classes/declarations_t17.dart @@ -1,50 +1,50 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error if a redirecting -/// constructor declaration does not end with a semicolon. -/// @author msyabro - - -class A { - A(): this.B() - A.B() {} -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error if a redirecting +/// constructor declaration does not end with a semicolon. +/// @author msyabro + + +class A { + A(): this.B() + A.B() {} +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/declarations_t18.dart b/Language/Classes/declarations_t18.dart index 33d855bd08..daefbd23f6 100644 --- a/Language/Classes/declarations_t18.dart +++ b/Language/Classes/declarations_t18.dart @@ -1,50 +1,50 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error if a constructor -/// declaration with initializers does not end with a semicolon. -/// @author msyabro - - -class A { - A(): x = 1 - var x; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error if a constructor +/// declaration with initializers does not end with a semicolon. +/// @author msyabro + + +class A { + A(): x = 1 + var x; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/declarations_t19.dart b/Language/Classes/declarations_t19.dart index 290dd4d4c8..7c999c7a82 100644 --- a/Language/Classes/declarations_t19.dart +++ b/Language/Classes/declarations_t19.dart @@ -1,50 +1,50 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error if a named redirecting -/// constructor declaration does not end with a semicolon. -/// @author msyabro - - -class A { - A.B(): this.C() - A.C() {} -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A.B(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error if a named redirecting +/// constructor declaration does not end with a semicolon. +/// @author msyabro + + +class A { + A.B(): this.C() + A.C() {} +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A.B(); +} diff --git a/Language/Classes/declarations_t20.dart b/Language/Classes/declarations_t20.dart index fc65ed83e8..041bda14f3 100644 --- a/Language/Classes/declarations_t20.dart +++ b/Language/Classes/declarations_t20.dart @@ -1,50 +1,50 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error if an abstract getter -/// declaration does not end with a semicolon. -/// @author msyabro - - -class A { - get val - var _val; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error if an abstract getter +/// declaration does not end with a semicolon. +/// @author msyabro + + +class A { + get val + var _val; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/declarations_t21.dart b/Language/Classes/declarations_t21.dart index b93e5e4d75..4048f0ceeb 100644 --- a/Language/Classes/declarations_t21.dart +++ b/Language/Classes/declarations_t21.dart @@ -1,50 +1,50 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error if an abstract setter -/// declaration does not end with a semicolon. -/// @author msyabro - - -class A { - set val(var v) - var _val; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error if an abstract setter +/// declaration does not end with a semicolon. +/// @author msyabro + + +class A { + set val(var v) + var _val; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/declarations_t22.dart b/Language/Classes/declarations_t22.dart index af100f9b46..a6d09b0cd5 100644 --- a/Language/Classes/declarations_t22.dart +++ b/Language/Classes/declarations_t22.dart @@ -1,52 +1,52 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error if an abstract operator -/// declaration does not end with a semicolon. -/// @author msyabro - - -class A { - operator ==(A other) -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error if an abstract operator +/// declaration does not end with a semicolon. +/// @author msyabro + + +class A { + operator ==(A other) +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/declarations_t23.dart b/Language/Classes/declarations_t23.dart index 9328e97c70..7eb96cbaa9 100644 --- a/Language/Classes/declarations_t23.dart +++ b/Language/Classes/declarations_t23.dart @@ -1,49 +1,49 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error if an abstract method -/// declaration does not end with a semicolon. -/// @author msyabro - - -class A { - f() -} -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error if an abstract method +/// declaration does not end with a semicolon. +/// @author msyabro + + +class A { + f() +} +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/declarations_t24.dart b/Language/Classes/declarations_t24.dart index 8828c89bcd..b5f7c6f173 100644 --- a/Language/Classes/declarations_t24.dart +++ b/Language/Classes/declarations_t24.dart @@ -1,49 +1,49 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error if a static final -/// declaration list does not end with a semicolon. -/// @author msyabro - - -class A { - static final v = null, vv = 1 -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error if a static final +/// declaration list does not end with a semicolon. +/// @author msyabro + + +class A { + static final v = null, vv = 1 +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/declarations_t25.dart b/Language/Classes/declarations_t25.dart index b443a0a702..61a56861d5 100644 --- a/Language/Classes/declarations_t25.dart +++ b/Language/Classes/declarations_t25.dart @@ -1,49 +1,49 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error if an operator -/// signature is declared final. -/// @author kaigorodov - - -class A { - final operator ==(A other) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error if an operator +/// signature is declared final. +/// @author kaigorodov + + +class A { + final operator ==(A other) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/declarations_t29.dart b/Language/Classes/declarations_t29.dart index 6fedf58b61..b2cb22cc1e 100644 --- a/Language/Classes/declarations_t29.dart +++ b/Language/Classes/declarations_t29.dart @@ -1,49 +1,49 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error when constructor is -/// declared abstract. -/// @author rodionov - - -class C { - abstract C(); -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error when constructor is +/// declared abstract. +/// @author rodionov + + +class C { + abstract C(); +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/declarations_t30.dart b/Language/Classes/declarations_t30.dart index d865d4e12e..d4c6b9cf1f 100644 --- a/Language/Classes/declarations_t30.dart +++ b/Language/Classes/declarations_t30.dart @@ -1,50 +1,50 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error when a named -/// constructor is declared abstract. -/// @author kaigorodov - - -class C { - abstract C.id(); -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - - -main() { - new C.id(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error when a named +/// constructor is declared abstract. +/// @author kaigorodov + + +class C { + abstract C.id(); +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + + +main() { + new C.id(); +} diff --git a/Language/Classes/declarations_t31.dart b/Language/Classes/declarations_t31.dart index b5352da0f9..c1e0b7d731 100644 --- a/Language/Classes/declarations_t31.dart +++ b/Language/Classes/declarations_t31.dart @@ -1,50 +1,50 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error when a constant -/// constructor is declared abstract. -/// @author rodionov - - -class C { - abstract const C(); -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - - -main() { - new C(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error when a constant +/// constructor is declared abstract. +/// @author rodionov + + +class C { + abstract const C(); +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + + +main() { + new C(); +} diff --git a/Language/Classes/declarations_t32.dart b/Language/Classes/declarations_t32.dart index f5fc21fce6..d50c23d08e 100644 --- a/Language/Classes/declarations_t32.dart +++ b/Language/Classes/declarations_t32.dart @@ -1,49 +1,49 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error when a constant named -/// constructor is declared abstract. -/// @author rodionov - - -class C { - const abstract C.id(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C.id(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error when a constant named +/// constructor is declared abstract. +/// @author rodionov + + +class C { + const abstract C.id(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C.id(); +} diff --git a/Language/Classes/declarations_t33.dart b/Language/Classes/declarations_t33.dart index 8df3f55325..7d1968b5ff 100644 --- a/Language/Classes/declarations_t33.dart +++ b/Language/Classes/declarations_t33.dart @@ -1,49 +1,49 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// . . . -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// staticFinalDeclarationList: -/// staticFinalDeclaration (', ' staticFinalDeclaration)* -/// ; -/// staticFinalDeclaration: -/// identifier '=' expression -/// ; -/// @description Checks that it is a compile-time error when constructor is -/// declared static. -/// @author rodionov - - -class C { - static C() {} -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// . . . +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// staticFinalDeclarationList: +/// staticFinalDeclaration (', ' staticFinalDeclaration)* +/// ; +/// staticFinalDeclaration: +/// identifier '=' expression +/// ; +/// @description Checks that it is a compile-time error when constructor is +/// declared static. +/// @author rodionov + + +class C { + static C() {} +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/definition_t02.dart b/Language/Classes/definition_t02.dart index 3908e026fa..2427c630d3 100644 --- a/Language/Classes/definition_t02.dart +++ b/Language/Classes/definition_t02.dart @@ -1,25 +1,25 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// @description Checks that it is a compile-time error if a closing curly -/// bracket is missed in a class type definition. Class body is not empty. -/// @author msyabro - - -class A { -// ^ -// [cfe] unspecified - var someVariable; - void someMethod() {} - -main() { - new A(); -} -// [error line 25, column 0] +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// @description Checks that it is a compile-time error if a closing curly +/// bracket is missed in a class type definition. Class body is not empty. +/// @author msyabro + + +class A { +// ^ +// [cfe] unspecified + var someVariable; + void someMethod() {} + +main() { + new A(); +} +// [error line 25, column 0] // [analyzer] unspecified \ No newline at end of file diff --git a/Language/Classes/definition_t03.dart b/Language/Classes/definition_t03.dart index d347cb0374..6ab141fa57 100644 --- a/Language/Classes/definition_t03.dart +++ b/Language/Classes/definition_t03.dart @@ -1,23 +1,23 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// @description Checks that it is a compile-time error if a closing curly -/// bracket is missed in a class type definition. Class body is empty. -/// @author msyabro - - -class A { -// ^ -// [cfe] unspecified - -main() { - new A(); -} -// [error line 23, column 0] +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// @description Checks that it is a compile-time error if a closing curly +/// bracket is missed in a class type definition. Class body is empty. +/// @author msyabro + + +class A { +// ^ +// [cfe] unspecified + +main() { + new A(); +} +// [error line 23, column 0] // [analyzer] unspecified \ No newline at end of file diff --git a/Language/Classes/definition_t04.dart b/Language/Classes/definition_t04.dart index b942bf96d0..e74e916ac0 100644 --- a/Language/Classes/definition_t04.dart +++ b/Language/Classes/definition_t04.dart @@ -1,28 +1,28 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// @description Checks that it is a compile-time error if a opening curly -/// bracket is missed in a class type definition. Class body is not empty. -/// @author msyabro - - -class A -// ^ -// [analyzer] unspecified -// [cfe] unspecified - var someVariable; - void someMethod() {} -} -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// @description Checks that it is a compile-time error if a opening curly +/// bracket is missed in a class type definition. Class body is not empty. +/// @author msyabro + + +class A +// ^ +// [analyzer] unspecified +// [cfe] unspecified + var someVariable; + void someMethod() {} +} +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/definition_t05.dart b/Language/Classes/definition_t05.dart index 0f4addcf86..c33dbd9f45 100644 --- a/Language/Classes/definition_t05.dart +++ b/Language/Classes/definition_t05.dart @@ -1,22 +1,22 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// @description Checks that it is a compile-time error if a opening curly -/// bracket is missed in a class type definition. Class body is empty. -/// @author msyabro - - -class A } -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// @description Checks that it is a compile-time error if a opening curly +/// bracket is missed in a class type definition. Class body is empty. +/// @author msyabro + + +class A } +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/definition_t06.dart b/Language/Classes/definition_t06.dart index b30cb16aca..c5c5d49f8c 100644 --- a/Language/Classes/definition_t06.dart +++ b/Language/Classes/definition_t06.dart @@ -1,23 +1,23 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// @description Checks that it is a compile-time error if both opening and -/// closing curly brackets are missed in a class type definition. Class body -/// is empty. -/// @author msyabro - - -class A -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// @description Checks that it is a compile-time error if both opening and +/// closing curly brackets are missed in a class type definition. Class body +/// is empty. +/// @author msyabro + + +class A +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/definition_t07.dart b/Language/Classes/definition_t07.dart index e180b27db4..1b880916bd 100644 --- a/Language/Classes/definition_t07.dart +++ b/Language/Classes/definition_t07.dart @@ -1,23 +1,23 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// @description Checks that it is a compile-time error if both opening and -/// closing curly brackets are missed in a class type definition with type -/// parameters. Class body is empty. -/// @author msyabro - - -class A -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// @description Checks that it is a compile-time error if both opening and +/// closing curly brackets are missed in a class type definition with type +/// parameters. Class body is empty. +/// @author msyabro + + +class A +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/definition_t08.dart b/Language/Classes/definition_t08.dart index 5eb47cb847..ef369a0016 100644 --- a/Language/Classes/definition_t08.dart +++ b/Language/Classes/definition_t08.dart @@ -1,24 +1,24 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// @description Checks that it is a compile-time error if both opening and -/// closing curly brackets are missed in a class type definition with extends -/// clause. Class body is empty. -/// @author msyabro - - -class S {} -class A extends S -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// @description Checks that it is a compile-time error if both opening and +/// closing curly brackets are missed in a class type definition with extends +/// clause. Class body is empty. +/// @author msyabro + + +class S {} +class A extends S +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/definition_t09.dart b/Language/Classes/definition_t09.dart index 2cb05e16dd..75cc1fcd15 100644 --- a/Language/Classes/definition_t09.dart +++ b/Language/Classes/definition_t09.dart @@ -1,24 +1,24 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// @description Checks that it is a compile-time error if both opening and -/// closing curly brackets are missed in a class type definition with an -/// implements clause. Class body is empty. -/// @author msyabro - - -abstract class I {} -class A implements I -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// @description Checks that it is a compile-time error if both opening and +/// closing curly brackets are missed in a class type definition with an +/// implements clause. Class body is empty. +/// @author msyabro + + +abstract class I {} +class A implements I +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/definition_t11.dart b/Language/Classes/definition_t11.dart index 29719b403e..cdfd204435 100644 --- a/Language/Classes/definition_t11.dart +++ b/Language/Classes/definition_t11.dart @@ -1,23 +1,23 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// @description Checks that it is a compile-time error if a class type -/// definition ends with a semicolon. -/// Class body is empty. -/// @author msyabro - - -class A {}; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// @description Checks that it is a compile-time error if a class type +/// definition ends with a semicolon. +/// Class body is empty. +/// @author msyabro + + +class A {}; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/definition_t12.dart b/Language/Classes/definition_t12.dart index 4fd56967a3..9df0fd8b06 100644 --- a/Language/Classes/definition_t12.dart +++ b/Language/Classes/definition_t12.dart @@ -1,28 +1,28 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// @description Checks that it is a compile-time error if square brackets are -/// used instead of the curly ones in a class type definition. Class body is -/// not empty. -/// @author msyabro - - -class A [ -// ^ -// [analyzer] unspecified -// [cfe] unspecified - var someMember; -] -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// @description Checks that it is a compile-time error if square brackets are +/// used instead of the curly ones in a class type definition. Class body is +/// not empty. +/// @author msyabro + + +class A [ +// ^ +// [analyzer] unspecified +// [cfe] unspecified + var someMember; +] +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/definition_t13.dart b/Language/Classes/definition_t13.dart index a74a1bea69..18611435c1 100644 --- a/Language/Classes/definition_t13.dart +++ b/Language/Classes/definition_t13.dart @@ -1,23 +1,23 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// @description Checks that it is a compile-time error if a class type -/// definition uses square brackets instead of the curly ones. Class body is -/// empty. -/// @author rodionov - - -class A [] -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// @description Checks that it is a compile-time error if a class type +/// definition uses square brackets instead of the curly ones. Class body is +/// empty. +/// @author rodionov + + +class A [] +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/definition_t14.dart b/Language/Classes/definition_t14.dart index 5a79600e6c..8b3efc98cb 100644 --- a/Language/Classes/definition_t14.dart +++ b/Language/Classes/definition_t14.dart @@ -1,30 +1,30 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// @description Checks that it is a compile-time error if a class type -/// definition uses round brackets instead of the curly ones. Class body is -/// not empty. -/// @author msyabro - -class A ( -// ^ -// [analyzer] unspecified -// [cfe] unspecified - var someMember; -//^^^ -// [analyzer] unspecified -// [cfe] unspecified -) -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// @description Checks that it is a compile-time error if a class type +/// definition uses round brackets instead of the curly ones. Class body is +/// not empty. +/// @author msyabro + +class A ( +// ^ +// [analyzer] unspecified +// [cfe] unspecified + var someMember; +//^^^ +// [analyzer] unspecified +// [cfe] unspecified +) +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/definition_t15.dart b/Language/Classes/definition_t15.dart index df02e0f5d5..57f30a15ad 100644 --- a/Language/Classes/definition_t15.dart +++ b/Language/Classes/definition_t15.dart @@ -1,22 +1,22 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// @description Checks that it is a compile-time error if a class type -/// definition uses round brackets instead of the curly ones. Class body is -/// empty. -/// @author rodionov - -class A () -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// @description Checks that it is a compile-time error if a class type +/// definition uses round brackets instead of the curly ones. Class body is +/// empty. +/// @author rodionov + +class A () +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { + new A(); +} diff --git a/Language/Classes/definition_t16.dart b/Language/Classes/definition_t16.dart index 099854767c..7a379727cf 100644 --- a/Language/Classes/definition_t16.dart +++ b/Language/Classes/definition_t16.dart @@ -1,31 +1,31 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// @description Checks that it is a compile-time error if a class type -/// definition uses different styles of opening and closing brackets. -/// Class body is not empty. -/// @author rodionov - - -class A ( -// ^ -// [analyzer] unspecified -// [cfe] unspecified - var someMember; -} -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} -// [error line 31, column 0] -// [analyzer] unspecified +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// @description Checks that it is a compile-time error if a class type +/// definition uses different styles of opening and closing brackets. +/// Class body is not empty. +/// @author rodionov + + +class A ( +// ^ +// [analyzer] unspecified +// [cfe] unspecified + var someMember; +} +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} +// [error line 31, column 0] +// [analyzer] unspecified // [cfe] unspecified \ No newline at end of file diff --git a/Language/Classes/definition_t17.dart b/Language/Classes/definition_t17.dart index d1d6ba0a54..380a1ccef3 100644 --- a/Language/Classes/definition_t17.dart +++ b/Language/Classes/definition_t17.dart @@ -1,25 +1,25 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// @description Checks that it is a compile-time error if both opening and -/// closing curly brackets are missed in an abstract class declaration. -/// @author msyabro - - -abstract class A -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// @description Checks that it is a compile-time error if both opening and +/// closing curly brackets are missed in an abstract class declaration. +/// @author msyabro + + +abstract class A +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Classes/definition_t18.dart b/Language/Classes/definition_t18.dart index dcbf021179..bde5b224b6 100644 --- a/Language/Classes/definition_t18.dart +++ b/Language/Classes/definition_t18.dart @@ -1,22 +1,22 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// @description Checks that it is a compile-time error if type parameters are -/// separated with semicolon in a class definition. -/// @author kaigorodov - - -class A {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// @description Checks that it is a compile-time error if type parameters are +/// separated with semicolon in a class definition. +/// @author kaigorodov + + +class A {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/definition_t19.dart b/Language/Classes/definition_t19.dart index 09cb375694..3e34605e9a 100644 --- a/Language/Classes/definition_t19.dart +++ b/Language/Classes/definition_t19.dart @@ -1,22 +1,22 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// @description Checks that it is a compile-time error if type parameters list -/// ends with an extra angle bracket in a class definition. -/// @author kaigorodov - - -class A> {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// @description Checks that it is a compile-time error if type parameters list +/// ends with an extra angle bracket in a class definition. +/// @author kaigorodov + + +class A> {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/definition_t21.dart b/Language/Classes/definition_t21.dart index d03426ee06..1a7867894b 100644 --- a/Language/Classes/definition_t21.dart +++ b/Language/Classes/definition_t21.dart @@ -1,24 +1,24 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// @description Checks that it is a compile-time error if mixin has incomplete -/// declaration in a class definition. -/// @author hlodvig - - -class A {} - -class C extends A with {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// @description Checks that it is a compile-time error if mixin has incomplete +/// declaration in a class definition. +/// @author hlodvig + + +class A {} + +class C extends A with {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/definition_t22.dart b/Language/Classes/definition_t22.dart index ccdd504da8..38770e17fe 100644 --- a/Language/Classes/definition_t22.dart +++ b/Language/Classes/definition_t22.dart @@ -1,26 +1,26 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// @description Checks that it is a compile-time error if mixin has incorrect -/// declaration in a class definition. -/// @author hlodvig - - -class A {} -class B1 {} -class B2 {} - -class C extends A with B1 B2 {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// @description Checks that it is a compile-time error if mixin has incorrect +/// declaration in a class definition. +/// @author hlodvig + + +class A {} +class B1 {} +class B2 {} + +class C extends A with B1 B2 {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Classes/member_definition_t01.dart b/Language/Classes/member_definition_t01.dart index 23417ee4b5..7b91a6578d 100644 --- a/Language/Classes/member_definition_t01.dart +++ b/Language/Classes/member_definition_t01.dart @@ -1,50 +1,50 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ‘;’ | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// @description Checks that a class can't be defined inside another class as -/// it is not among the allowed class member definitions. -/// @author msyabro - - -class A { - class B {} -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ‘;’ | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// @description Checks that a class can't be defined inside another class as +/// it is not among the allowed class member definitions. +/// @author msyabro + + +class A { + class B {} +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/member_definition_t02.dart b/Language/Classes/member_definition_t02.dart index a2112bf2ad..b82463db78 100644 --- a/Language/Classes/member_definition_t02.dart +++ b/Language/Classes/member_definition_t02.dart @@ -1,52 +1,52 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ‘;’ | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// @description Checks that a function type alias can't be declared inside -/// another class as it is not among the allowed class member definitions. -/// @author msyabro - - -class A { -// ^ -// [cfe] unspecified - typedef int f(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ‘;’ | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// @description Checks that a function type alias can't be declared inside +/// another class as it is not among the allowed class member definitions. +/// @author msyabro + + +class A { +// ^ +// [cfe] unspecified + typedef int f(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/member_definition_t04.dart b/Language/Classes/member_definition_t04.dart index 57f8c4acec..ad8571427e 100644 --- a/Language/Classes/member_definition_t04.dart +++ b/Language/Classes/member_definition_t04.dart @@ -1,50 +1,50 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ‘;’ | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// @description Checks that a block statement can't be used in place of a -/// class member definition. -/// @author msyabro - - -class A { - {} -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ‘;’ | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// @description Checks that a block statement can't be used in place of a +/// class member definition. +/// @author msyabro + + +class A { + {} +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/member_definition_t05.dart b/Language/Classes/member_definition_t05.dart index cbefed7699..a125cf5d30 100644 --- a/Language/Classes/member_definition_t05.dart +++ b/Language/Classes/member_definition_t05.dart @@ -1,50 +1,50 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ‘;’ | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// @description Checks that an expression statement can't be used in place of -/// a class member definition. -/// @author msyabro - - -class A { - 1 + 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ‘;’ | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// @description Checks that an expression statement can't be used in place of +/// a class member definition. +/// @author msyabro + + +class A { + 1 + 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/member_definition_t06.dart b/Language/Classes/member_definition_t06.dart index 5372639bac..1c4330fde4 100644 --- a/Language/Classes/member_definition_t06.dart +++ b/Language/Classes/member_definition_t06.dart @@ -1,50 +1,50 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ‘;’ | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// @description Checks that an if statement can't be used in place of a class -/// member definition. -/// @author msyabro - - -class A { - if (true) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ‘;’ | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// @description Checks that an if statement can't be used in place of a class +/// member definition. +/// @author msyabro + + +class A { + if (true) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/member_definition_t07.dart b/Language/Classes/member_definition_t07.dart index c90d1f2f7b..a937dd3ab3 100644 --- a/Language/Classes/member_definition_t07.dart +++ b/Language/Classes/member_definition_t07.dart @@ -1,50 +1,50 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ‘;’ | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// @description Checks that a for statement can't be used in place of a class -/// member definition. -/// @author msyabro - - -class A { - for ( ; ; ) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ‘;’ | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// @description Checks that a for statement can't be used in place of a class +/// member definition. +/// @author msyabro + + +class A { + for ( ; ; ) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/member_definition_t08.dart b/Language/Classes/member_definition_t08.dart index ce51cd493a..09a17393ce 100644 --- a/Language/Classes/member_definition_t08.dart +++ b/Language/Classes/member_definition_t08.dart @@ -1,50 +1,50 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ‘;’ | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// @description Checks that a foreach statement can't be used in place of a -/// class member definition. -/// @author msyabro - - -class A { - for (int i in [1, 2]) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ‘;’ | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// @description Checks that a foreach statement can't be used in place of a +/// class member definition. +/// @author msyabro + + +class A { + for (int i in [1, 2]) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/member_definition_t09.dart b/Language/Classes/member_definition_t09.dart index 3d7159cc72..41b76c738e 100644 --- a/Language/Classes/member_definition_t09.dart +++ b/Language/Classes/member_definition_t09.dart @@ -1,50 +1,50 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ‘;’ | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// @description Checks that a while statement can't be used in place of a -/// class member definition. -/// @author msyabro - - -class A { - while (true) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ‘;’ | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// @description Checks that a while statement can't be used in place of a +/// class member definition. +/// @author msyabro + + +class A { + while (true) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/member_definition_t10.dart b/Language/Classes/member_definition_t10.dart index 94ab50fadb..19b17510b9 100644 --- a/Language/Classes/member_definition_t10.dart +++ b/Language/Classes/member_definition_t10.dart @@ -1,52 +1,52 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ‘;’ | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// @description Checks that a do statement can't be used in place of a class -/// member definition. -/// @author msyabro - - -class A { -// ^ -// [analyzer] unspecified - do {} while (true); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ‘;’ | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// @description Checks that a do statement can't be used in place of a class +/// member definition. +/// @author msyabro + + +class A { +// ^ +// [analyzer] unspecified + do {} while (true); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/member_definition_t11.dart b/Language/Classes/member_definition_t11.dart index ed0694677c..38fb195f31 100644 --- a/Language/Classes/member_definition_t11.dart +++ b/Language/Classes/member_definition_t11.dart @@ -1,60 +1,60 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ‘;’ | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// @description Checks that a switch statement can't be used in place of a -/// class member definition. -/// @author msyabro - - -class A { - switch (1 + 1) { -// ^ -// [analyzer] unspecified -// [cfe] unspecified - case 1: break; -// ^ -// [analyzer] unspecified - case 2: break; -// ^ -// [analyzer] unspecified - default: ; -// ^ -// [analyzer] unspecified - } -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ‘;’ | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// @description Checks that a switch statement can't be used in place of a +/// class member definition. +/// @author msyabro + + +class A { + switch (1 + 1) { +// ^ +// [analyzer] unspecified +// [cfe] unspecified + case 1: break; +// ^ +// [analyzer] unspecified + case 2: break; +// ^ +// [analyzer] unspecified + default: ; +// ^ +// [analyzer] unspecified + } +} + +main() { + new A(); +} diff --git a/Language/Classes/member_definition_t13.dart b/Language/Classes/member_definition_t13.dart index 994ddad02d..d767e0502e 100644 --- a/Language/Classes/member_definition_t13.dart +++ b/Language/Classes/member_definition_t13.dart @@ -1,50 +1,50 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ‘;’ | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// @description Checks that a return statement can't be used in place of a -/// class member definition. -/// @author msyabro - - -class A { - return 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ‘;’ | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// @description Checks that a return statement can't be used in place of a +/// class member definition. +/// @author msyabro + + +class A { + return 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/member_definition_t14.dart b/Language/Classes/member_definition_t14.dart index f0fedfa049..20fa90801d 100644 --- a/Language/Classes/member_definition_t14.dart +++ b/Language/Classes/member_definition_t14.dart @@ -1,51 +1,51 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ‘;’ | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// @description Checks that labels can't be used in place of a class member -/// definition. -/// @author msyabro - - -class A { - label: -// ^ -// [analyzer] unspecified -// [cfe] unspecified - var x; -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ‘;’ | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// @description Checks that labels can't be used in place of a class member +/// definition. +/// @author msyabro + + +class A { + label: +// ^ +// [analyzer] unspecified +// [cfe] unspecified + var x; +} + +main() { + new A(); +} diff --git a/Language/Classes/member_definition_t15.dart b/Language/Classes/member_definition_t15.dart index 11f5b65904..87772a16a7 100644 --- a/Language/Classes/member_definition_t15.dart +++ b/Language/Classes/member_definition_t15.dart @@ -1,51 +1,51 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ‘;’ | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ;IdentifierList -/// ; -/// @description Checks that a break statement can't be used in place of a -/// class member definition. -/// @author msyabro - - -class A { - break; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ‘;’ | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ;IdentifierList +/// ; +/// @description Checks that a break statement can't be used in place of a +/// class member definition. +/// @author msyabro + + +class A { + break; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/member_definition_t16.dart b/Language/Classes/member_definition_t16.dart index c492987fdc..ed37e46958 100644 --- a/Language/Classes/member_definition_t16.dart +++ b/Language/Classes/member_definition_t16.dart @@ -1,50 +1,50 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ‘;’ | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// @description Checks that a continue statement can't be used in place of a -/// class member definition. -/// @author msyabro - - -class A { - continue; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ‘;’ | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// @description Checks that a continue statement can't be used in place of a +/// class member definition. +/// @author msyabro + + +class A { + continue; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/member_definition_t17.dart b/Language/Classes/member_definition_t17.dart index 6f29bc7382..578eba5552 100644 --- a/Language/Classes/member_definition_t17.dart +++ b/Language/Classes/member_definition_t17.dart @@ -1,50 +1,50 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ‘;’ | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// @description Checks that a throw statement can't be used in place of a -/// class member definition. -/// @author msyabro - - -class A { - throw "exception"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ‘;’ | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// @description Checks that a throw statement can't be used in place of a +/// class member definition. +/// @author msyabro + + +class A { + throw "exception"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/member_definition_t19.dart b/Language/Classes/member_definition_t19.dart index 20e9ef13ad..82d3ac0081 100644 --- a/Language/Classes/member_definition_t19.dart +++ b/Language/Classes/member_definition_t19.dart @@ -1,52 +1,52 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ‘;’ | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// @description Checks that an abstract static method can't be used in place -/// of a class member definition. -/// @author msyabro - - -class A { -// ^ -// [cfe] unspecified - static method(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ‘;’ | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// @description Checks that an abstract static method can't be used in place +/// of a class member definition. +/// @author msyabro + + +class A { +// ^ +// [cfe] unspecified + static method(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/member_definition_t21.dart b/Language/Classes/member_definition_t21.dart index fcc5b9570e..1b338e21ee 100644 --- a/Language/Classes/member_definition_t21.dart +++ b/Language/Classes/member_definition_t21.dart @@ -1,50 +1,50 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ‘;’ | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// @description Checks that a static operator can't be used in place of a -/// class member definition. -/// @author msyabro - - -class A { - static operator +(other) {} -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ‘;’ | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// @description Checks that a static operator can't be used in place of a +/// class member definition. +/// @author msyabro + + +class A { + static operator +(other) {} +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/member_definition_t22.dart b/Language/Classes/member_definition_t22.dart index f2955799a8..fd30bc100b 100644 --- a/Language/Classes/member_definition_t22.dart +++ b/Language/Classes/member_definition_t22.dart @@ -1,52 +1,52 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ‘;’ | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// @description Checks that an abstract static operator can't be used in -/// place of a class member definition. -/// @author msyabro - - -class A { -// ^ -// [cfe] unspecified - static operator +(other); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ‘;’ | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// @description Checks that an abstract static operator can't be used in +/// place of a class member definition. +/// @author msyabro + + +class A { +// ^ +// [cfe] unspecified + static operator +(other); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/member_definition_t24.dart b/Language/Classes/member_definition_t24.dart index f43a8e5815..2f4a118df2 100644 --- a/Language/Classes/member_definition_t24.dart +++ b/Language/Classes/member_definition_t24.dart @@ -1,52 +1,52 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? '‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ‘;’ | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// @description Checks that a static abstract getter can't be used in place -/// of a class member definition. -/// @author msyabro - - -class A { -// ^ -// [cfe] unspecified - static abstract get x; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? '‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ‘;’ | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// @description Checks that a static abstract getter can't be used in place +/// of a class member definition. +/// @author msyabro + + +class A { +// ^ +// [cfe] unspecified + static abstract get x; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/member_definition_t25.dart b/Language/Classes/member_definition_t25.dart index 15063dd7e1..986df863e5 100644 --- a/Language/Classes/member_definition_t25.dart +++ b/Language/Classes/member_definition_t25.dart @@ -1,52 +1,52 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ‘;’ | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// declaration: -/// constantConstructorSignature (redirection | initializers)? | -/// constructorSignature (redirection | initializers)? | -/// external constantConstructorSignature | -/// external constructorSignature | -/// (external static?)? getterSignature | -/// (external static?)? setterSignature | -/// external? operatorSignature | -/// (external static?)? functionSignature | -/// static (final | const) type? staticFinalDeclarationList | -/// final type? initializedIdentifierList | -/// static? (var | type) initializedIdentifierList -/// ; -/// @description Checks that a static abstract setter can't be used in place -/// of a class member definition. -/// @author msyabro - - -class A { -// ^ -// [cfe] unspecified - static abstract set x(v); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ‘;’ | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// declaration: +/// constantConstructorSignature (redirection | initializers)? | +/// constructorSignature (redirection | initializers)? | +/// external constantConstructorSignature | +/// external constructorSignature | +/// (external static?)? getterSignature | +/// (external static?)? setterSignature | +/// external? operatorSignature | +/// (external static?)? functionSignature | +/// static (final | const) type? staticFinalDeclarationList | +/// final type? initializedIdentifierList | +/// static? (var | type) initializedIdentifierList +/// ; +/// @description Checks that a static abstract setter can't be used in place +/// of a class member definition. +/// @author msyabro + + +class A { +// ^ +// [cfe] unspecified + static abstract set x(v); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/method_definition_t02.dart b/Language/Classes/method_definition_t02.dart index 8802bb7505..74c4caaef6 100644 --- a/Language/Classes/method_definition_t02.dart +++ b/Language/Classes/method_definition_t02.dart @@ -1,37 +1,37 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// @description Checks that it is a compile-time error if a factory constructor -/// method definition does not include a body. -/// @author msyabro - - -class A { - factory A(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// @description Checks that it is a compile-time error if a factory constructor +/// method definition does not include a body. +/// @author msyabro + + +class A { + factory A(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/method_definition_t07.dart b/Language/Classes/method_definition_t07.dart index a032ff0ce9..baf1a43c69 100644 --- a/Language/Classes/method_definition_t07.dart +++ b/Language/Classes/method_definition_t07.dart @@ -1,41 +1,41 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// @description Checks that there is a compile-time error if a static getter -/// method definition does not include a body. -/// @author msyabro - - -class A { -// ^ -// [cfe] unspecified - static get val; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - try { - new A(); - } catch (e) {} -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// @description Checks that there is a compile-time error if a static getter +/// method definition does not include a body. +/// @author msyabro + + +class A { +// ^ +// [cfe] unspecified + static get val; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + try { + new A(); + } catch (e) {} +} diff --git a/Language/Classes/method_definition_t08.dart b/Language/Classes/method_definition_t08.dart index 18d62f0ccf..9bd01c136d 100644 --- a/Language/Classes/method_definition_t08.dart +++ b/Language/Classes/method_definition_t08.dart @@ -1,40 +1,40 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// @description Checks that it is a compile-time error if a static setter -/// method definition does not include a body. -/// @author msyabro - - -class A { -// ^ -// [cfe] unspecified - static set val(var v); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - static var _val; -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// @description Checks that it is a compile-time error if a static setter +/// method definition does not include a body. +/// @author msyabro + + +class A { +// ^ +// [cfe] unspecified + static set val(var v); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + static var _val; +} + +main() { + new A(); +} diff --git a/Language/Classes/method_definition_t09.dart b/Language/Classes/method_definition_t09.dart index c0bae8b9a3..808a00f757 100644 --- a/Language/Classes/method_definition_t09.dart +++ b/Language/Classes/method_definition_t09.dart @@ -1,39 +1,39 @@ -// 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 classDefinition: -/// metadata abstract? class identifier typeParameters? (superclass mixins?)? -/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | -/// metadata abstract? class mixinApplicationClass -/// ; -/// . . . -/// classMemberDefinition: -/// declaration ';' | -/// methodSignature functionBody -/// ; -/// methodSignature: -/// constructorSignature initializers? | -/// factoryConstructorSignature | -/// static? functionSignature | -/// static? getterSignature | -/// static? setterSignature | -/// operatorSignature -/// ; -/// @description Checks that it is a compile-time error if a static function -/// method definition does not include a body. -/// @author msyabro - - -class A { -// ^ -// [cfe] unspecified - static f(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 classDefinition: +/// metadata abstract? class identifier typeParameters? (superclass mixins?)? +/// interfaces? ‘{’ (metadata classMemberDefinition)* ‘}’ | +/// metadata abstract? class mixinApplicationClass +/// ; +/// . . . +/// classMemberDefinition: +/// declaration ';' | +/// methodSignature functionBody +/// ; +/// methodSignature: +/// constructorSignature initializers? | +/// factoryConstructorSignature | +/// static? functionSignature | +/// static? getterSignature | +/// static? setterSignature | +/// operatorSignature +/// ; +/// @description Checks that it is a compile-time error if a static function +/// method definition does not include a body. +/// @author msyabro + + +class A { +// ^ +// [cfe] unspecified + static f(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/same_name_instance_and_static_members_t01.dart b/Language/Classes/same_name_instance_and_static_members_t01.dart index 141e606c3a..9b8e09e6cd 100644 --- a/Language/Classes/same_name_instance_and_static_members_t01.dart +++ b/Language/Classes/same_name_instance_and_static_members_t01.dart @@ -1,25 +1,25 @@ -// 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 It is a compile-time error if a class has an instance member and -/// a static member with the same name. -/// @description Checks that it is a compile-time error if a class inherits an -/// instance method and declares a static member method with the same name. -/// @author kaigorodov - - -class B { - int func() => 42; -} - -class A extends B { - static int func() => 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 It is a compile-time error if a class has an instance member and +/// a static member with the same name. +/// @description Checks that it is a compile-time error if a class inherits an +/// instance method and declares a static member method with the same name. +/// @author kaigorodov + + +class B { + int func() => 42; +} + +class A extends B { + static int func() => 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/same_name_instance_and_static_members_t02.dart b/Language/Classes/same_name_instance_and_static_members_t02.dart index c0b6c6d5a6..89f718af1a 100644 --- a/Language/Classes/same_name_instance_and_static_members_t02.dart +++ b/Language/Classes/same_name_instance_and_static_members_t02.dart @@ -1,26 +1,26 @@ -// 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 It is a compile-time error if a class has an instance member and -/// a static member with the same name. -/// @description Checks that it is a compile-time error if a class inherits an -/// abstract instance method and declares a static member method with the same -/// name. -/// @author kaigorodov - - -abstract class B { - int func(); -} - -class A extends B { - static int func() => 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 It is a compile-time error if a class has an instance member and +/// a static member with the same name. +/// @description Checks that it is a compile-time error if a class inherits an +/// abstract instance method and declares a static member method with the same +/// name. +/// @author kaigorodov + + +abstract class B { + int func(); +} + +class A extends B { + static int func() => 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/same_name_instance_and_static_members_t03.dart b/Language/Classes/same_name_instance_and_static_members_t03.dart index 418df10dd3..998634debe 100644 --- a/Language/Classes/same_name_instance_and_static_members_t03.dart +++ b/Language/Classes/same_name_instance_and_static_members_t03.dart @@ -1,25 +1,25 @@ -// 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 It is a compile-time error if a class has an instance member and -/// a static member with the same name. -/// @description Checks that it is a compile-time error if a class inherits an -/// instance method and declares a static field with the same name. -/// @author kaigorodov - - -class A { - int f() => 42; -} - -class B extends A { - static int f = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new B(); -} +// 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 It is a compile-time error if a class has an instance member and +/// a static member with the same name. +/// @description Checks that it is a compile-time error if a class inherits an +/// instance method and declares a static field with the same name. +/// @author kaigorodov + + +class A { + int f() => 42; +} + +class B extends A { + static int f = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new B(); +} diff --git a/Language/Classes/same_name_instance_and_static_members_t04.dart b/Language/Classes/same_name_instance_and_static_members_t04.dart index 28df26ed63..c79b0e848e 100644 --- a/Language/Classes/same_name_instance_and_static_members_t04.dart +++ b/Language/Classes/same_name_instance_and_static_members_t04.dart @@ -1,25 +1,25 @@ -// 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 It is a compile-time error if a class has an instance member and -/// a static member with the same name. -/// @description Checks that it is a compile-time error if a class inherits an -/// abstract instance method and declares a static field with the same name. -/// @author kaigorodov - - -abstract class A { - int f(); -} - -class B extends A { - static int f = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new B(); -} +// 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 It is a compile-time error if a class has an instance member and +/// a static member with the same name. +/// @description Checks that it is a compile-time error if a class inherits an +/// abstract instance method and declares a static field with the same name. +/// @author kaigorodov + + +abstract class A { + int f(); +} + +class B extends A { + static int f = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new B(); +} diff --git a/Language/Classes/same_name_instance_and_static_members_t05.dart b/Language/Classes/same_name_instance_and_static_members_t05.dart index 9a7f389184..1e59e518ba 100644 --- a/Language/Classes/same_name_instance_and_static_members_t05.dart +++ b/Language/Classes/same_name_instance_and_static_members_t05.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if a class has an instance member and -/// a static member with the same name. -/// @description Checks that it is a compile-time error if a class declares a -/// non-abstract instance method and a static method with the same name. -/// @author msyabro - - -class A { - int func() => 42; - static int func() => 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 It is a compile-time error if a class has an instance member and +/// a static member with the same name. +/// @description Checks that it is a compile-time error if a class declares a +/// non-abstract instance method and a static method with the same name. +/// @author msyabro + + +class A { + int func() => 42; + static int func() => 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Classes/same_name_members_t01.dart b/Language/Classes/same_name_members_t01.dart index 351c66231b..fdc6590346 100644 --- a/Language/Classes/same_name_members_t01.dart +++ b/Language/Classes/same_name_members_t01.dart @@ -1,25 +1,25 @@ -// 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 It is a compile-time error if a class declares two members of -/// the same name. -/// @description Checks that it is a compile-time error if a class declares -/// two functions of the same name. -/// @author vasya - - -class C { - C() { } - - void f() {} - int f() => 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} - +// 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 It is a compile-time error if a class declares two members of +/// the same name. +/// @description Checks that it is a compile-time error if a class declares +/// two functions of the same name. +/// @author vasya + + +class C { + C() { } + + void f() {} + int f() => 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} + diff --git a/Language/Classes/same_name_members_t02.dart b/Language/Classes/same_name_members_t02.dart index 3dbfcf84df..4b0995b1f3 100644 --- a/Language/Classes/same_name_members_t02.dart +++ b/Language/Classes/same_name_members_t02.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if a class declares two members of -/// the same name. -/// @description Checks that it is a compile-time error if a class declares -/// a function and a getter of the same name. -/// @author rodionov - - -class C { - void f() {} - int get f {return 1;} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 It is a compile-time error if a class declares two members of +/// the same name. +/// @description Checks that it is a compile-time error if a class declares +/// a function and a getter of the same name. +/// @author rodionov + + +class C { + void f() {} + int get f {return 1;} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/same_name_members_t03.dart b/Language/Classes/same_name_members_t03.dart index 183ce231d6..643fc0c45d 100644 --- a/Language/Classes/same_name_members_t03.dart +++ b/Language/Classes/same_name_members_t03.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if a class declares two members of -/// the same name. -/// @description Checks that it is a compile-time error if a class declares -/// a function and a static getter of the same name. -/// @author rodionov - - -class C { - void f() {} - static void get f {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 It is a compile-time error if a class declares two members of +/// the same name. +/// @description Checks that it is a compile-time error if a class declares +/// a function and a static getter of the same name. +/// @author rodionov + + +class C { + void f() {} + static void get f {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/same_name_members_t04.dart b/Language/Classes/same_name_members_t04.dart index d28a429c88..cdd83fb644 100644 --- a/Language/Classes/same_name_members_t04.dart +++ b/Language/Classes/same_name_members_t04.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if a class declares two members of -/// the same name. -/// @description Checks that it is a compile-time error if a class declares -/// a function and an abstract function of the same name. -/// @author rodionov - -abstract class A { - void f() {} - String f(int f); // abstract -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - print(A); -} +// 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 It is a compile-time error if a class declares two members of +/// the same name. +/// @description Checks that it is a compile-time error if a class declares +/// a function and an abstract function of the same name. +/// @author rodionov + +abstract class A { + void f() {} + String f(int f); // abstract +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + print(A); +} diff --git a/Language/Classes/same_name_members_t05.dart b/Language/Classes/same_name_members_t05.dart index 19157765c6..9dac9b1c0a 100644 --- a/Language/Classes/same_name_members_t05.dart +++ b/Language/Classes/same_name_members_t05.dart @@ -1,28 +1,28 @@ -// 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 It is a compile-time error if a class declares two members of -/// the same name. -/// @description Checks that it is a compile-time error if a class declares -/// an abstract function and getter of the same name. -/// @author rodionov - - -abstract class A { - String f(int f); // abstract - int get f {return 0;} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -class C extends A { - String f(int f) => "Lily was here"; -// ^ -// [analyzer] unspecified -} - -main() { - new C(); -} +// 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 It is a compile-time error if a class declares two members of +/// the same name. +/// @description Checks that it is a compile-time error if a class declares +/// an abstract function and getter of the same name. +/// @author rodionov + + +abstract class A { + String f(int f); // abstract + int get f {return 0;} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +class C extends A { + String f(int f) => "Lily was here"; +// ^ +// [analyzer] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/same_name_members_t06.dart b/Language/Classes/same_name_members_t06.dart index 3fb4c9ecd3..5c20ad0c8f 100644 --- a/Language/Classes/same_name_members_t06.dart +++ b/Language/Classes/same_name_members_t06.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if a class declares two members of -/// the same name. -/// @description Checks that it is a compile-time error if a class declares -/// an instance method and an abstract getter of the same name. -/// @author kaigorodov - -abstract class A { - String f(int f) => ""; - int get f; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - print(A); -} +// 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 It is a compile-time error if a class declares two members of +/// the same name. +/// @description Checks that it is a compile-time error if a class declares +/// an instance method and an abstract getter of the same name. +/// @author kaigorodov + +abstract class A { + String f(int f) => ""; + int get f; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + print(A); +} diff --git a/Language/Classes/same_name_members_t07.dart b/Language/Classes/same_name_members_t07.dart index dcd6ce0cae..e4b040e5ca 100644 --- a/Language/Classes/same_name_members_t07.dart +++ b/Language/Classes/same_name_members_t07.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if a class declares two members of -/// the same name. -/// @description Checks that it is a compile-time error if a class declares -/// a variable and an instance method of the same name. -/// @author rodionov - - -class C { - var f; - String f(int f) => ""; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 It is a compile-time error if a class declares two members of +/// the same name. +/// @description Checks that it is a compile-time error if a class declares +/// a variable and an instance method of the same name. +/// @author rodionov + + +class C { + var f; + String f(int f) => ""; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Classes/same_name_members_t08.dart b/Language/Classes/same_name_members_t08.dart index 8d889da55e..7356465fa8 100644 --- a/Language/Classes/same_name_members_t08.dart +++ b/Language/Classes/same_name_members_t08.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if a class declares two members of -/// the same name. -/// @description Checks that it is a compile-time error if a class declares -/// a variable and an abstract function of the same name. -/// @author rodionov - -abstract class A { - var f; - String f(int f); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - print(A); -} +// 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 It is a compile-time error if a class declares two members of +/// the same name. +/// @description Checks that it is a compile-time error if a class declares +/// a variable and an abstract function of the same name. +/// @author rodionov + +abstract class A { + var f; + String f(int f); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + print(A); +} diff --git a/Language/Classes/same_name_members_t09.dart b/Language/Classes/same_name_members_t09.dart index cf0c5153c0..f3fca5acf2 100644 --- a/Language/Classes/same_name_members_t09.dart +++ b/Language/Classes/same_name_members_t09.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if a class declares two members of -/// the same name. -/// @description Checks that it is a compile-time error if a class declares -/// a variable and an abstract getter of the same name. -/// @author rodionov - -abstract class A { - var f = 0; - String get f; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - print(A); -} +// 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 It is a compile-time error if a class declares two members of +/// the same name. +/// @description Checks that it is a compile-time error if a class declares +/// a variable and an abstract getter of the same name. +/// @author rodionov + +abstract class A { + var f = 0; + String get f; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + print(A); +} diff --git a/Language/Classes/same_name_members_t11.dart b/Language/Classes/same_name_members_t11.dart index f47e922d70..ec7b623653 100644 --- a/Language/Classes/same_name_members_t11.dart +++ b/Language/Classes/same_name_members_t11.dart @@ -1,25 +1,25 @@ -// 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 It is a compile-time error if a class declares two members of -/// the same name. -/// @description Checks that it is a compile-time error if a class declares -/// a variable, function, and an abstract getter of the same name. -/// @author kaigorodov - -abstract class A { - var f = 0; - String get f; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - String f(int f); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - print(A); -} +// 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 It is a compile-time error if a class declares two members of +/// the same name. +/// @description Checks that it is a compile-time error if a class declares +/// a variable, function, and an abstract getter of the same name. +/// @author kaigorodov + +abstract class A { + var f = 0; + String get f; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + String f(int f); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + print(A); +} diff --git a/Language/Expressions/Additive_Expressions/syntax_t02.dart b/Language/Expressions/Additive_Expressions/syntax_t02.dart index d19e16a98a..2ff7494387 100644 --- a/Language/Expressions/Additive_Expressions/syntax_t02.dart +++ b/Language/Expressions/Additive_Expressions/syntax_t02.dart @@ -1,30 +1,30 @@ -// 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 Additive expressions invoke the addition operators on objects. -/// additiveExpression: -/// multiplicativeExpression (additiveOperator multiplicativeExpression)* | -/// super (additiveOperator multiplicativeExpression)+ -/// ; -/// additiveOperator: -/// '+' | -/// '-' -/// ; -/// An additive expression is either a multiplicative expression, or an -/// invocation of an additive operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that an additive expression of the form -/// multiplicativeExpression ('+' multiplicativeExpression)* -/// must have at least two operands. -/// @author msyabro - - -main() { - try { - 1 +; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Additive expressions invoke the addition operators on objects. +/// additiveExpression: +/// multiplicativeExpression (additiveOperator multiplicativeExpression)* | +/// super (additiveOperator multiplicativeExpression)+ +/// ; +/// additiveOperator: +/// '+' | +/// '-' +/// ; +/// An additive expression is either a multiplicative expression, or an +/// invocation of an additive operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that an additive expression of the form +/// multiplicativeExpression ('+' multiplicativeExpression)* +/// must have at least two operands. +/// @author msyabro + + +main() { + try { + 1 +; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Additive_Expressions/syntax_t03.dart b/Language/Expressions/Additive_Expressions/syntax_t03.dart index f0d9590160..5c6f4272ba 100644 --- a/Language/Expressions/Additive_Expressions/syntax_t03.dart +++ b/Language/Expressions/Additive_Expressions/syntax_t03.dart @@ -1,30 +1,30 @@ -// 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 Additive expressions invoke the addition operators on objects. -/// additiveExpression: -/// multiplicativeExpression (additiveOperator multiplicativeExpression)* | -/// super (additiveOperator multiplicativeExpression)+ -/// ; -/// additiveOperator: -/// '+' | -/// '-' -/// ; -/// An additive expression is either a multiplicative expression, or an -/// invocation of an additive operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that an additive expression of the form -/// multiplicativeExpression ('-' multiplicativeExpression)* -/// must have at least two operands. -/// @author msyabro - - -main() { - try { - [] -; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Additive expressions invoke the addition operators on objects. +/// additiveExpression: +/// multiplicativeExpression (additiveOperator multiplicativeExpression)* | +/// super (additiveOperator multiplicativeExpression)+ +/// ; +/// additiveOperator: +/// '+' | +/// '-' +/// ; +/// An additive expression is either a multiplicative expression, or an +/// invocation of an additive operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that an additive expression of the form +/// multiplicativeExpression ('-' multiplicativeExpression)* +/// must have at least two operands. +/// @author msyabro + + +main() { + try { + [] -; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Additive_Expressions/syntax_t04.dart b/Language/Expressions/Additive_Expressions/syntax_t04.dart index f3a96cf20a..5929f20350 100644 --- a/Language/Expressions/Additive_Expressions/syntax_t04.dart +++ b/Language/Expressions/Additive_Expressions/syntax_t04.dart @@ -1,32 +1,32 @@ -// 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 Additive expressions invoke the addition operators on objects. -/// additiveExpression: -/// multiplicativeExpression (additiveOperator multiplicativeExpression)* | -/// super (additiveOperator multiplicativeExpression)+ -/// ; -/// additiveOperator: -/// '+' | -/// '-' -/// ; -/// An additive expression is either a multiplicative expression, or an -/// invocation of an additive operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that an additive expression of the form -/// multiplicativeExpression ('+' multiplicativeExpression)* -/// must have at least two operands. -/// Note that there is no unary plus operator in dart. -/// @author msyabro - - -main() { - var x=1; - try { - + x; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Additive expressions invoke the addition operators on objects. +/// additiveExpression: +/// multiplicativeExpression (additiveOperator multiplicativeExpression)* | +/// super (additiveOperator multiplicativeExpression)+ +/// ; +/// additiveOperator: +/// '+' | +/// '-' +/// ; +/// An additive expression is either a multiplicative expression, or an +/// invocation of an additive operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that an additive expression of the form +/// multiplicativeExpression ('+' multiplicativeExpression)* +/// must have at least two operands. +/// Note that there is no unary plus operator in dart. +/// @author msyabro + + +main() { + var x=1; + try { + + x; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Additive_Expressions/syntax_t05.dart b/Language/Expressions/Additive_Expressions/syntax_t05.dart index b4f692bd44..8a9fff53d4 100644 --- a/Language/Expressions/Additive_Expressions/syntax_t05.dart +++ b/Language/Expressions/Additive_Expressions/syntax_t05.dart @@ -1,44 +1,44 @@ -// 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 Additive expressions invoke the addition operators on objects. -/// additiveExpression: -/// multiplicativeExpression (additiveOperator multiplicativeExpression)* | -/// super (additiveOperator multiplicativeExpression)+ -/// ; -/// additiveOperator: -/// '+' | -/// '-' -/// ; -/// An additive expression is either a multiplicative expression, or an -/// invocation of an additive operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that an additive expression of the form -/// super ('+' multiplicativeExpression)+ -/// must have at least two operands. -/// @author msyabro - - -class S { - operator +() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -class A { - test() { - try { - super +; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} - } -} - -main() { - A a = new A(); - a.test(); -} +// 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 Additive expressions invoke the addition operators on objects. +/// additiveExpression: +/// multiplicativeExpression (additiveOperator multiplicativeExpression)* | +/// super (additiveOperator multiplicativeExpression)+ +/// ; +/// additiveOperator: +/// '+' | +/// '-' +/// ; +/// An additive expression is either a multiplicative expression, or an +/// invocation of an additive operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that an additive expression of the form +/// super ('+' multiplicativeExpression)+ +/// must have at least two operands. +/// @author msyabro + + +class S { + operator +() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +class A { + test() { + try { + super +; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} + } +} + +main() { + A a = new A(); + a.test(); +} diff --git a/Language/Expressions/Additive_Expressions/syntax_t06.dart b/Language/Expressions/Additive_Expressions/syntax_t06.dart index 94fb74dabe..99748e9bf2 100644 --- a/Language/Expressions/Additive_Expressions/syntax_t06.dart +++ b/Language/Expressions/Additive_Expressions/syntax_t06.dart @@ -1,41 +1,41 @@ -// 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 Additive expressions invoke the addition operators on objects. -/// additiveExpression: -/// multiplicativeExpression (additiveOperator multiplicativeExpression)* | -/// super (additiveOperator multiplicativeExpression)+ -/// ; -/// additiveOperator: -/// '+' | -/// '-' -/// ; -/// An additive expression is either a multiplicative expression, or an -/// invocation of an additive operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that an additive expression of the form -/// super ('-' multiplicativeExpression)+ -/// must have at least two operands. -/// @author msyabro - - -class S { - operator -() {} -} - -class A { - test() { - try { - super -; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} - } -} - -main() { - A a = new A(); - a.test(); -} +// 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 Additive expressions invoke the addition operators on objects. +/// additiveExpression: +/// multiplicativeExpression (additiveOperator multiplicativeExpression)* | +/// super (additiveOperator multiplicativeExpression)+ +/// ; +/// additiveOperator: +/// '+' | +/// '-' +/// ; +/// An additive expression is either a multiplicative expression, or an +/// invocation of an additive operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that an additive expression of the form +/// super ('-' multiplicativeExpression)+ +/// must have at least two operands. +/// @author msyabro + + +class S { + operator -() {} +} + +class A { + test() { + try { + super -; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} + } +} + +main() { + A a = new A(); + a.test(); +} diff --git a/Language/Expressions/Additive_Expressions/syntax_t15.dart b/Language/Expressions/Additive_Expressions/syntax_t15.dart index f435b1f9c8..5278d7b107 100644 --- a/Language/Expressions/Additive_Expressions/syntax_t15.dart +++ b/Language/Expressions/Additive_Expressions/syntax_t15.dart @@ -1,38 +1,38 @@ -// 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 Additive expressions invoke the addition operators on objects. -/// additiveExpression: -/// multiplicativeExpression (additiveOperator multiplicativeExpression)* | -/// super (additiveOperator multiplicativeExpression)+ -/// ; -/// additiveOperator: -/// '+' | -/// '-' -/// ; -/// An additive expression is either a multiplicative expression, or an -/// invocation of an additive operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that super can be used only as -/// the first operand in a additive expression. -/// @author msyabro - - -class S {} - -class A extends S { - test() { - try { - 1 + super; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} - } -} - -main() { - A a = new A(); - a.test(); -} +// 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 Additive expressions invoke the addition operators on objects. +/// additiveExpression: +/// multiplicativeExpression (additiveOperator multiplicativeExpression)* | +/// super (additiveOperator multiplicativeExpression)+ +/// ; +/// additiveOperator: +/// '+' | +/// '-' +/// ; +/// An additive expression is either a multiplicative expression, or an +/// invocation of an additive operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that super can be used only as +/// the first operand in a additive expression. +/// @author msyabro + + +class S {} + +class A extends S { + test() { + try { + 1 + super; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} + } +} + +main() { + A a = new A(); + a.test(); +} diff --git a/Language/Expressions/Assignable_Expressions/syntax_t04.dart b/Language/Expressions/Assignable_Expressions/syntax_t04.dart index e7ae7c9b5a..650f8dfb3e 100644 --- a/Language/Expressions/Assignable_Expressions/syntax_t04.dart +++ b/Language/Expressions/Assignable_Expressions/syntax_t04.dart @@ -1,45 +1,45 @@ -// 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 Assignable expressions are expressions that can appear on the -/// left hand side of an assignment. -/// assignableExpression: -/// primary (arguments* assignableSelector)+ | -/// super unconditionalAssignableSelector | -/// identifier -/// ; -/// unconditionalAssignableSelector: -/// '[' expression ']' | -/// '.' identifier -/// ; -/// assignableSelector: -/// unconditionalAssignableSelector | -/// '?.' identifier -/// ; -/// An assignable expression is either: -/// • An identifier. -/// • An invocation (possibly conditional) of a getter or list access operator -/// on an expression e. -/// • An invocation of a getter or list access operator on super. -/// @description Checks that super without unconditionalAssignableSelector can't -/// be used in the left hand side of an assignment. -/// @author msyabro - - -class S {} -class A extends S { - test() { - try { - super = null; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} - } -} - -main() { - A a = new A(); - a.test(); -} +// 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 Assignable expressions are expressions that can appear on the +/// left hand side of an assignment. +/// assignableExpression: +/// primary (arguments* assignableSelector)+ | +/// super unconditionalAssignableSelector | +/// identifier +/// ; +/// unconditionalAssignableSelector: +/// '[' expression ']' | +/// '.' identifier +/// ; +/// assignableSelector: +/// unconditionalAssignableSelector | +/// '?.' identifier +/// ; +/// An assignable expression is either: +/// • An identifier. +/// • An invocation (possibly conditional) of a getter or list access operator +/// on an expression e. +/// • An invocation of a getter or list access operator on super. +/// @description Checks that super without unconditionalAssignableSelector can't +/// be used in the left hand side of an assignment. +/// @author msyabro + + +class S {} +class A extends S { + test() { + try { + super = null; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} + } +} + +main() { + A a = new A(); + a.test(); +} diff --git a/Language/Expressions/Assignable_Expressions/syntax_t05.dart b/Language/Expressions/Assignable_Expressions/syntax_t05.dart index 873782ca33..bf3a2f4810 100644 --- a/Language/Expressions/Assignable_Expressions/syntax_t05.dart +++ b/Language/Expressions/Assignable_Expressions/syntax_t05.dart @@ -1,38 +1,38 @@ -// 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 Assignable expressions are expressions that can appear on the -/// left hand side of an assignment. -/// assignableExpression: -/// primary (arguments* assignableSelector)+ | -/// super unconditionalAssignableSelector | -/// identifier -/// ; -/// unconditionalAssignableSelector: -/// '[' expression ']' | -/// '.' identifier -/// ; -/// assignableSelector: -/// unconditionalAssignableSelector | -/// '?.' identifier -/// ; -/// An assignable expression is either: -/// • An identifier. -/// • An invocation (possibly conditional) of a getter or list access operator -/// on an expression e. -/// • An invocation of a getter or list access operator on super. -/// @description Checks that an expression not enclosed in parentheses can't -/// be used with assignableSelector in the left hand side of an assignment. -/// @author msyabro - - -main() { - var id = 1; - try { - id++ = 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Assignable expressions are expressions that can appear on the +/// left hand side of an assignment. +/// assignableExpression: +/// primary (arguments* assignableSelector)+ | +/// super unconditionalAssignableSelector | +/// identifier +/// ; +/// unconditionalAssignableSelector: +/// '[' expression ']' | +/// '.' identifier +/// ; +/// assignableSelector: +/// unconditionalAssignableSelector | +/// '?.' identifier +/// ; +/// An assignable expression is either: +/// • An identifier. +/// • An invocation (possibly conditional) of a getter or list access operator +/// on an expression e. +/// • An invocation of a getter or list access operator on super. +/// @description Checks that an expression not enclosed in parentheses can't +/// be used with assignableSelector in the left hand side of an assignment. +/// @author msyabro + + +main() { + var id = 1; + try { + id++ = 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Assignable_Expressions/syntax_t10.dart b/Language/Expressions/Assignable_Expressions/syntax_t10.dart index de45bf717e..8534a1fd62 100644 --- a/Language/Expressions/Assignable_Expressions/syntax_t10.dart +++ b/Language/Expressions/Assignable_Expressions/syntax_t10.dart @@ -1,37 +1,37 @@ -// 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 Assignable expressions are expressions that can appear on the -/// left hand side of an assignment. -/// assignableExpression: -/// primary (arguments* assignableSelector)+ | -/// super unconditionalAssignableSelector | -/// identifier -/// ; -/// unconditionalAssignableSelector: -/// '[' expression ']' | -/// '.' identifier -/// ; -/// assignableSelector: -/// unconditionalAssignableSelector | -/// '?.' identifier -/// ; -/// An assignable expression is either: -/// • An identifier. -/// • An invocation (possibly conditional) of a getter or list access operator -/// on an expression e. -/// • An invocation of a getter or list access operator on super. -/// @description Checks that a block statement -/// can't be used in the left hand side of an assignment. -/// @author msyabro - - -main() { - try { - {int x; x = 1;} = null; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Assignable expressions are expressions that can appear on the +/// left hand side of an assignment. +/// assignableExpression: +/// primary (arguments* assignableSelector)+ | +/// super unconditionalAssignableSelector | +/// identifier +/// ; +/// unconditionalAssignableSelector: +/// '[' expression ']' | +/// '.' identifier +/// ; +/// assignableSelector: +/// unconditionalAssignableSelector | +/// '?.' identifier +/// ; +/// An assignable expression is either: +/// • An identifier. +/// • An invocation (possibly conditional) of a getter or list access operator +/// on an expression e. +/// • An invocation of a getter or list access operator on super. +/// @description Checks that a block statement +/// can't be used in the left hand side of an assignment. +/// @author msyabro + + +main() { + try { + {int x; x = 1;} = null; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Assignable_Expressions/syntax_t11.dart b/Language/Expressions/Assignable_Expressions/syntax_t11.dart index 9fbf3e2845..a110eb50af 100644 --- a/Language/Expressions/Assignable_Expressions/syntax_t11.dart +++ b/Language/Expressions/Assignable_Expressions/syntax_t11.dart @@ -1,37 +1,37 @@ -// 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 Assignable expressions are expressions that can appear on the -/// left hand side of an assignment. -/// assignableExpression: -/// primary (arguments* assignableSelector)+ | -/// super unconditionalAssignableSelector | -/// identifier -/// ; -/// unconditionalAssignableSelector: -/// '[' expression ']' | -/// '.' identifier -/// ; -/// assignableSelector: -/// unconditionalAssignableSelector | -/// '?.' identifier -/// ; -/// An assignable expression is either: -/// • An identifier. -/// • An invocation (possibly conditional) of a getter or list access operator -/// on an expression e. -/// • An invocation of a getter or list access operator on super. -/// @description Checks that an if statement -/// can't be used in the left hand side of an assignment. -/// @author msyabro - - -main() { - try { - if (true) {} = 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Assignable expressions are expressions that can appear on the +/// left hand side of an assignment. +/// assignableExpression: +/// primary (arguments* assignableSelector)+ | +/// super unconditionalAssignableSelector | +/// identifier +/// ; +/// unconditionalAssignableSelector: +/// '[' expression ']' | +/// '.' identifier +/// ; +/// assignableSelector: +/// unconditionalAssignableSelector | +/// '?.' identifier +/// ; +/// An assignable expression is either: +/// • An identifier. +/// • An invocation (possibly conditional) of a getter or list access operator +/// on an expression e. +/// • An invocation of a getter or list access operator on super. +/// @description Checks that an if statement +/// can't be used in the left hand side of an assignment. +/// @author msyabro + + +main() { + try { + if (true) {} = 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Assignable_Expressions/syntax_t12.dart b/Language/Expressions/Assignable_Expressions/syntax_t12.dart index 7f3eac48e9..79ad5ead70 100644 --- a/Language/Expressions/Assignable_Expressions/syntax_t12.dart +++ b/Language/Expressions/Assignable_Expressions/syntax_t12.dart @@ -1,37 +1,37 @@ -// 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 Assignable expressions are expressions that can appear on the -/// left hand side of an assignment. -/// assignableExpression: -/// primary (arguments* assignableSelector)+ | -/// super unconditionalAssignableSelector | -/// identifier -/// ; -/// unconditionalAssignableSelector: -/// '[' expression ']' | -/// '.' identifier -/// ; -/// assignableSelector: -/// unconditionalAssignableSelector | -/// '?.' identifier -/// ; -/// An assignable expression is either: -/// • An identifier. -/// • An invocation (possibly conditional) of a getter or list access operator -/// on an expression e. -/// • An invocation of a getter or list access operator on super. -/// @description Checks that a for statement -/// can't be used in the left hand side of an assignment. -/// @author msyabro - - -main() { - try { - for (;;) {} = 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Assignable expressions are expressions that can appear on the +/// left hand side of an assignment. +/// assignableExpression: +/// primary (arguments* assignableSelector)+ | +/// super unconditionalAssignableSelector | +/// identifier +/// ; +/// unconditionalAssignableSelector: +/// '[' expression ']' | +/// '.' identifier +/// ; +/// assignableSelector: +/// unconditionalAssignableSelector | +/// '?.' identifier +/// ; +/// An assignable expression is either: +/// • An identifier. +/// • An invocation (possibly conditional) of a getter or list access operator +/// on an expression e. +/// • An invocation of a getter or list access operator on super. +/// @description Checks that a for statement +/// can't be used in the left hand side of an assignment. +/// @author msyabro + + +main() { + try { + for (;;) {} = 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Assignable_Expressions/syntax_t13.dart b/Language/Expressions/Assignable_Expressions/syntax_t13.dart index f963fb2fa8..ab851f1466 100644 --- a/Language/Expressions/Assignable_Expressions/syntax_t13.dart +++ b/Language/Expressions/Assignable_Expressions/syntax_t13.dart @@ -1,37 +1,37 @@ -// 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 Assignable expressions are expressions that can appear on the -/// left hand side of an assignment. -/// assignableExpression: -/// primary (arguments* assignableSelector)+ | -/// super unconditionalAssignableSelector | -/// identifier -/// ; -/// unconditionalAssignableSelector: -/// '[' expression ']' | -/// '.' identifier -/// ; -/// assignableSelector: -/// unconditionalAssignableSelector | -/// '?.' identifier -/// ; -/// An assignable expression is either: -/// • An identifier. -/// • An invocation (possibly conditional) of a getter or list access operator -/// on an expression e. -/// • An invocation of a getter or list access operator on super. -/// @description Checks that a while statement -/// can't be used in the left hand side of an assignment. -/// @author msyabro - - -main() { - try { - while (true) {} = null; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Assignable expressions are expressions that can appear on the +/// left hand side of an assignment. +/// assignableExpression: +/// primary (arguments* assignableSelector)+ | +/// super unconditionalAssignableSelector | +/// identifier +/// ; +/// unconditionalAssignableSelector: +/// '[' expression ']' | +/// '.' identifier +/// ; +/// assignableSelector: +/// unconditionalAssignableSelector | +/// '?.' identifier +/// ; +/// An assignable expression is either: +/// • An identifier. +/// • An invocation (possibly conditional) of a getter or list access operator +/// on an expression e. +/// • An invocation of a getter or list access operator on super. +/// @description Checks that a while statement +/// can't be used in the left hand side of an assignment. +/// @author msyabro + + +main() { + try { + while (true) {} = null; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Assignable_Expressions/syntax_t14.dart b/Language/Expressions/Assignable_Expressions/syntax_t14.dart index 393bd27f6d..8c81c16132 100644 --- a/Language/Expressions/Assignable_Expressions/syntax_t14.dart +++ b/Language/Expressions/Assignable_Expressions/syntax_t14.dart @@ -1,37 +1,37 @@ -// 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 Assignable expressions are expressions that can appear on the -/// left hand side of an assignment. -/// assignableExpression: -/// primary (arguments* assignableSelector)+ | -/// super unconditionalAssignableSelector | -/// identifier -/// ; -/// unconditionalAssignableSelector: -/// '[' expression ']' | -/// '.' identifier -/// ; -/// assignableSelector: -/// unconditionalAssignableSelector | -/// '?.' identifier -/// ; -/// An assignable expression is either: -/// • An identifier. -/// • An invocation (possibly conditional) of a getter or list access operator -/// on an expression e. -/// • An invocation of a getter or list access operator on super. -/// @description Checks that a do statement -/// can't be used in the left hand side of an assignment. -/// @author msyabro - - -main() { - try { - do {} while (true) = null; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Assignable expressions are expressions that can appear on the +/// left hand side of an assignment. +/// assignableExpression: +/// primary (arguments* assignableSelector)+ | +/// super unconditionalAssignableSelector | +/// identifier +/// ; +/// unconditionalAssignableSelector: +/// '[' expression ']' | +/// '.' identifier +/// ; +/// assignableSelector: +/// unconditionalAssignableSelector | +/// '?.' identifier +/// ; +/// An assignable expression is either: +/// • An identifier. +/// • An invocation (possibly conditional) of a getter or list access operator +/// on an expression e. +/// • An invocation of a getter or list access operator on super. +/// @description Checks that a do statement +/// can't be used in the left hand side of an assignment. +/// @author msyabro + + +main() { + try { + do {} while (true) = null; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Assignable_Expressions/syntax_t15.dart b/Language/Expressions/Assignable_Expressions/syntax_t15.dart index e1a8c2d496..9674d92560 100644 --- a/Language/Expressions/Assignable_Expressions/syntax_t15.dart +++ b/Language/Expressions/Assignable_Expressions/syntax_t15.dart @@ -1,37 +1,37 @@ -// 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 Assignable expressions are expressions that can appear on the -/// left hand side of an assignment. -/// assignableExpression: -/// primary (arguments* assignableSelector)+ | -/// super unconditionalAssignableSelector | -/// identifier -/// ; -/// unconditionalAssignableSelector: -/// '[' expression ']' | -/// '.' identifier -/// ; -/// assignableSelector: -/// unconditionalAssignableSelector | -/// '?.' identifier -/// ; -/// An assignable expression is either: -/// • An identifier. -/// • An invocation (possibly conditional) of a getter or list access operator -/// on an expression e. -/// • An invocation of a getter or list access operator on super. -/// @description Checks that a switch statement -/// can't be used in the left hand side of an assignment. -/// @author msyabro - - -main() { - try { - switch (1) {case 1: true; default: false;} = null; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Assignable expressions are expressions that can appear on the +/// left hand side of an assignment. +/// assignableExpression: +/// primary (arguments* assignableSelector)+ | +/// super unconditionalAssignableSelector | +/// identifier +/// ; +/// unconditionalAssignableSelector: +/// '[' expression ']' | +/// '.' identifier +/// ; +/// assignableSelector: +/// unconditionalAssignableSelector | +/// '?.' identifier +/// ; +/// An assignable expression is either: +/// • An identifier. +/// • An invocation (possibly conditional) of a getter or list access operator +/// on an expression e. +/// • An invocation of a getter or list access operator on super. +/// @description Checks that a switch statement +/// can't be used in the left hand side of an assignment. +/// @author msyabro + + +main() { + try { + switch (1) {case 1: true; default: false;} = null; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Assignable_Expressions/syntax_t16.dart b/Language/Expressions/Assignable_Expressions/syntax_t16.dart index 12d49eb5f9..57c64f8a9e 100644 --- a/Language/Expressions/Assignable_Expressions/syntax_t16.dart +++ b/Language/Expressions/Assignable_Expressions/syntax_t16.dart @@ -1,37 +1,37 @@ -// 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 Assignable expressions are expressions that can appear on the -/// left hand side of an assignment. -/// assignableExpression: -/// primary (arguments* assignableSelector)+ | -/// super unconditionalAssignableSelector | -/// identifier -/// ; -/// unconditionalAssignableSelector: -/// '[' expression ']' | -/// '.' identifier -/// ; -/// assignableSelector: -/// unconditionalAssignableSelector | -/// '?.' identifier -/// ; -/// An assignable expression is either: -/// • An identifier. -/// • An invocation (possibly conditional) of a getter or list access operator -/// on an expression e. -/// • An invocation of a getter or list access operator on super. -/// @description Checks that a try statement -/// can't be used in the left hand side of an assignment. -/// @author msyabro - - -main() { - try { - try {} catch (e) {} = null; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Assignable expressions are expressions that can appear on the +/// left hand side of an assignment. +/// assignableExpression: +/// primary (arguments* assignableSelector)+ | +/// super unconditionalAssignableSelector | +/// identifier +/// ; +/// unconditionalAssignableSelector: +/// '[' expression ']' | +/// '.' identifier +/// ; +/// assignableSelector: +/// unconditionalAssignableSelector | +/// '?.' identifier +/// ; +/// An assignable expression is either: +/// • An identifier. +/// • An invocation (possibly conditional) of a getter or list access operator +/// on an expression e. +/// • An invocation of a getter or list access operator on super. +/// @description Checks that a try statement +/// can't be used in the left hand side of an assignment. +/// @author msyabro + + +main() { + try { + try {} catch (e) {} = null; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Assignable_Expressions/syntax_t17.dart b/Language/Expressions/Assignable_Expressions/syntax_t17.dart index 24e2431656..5d9f2f0772 100644 --- a/Language/Expressions/Assignable_Expressions/syntax_t17.dart +++ b/Language/Expressions/Assignable_Expressions/syntax_t17.dart @@ -1,37 +1,37 @@ -// 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 Assignable expressions are expressions that can appear on the -/// left hand side of an assignment. -/// assignableExpression: -/// primary (arguments* assignableSelector)+ | -/// super unconditionalAssignableSelector | -/// identifier -/// ; -/// unconditionalAssignableSelector: -/// '[' expression ']' | -/// '.' identifier -/// ; -/// assignableSelector: -/// unconditionalAssignableSelector | -/// '?.' identifier -/// ; -/// An assignable expression is either: -/// • An identifier. -/// • An invocation (possibly conditional) of a getter or list access operator -/// on an expression e. -/// • An invocation of a getter or list access operator on super. -/// @description Checks that a throw statement -/// can't be used in the left hand side of an assignment. -/// @author msyabro - - -main() { - try { - throw "something" = null; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Assignable expressions are expressions that can appear on the +/// left hand side of an assignment. +/// assignableExpression: +/// primary (arguments* assignableSelector)+ | +/// super unconditionalAssignableSelector | +/// identifier +/// ; +/// unconditionalAssignableSelector: +/// '[' expression ']' | +/// '.' identifier +/// ; +/// assignableSelector: +/// unconditionalAssignableSelector | +/// '?.' identifier +/// ; +/// An assignable expression is either: +/// • An identifier. +/// • An invocation (possibly conditional) of a getter or list access operator +/// on an expression e. +/// • An invocation of a getter or list access operator on super. +/// @description Checks that a throw statement +/// can't be used in the left hand side of an assignment. +/// @author msyabro + + +main() { + try { + throw "something" = null; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Assignable_Expressions/syntax_t18.dart b/Language/Expressions/Assignable_Expressions/syntax_t18.dart index 69eb99e243..5e2482bb58 100644 --- a/Language/Expressions/Assignable_Expressions/syntax_t18.dart +++ b/Language/Expressions/Assignable_Expressions/syntax_t18.dart @@ -1,37 +1,37 @@ -// 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 Assignable expressions are expressions that can appear on the -/// left hand side of an assignment. -/// assignableExpression: -/// primary (arguments* assignableSelector)+ | -/// super unconditionalAssignableSelector | -/// identifier -/// ; -/// unconditionalAssignableSelector: -/// '[' expression ']' | -/// '.' identifier -/// ; -/// assignableSelector: -/// unconditionalAssignableSelector | -/// '?.' identifier -/// ; -/// An assignable expression is either: -/// • An identifier. -/// • An invocation (possibly conditional) of a getter or list access operator -/// on an expression e. -/// • An invocation of a getter or list access operator on super. -/// @description Checks that an assert statement -/// can't be used in the left hand side of an assignment. -/// @author msyabro - - -main() { - try { - assert (false) = null; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Assignable expressions are expressions that can appear on the +/// left hand side of an assignment. +/// assignableExpression: +/// primary (arguments* assignableSelector)+ | +/// super unconditionalAssignableSelector | +/// identifier +/// ; +/// unconditionalAssignableSelector: +/// '[' expression ']' | +/// '.' identifier +/// ; +/// assignableSelector: +/// unconditionalAssignableSelector | +/// '?.' identifier +/// ; +/// An assignable expression is either: +/// • An identifier. +/// • An invocation (possibly conditional) of a getter or list access operator +/// on an expression e. +/// • An invocation of a getter or list access operator on super. +/// @description Checks that an assert statement +/// can't be used in the left hand side of an assignment. +/// @author msyabro + + +main() { + try { + assert (false) = null; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Assignable_Expressions/syntax_t21.dart b/Language/Expressions/Assignable_Expressions/syntax_t21.dart index b470cb8dfa..67e6492a6c 100644 --- a/Language/Expressions/Assignable_Expressions/syntax_t21.dart +++ b/Language/Expressions/Assignable_Expressions/syntax_t21.dart @@ -1,39 +1,39 @@ -// 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 Assignable expressions are expressions that can appear on the -/// left hand side of an assignment. -/// assignableExpression: -/// primary (arguments* assignableSelector)+ | -/// super unconditionalAssignableSelector | -/// identifier -/// ; -/// unconditionalAssignableSelector: -/// '[' expression ']' | -/// '.' identifier -/// ; -/// assignableSelector: -/// unconditionalAssignableSelector | -/// '?.' identifier -/// ; -/// An assignable expression is either: -/// • An identifier. -/// • An invocation (possibly conditional) of a getter or list access operator -/// on an expression e. -/// • An invocation of a getter or list access operator on super. -/// @description Checks that a new expression without assignableSelector -/// can't be used in the left hand side of an assignment. -/// @author msyabro - - -class A {} - -main() { - try { - new A() = null; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Assignable expressions are expressions that can appear on the +/// left hand side of an assignment. +/// assignableExpression: +/// primary (arguments* assignableSelector)+ | +/// super unconditionalAssignableSelector | +/// identifier +/// ; +/// unconditionalAssignableSelector: +/// '[' expression ']' | +/// '.' identifier +/// ; +/// assignableSelector: +/// unconditionalAssignableSelector | +/// '?.' identifier +/// ; +/// An assignable expression is either: +/// • An identifier. +/// • An invocation (possibly conditional) of a getter or list access operator +/// on an expression e. +/// • An invocation of a getter or list access operator on super. +/// @description Checks that a new expression without assignableSelector +/// can't be used in the left hand side of an assignment. +/// @author msyabro + + +class A {} + +main() { + try { + new A() = null; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Assignable_Expressions/syntax_t22.dart b/Language/Expressions/Assignable_Expressions/syntax_t22.dart index dbc068c1ba..36a8772053 100644 --- a/Language/Expressions/Assignable_Expressions/syntax_t22.dart +++ b/Language/Expressions/Assignable_Expressions/syntax_t22.dart @@ -1,37 +1,37 @@ -// 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 Assignable expressions are expressions that can appear on the -/// left hand side of an assignment. -/// assignableExpression: -/// primary (arguments* assignableSelector)+ | -/// super unconditionalAssignableSelector | -/// identifier -/// ; -/// unconditionalAssignableSelector: -/// '[' expression ']' | -/// '.' identifier -/// ; -/// assignableSelector: -/// unconditionalAssignableSelector | -/// '?.' identifier -/// ; -/// An assignable expression is either: -/// • An identifier. -/// • An invocation (possibly conditional) of a getter or list access operator -/// on an expression e. -/// • An invocation of a getter or list access operator on super. -/// @description Checks that a literal without assignableSelector -/// can't be used in the left hand side of an assignment. -/// @author msyabro - - -main() { - try { - 1 = 2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Assignable expressions are expressions that can appear on the +/// left hand side of an assignment. +/// assignableExpression: +/// primary (arguments* assignableSelector)+ | +/// super unconditionalAssignableSelector | +/// identifier +/// ; +/// unconditionalAssignableSelector: +/// '[' expression ']' | +/// '.' identifier +/// ; +/// assignableSelector: +/// unconditionalAssignableSelector | +/// '?.' identifier +/// ; +/// An assignable expression is either: +/// • An identifier. +/// • An invocation (possibly conditional) of a getter or list access operator +/// on an expression e. +/// • An invocation of a getter or list access operator on super. +/// @description Checks that a literal without assignableSelector +/// can't be used in the left hand side of an assignment. +/// @author msyabro + + +main() { + try { + 1 = 2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Assignable_Expressions/syntax_t23.dart b/Language/Expressions/Assignable_Expressions/syntax_t23.dart index d7ae1b1d04..70e5cecf7f 100644 --- a/Language/Expressions/Assignable_Expressions/syntax_t23.dart +++ b/Language/Expressions/Assignable_Expressions/syntax_t23.dart @@ -1,44 +1,44 @@ -// 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 Assignable expressions are expressions that can appear on the -/// left hand side of an assignment. -/// assignableExpression: -/// primary (arguments* assignableSelector)+ | -/// super unconditionalAssignableSelector | -/// identifier -/// ; -/// unconditionalAssignableSelector: -/// '[' expression ']' | -/// '.' identifier -/// ; -/// assignableSelector: -/// unconditionalAssignableSelector | -/// '?.' identifier -/// ; -/// An assignable expression is either: -/// • An identifier. -/// • An invocation (possibly conditional) of a getter or list access operator -/// on an expression e. -/// • An invocation of a getter or list access operator on super. -/// @description Checks that thisExpression without assignableSelector -/// can't be used in the left hand side of an assignment. -/// @author msyabro - - -class A { - test() { - try { - this = new A(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} - } -} - -main() { - A a = new A(); - a.test(); -} +// 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 Assignable expressions are expressions that can appear on the +/// left hand side of an assignment. +/// assignableExpression: +/// primary (arguments* assignableSelector)+ | +/// super unconditionalAssignableSelector | +/// identifier +/// ; +/// unconditionalAssignableSelector: +/// '[' expression ']' | +/// '.' identifier +/// ; +/// assignableSelector: +/// unconditionalAssignableSelector | +/// '?.' identifier +/// ; +/// An assignable expression is either: +/// • An identifier. +/// • An invocation (possibly conditional) of a getter or list access operator +/// on an expression e. +/// • An invocation of a getter or list access operator on super. +/// @description Checks that thisExpression without assignableSelector +/// can't be used in the left hand side of an assignment. +/// @author msyabro + + +class A { + test() { + try { + this = new A(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} + } +} + +main() { + A a = new A(); + a.test(); +} diff --git a/Language/Expressions/Assignable_Expressions/syntax_t24.dart b/Language/Expressions/Assignable_Expressions/syntax_t24.dart index 1a08774688..a18902bcc0 100644 --- a/Language/Expressions/Assignable_Expressions/syntax_t24.dart +++ b/Language/Expressions/Assignable_Expressions/syntax_t24.dart @@ -1,43 +1,43 @@ -// 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 Assignable expressions are expressions that can appear on the -/// left hand side of an assignment. -/// assignableExpression: -/// primary (arguments* assignableSelector)+ | -/// super unconditionalAssignableSelector | -/// identifier -/// ; -/// unconditionalAssignableSelector: -/// '[' expression ']' | -/// '.' identifier -/// ; -/// assignableSelector: -/// unconditionalAssignableSelector | -/// '?.' identifier -/// ; -/// An assignable expression is either: -/// • An identifier. -/// • An invocation (possibly conditional) of a getter or list access operator -/// on an expression e. -/// • An invocation of a getter or list access operator on super. -/// @description Checks that a method invocation without assignableSelector -/// can't be used in the left hand side of an assignment. -/// @author msyabro - - -class A { - int k = 1; - int test() {return k;} -} - -main() { - A a = new A(); - try { - a.test() = 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Assignable expressions are expressions that can appear on the +/// left hand side of an assignment. +/// assignableExpression: +/// primary (arguments* assignableSelector)+ | +/// super unconditionalAssignableSelector | +/// identifier +/// ; +/// unconditionalAssignableSelector: +/// '[' expression ']' | +/// '.' identifier +/// ; +/// assignableSelector: +/// unconditionalAssignableSelector | +/// '?.' identifier +/// ; +/// An assignable expression is either: +/// • An identifier. +/// • An invocation (possibly conditional) of a getter or list access operator +/// on an expression e. +/// • An invocation of a getter or list access operator on super. +/// @description Checks that a method invocation without assignableSelector +/// can't be used in the left hand side of an assignment. +/// @author msyabro + + +class A { + int k = 1; + int test() {return k;} +} + +main() { + A a = new A(); + try { + a.test() = 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Assignable_Expressions/syntax_t25.dart b/Language/Expressions/Assignable_Expressions/syntax_t25.dart index f2a132f4da..731fde4d58 100644 --- a/Language/Expressions/Assignable_Expressions/syntax_t25.dart +++ b/Language/Expressions/Assignable_Expressions/syntax_t25.dart @@ -1,37 +1,37 @@ -// 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 Assignable expressions are expressions that can appear on the -/// left hand side of an assignment. -/// assignableExpression: -/// primary (arguments* assignableSelector)+ | -/// super unconditionalAssignableSelector | -/// identifier -/// ; -/// unconditionalAssignableSelector: -/// '[' expression ']' | -/// '.' identifier -/// ; -/// assignableSelector: -/// unconditionalAssignableSelector | -/// '?.' identifier -/// ; -/// An assignable expression is either: -/// • An identifier. -/// • An invocation (possibly conditional) of a getter or list access operator -/// on an expression e. -/// • An invocation of a getter or list access operator on super. -/// @description Checks that a binary expression without assignableSelector -/// can't be used in the left hand side of an assignment. -/// @author msyabro - - -main() { - try { - (2 + 2) = 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Assignable expressions are expressions that can appear on the +/// left hand side of an assignment. +/// assignableExpression: +/// primary (arguments* assignableSelector)+ | +/// super unconditionalAssignableSelector | +/// identifier +/// ; +/// unconditionalAssignableSelector: +/// '[' expression ']' | +/// '.' identifier +/// ; +/// assignableSelector: +/// unconditionalAssignableSelector | +/// '?.' identifier +/// ; +/// An assignable expression is either: +/// • An identifier. +/// • An invocation (possibly conditional) of a getter or list access operator +/// on an expression e. +/// • An invocation of a getter or list access operator on super. +/// @description Checks that a binary expression without assignableSelector +/// can't be used in the left hand side of an assignment. +/// @author msyabro + + +main() { + try { + (2 + 2) = 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Bitwise_Expressions/syntax_t02.dart b/Language/Expressions/Bitwise_Expressions/syntax_t02.dart index 065e9e9ffc..e66d9cbba9 100644 --- a/Language/Expressions/Bitwise_Expressions/syntax_t02.dart +++ b/Language/Expressions/Bitwise_Expressions/syntax_t02.dart @@ -1,48 +1,48 @@ -// 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 Bitwise expressions invoke the bitwise operators on objects. -/// bitwiseOrExpression: -/// bitwiseXorExpression ('|' bitwiseXorExpression)* | -/// super ('|' bitwiseXorExpression)+ -/// ; -/// bitwiseXorExpression: -/// bitwiseAndExpression ('^' bitwiseAndExpression)* | -/// super ('^' bitwiseAndExpression)+ -/// ; -/// bitwiseAndExpression: -/// shiftExpression ('&' shiftExpression)* | -/// super ('&' shiftExpression)+ -/// ; -/// bitwiseOperator: -/// '&' | -/// '^' | -/// '|' -/// ; -/// A bitwise expression is either a shift expression, or an invocation of a -/// bitwise operator on either super or an expression e1, with argument e2. -/// @description Checks that super can be used only as the first operand in a -/// bitwise expression. -/// @author msyabro - - -class S { - operator |(var val) {return this;} -} - -class A extends S { - test() { - try { - 1 | super; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} - } -} - -main() { - new A().test(); -} - +// 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 Bitwise expressions invoke the bitwise operators on objects. +/// bitwiseOrExpression: +/// bitwiseXorExpression ('|' bitwiseXorExpression)* | +/// super ('|' bitwiseXorExpression)+ +/// ; +/// bitwiseXorExpression: +/// bitwiseAndExpression ('^' bitwiseAndExpression)* | +/// super ('^' bitwiseAndExpression)+ +/// ; +/// bitwiseAndExpression: +/// shiftExpression ('&' shiftExpression)* | +/// super ('&' shiftExpression)+ +/// ; +/// bitwiseOperator: +/// '&' | +/// '^' | +/// '|' +/// ; +/// A bitwise expression is either a shift expression, or an invocation of a +/// bitwise operator on either super or an expression e1, with argument e2. +/// @description Checks that super can be used only as the first operand in a +/// bitwise expression. +/// @author msyabro + + +class S { + operator |(var val) {return this;} +} + +class A extends S { + test() { + try { + 1 | super; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} + } +} + +main() { + new A().test(); +} + diff --git a/Language/Expressions/Bitwise_Expressions/syntax_t03.dart b/Language/Expressions/Bitwise_Expressions/syntax_t03.dart index 87e7366963..1f8b56e13b 100644 --- a/Language/Expressions/Bitwise_Expressions/syntax_t03.dart +++ b/Language/Expressions/Bitwise_Expressions/syntax_t03.dart @@ -1,38 +1,38 @@ -// 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 Bitwise expressions invoke the bitwise operators on objects. -/// bitwiseOrExpression: -/// bitwiseXorExpression ('|' bitwiseXorExpression)* | -/// super ('|' bitwiseXorExpression)+ -/// ; -/// bitwiseXorExpression: -/// bitwiseAndExpression ('^' bitwiseAndExpression)* | -/// super ('^' bitwiseAndExpression)+ -/// ; -/// bitwiseAndExpression: -/// shiftExpression ('&' shiftExpression)* | -/// super ('&' shiftExpression)+ -/// ; -/// bitwiseOperator: -/// '&' | -/// '^' | -/// '|' -/// ; -/// A bitwise expression is either a shift expression, or an invocation of a -/// bitwise operator on either super or an expression e1, with argument e2. -/// @description Checks that an expression can't start with operator & -/// @author msyabro -/// @reviewer kaigorodov - - -main() { - try { - & 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} - +// 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 Bitwise expressions invoke the bitwise operators on objects. +/// bitwiseOrExpression: +/// bitwiseXorExpression ('|' bitwiseXorExpression)* | +/// super ('|' bitwiseXorExpression)+ +/// ; +/// bitwiseXorExpression: +/// bitwiseAndExpression ('^' bitwiseAndExpression)* | +/// super ('^' bitwiseAndExpression)+ +/// ; +/// bitwiseAndExpression: +/// shiftExpression ('&' shiftExpression)* | +/// super ('&' shiftExpression)+ +/// ; +/// bitwiseOperator: +/// '&' | +/// '^' | +/// '|' +/// ; +/// A bitwise expression is either a shift expression, or an invocation of a +/// bitwise operator on either super or an expression e1, with argument e2. +/// @description Checks that an expression can't start with operator & +/// @author msyabro +/// @reviewer kaigorodov + + +main() { + try { + & 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} + diff --git a/Language/Expressions/Bitwise_Expressions/syntax_t04.dart b/Language/Expressions/Bitwise_Expressions/syntax_t04.dart index c83fc87539..4dc6ee7d95 100644 --- a/Language/Expressions/Bitwise_Expressions/syntax_t04.dart +++ b/Language/Expressions/Bitwise_Expressions/syntax_t04.dart @@ -1,38 +1,38 @@ -// 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 Bitwise expressions invoke the bitwise operators on objects. -/// bitwiseOrExpression: -/// bitwiseXorExpression ('|' bitwiseXorExpression)* | -/// super ('|' bitwiseXorExpression)+ -/// ; -/// bitwiseXorExpression: -/// bitwiseAndExpression ('^' bitwiseAndExpression)* | -/// super ('^' bitwiseAndExpression)+ -/// ; -/// bitwiseAndExpression: -/// shiftExpression ('&' shiftExpression)* | -/// super ('&' shiftExpression)+ -/// ; -/// bitwiseOperator: -/// '&' | -/// '^' | -/// '|' -/// ; -/// A bitwise expression is either a shift expression, or an invocation of a -/// bitwise operator on either super or an expression e1, with argument e2. -/// @description Checks that an expression can't start with operator ^ -/// @author msyabro -/// @reviewer kaigorodov - - -main() { - try { - ^ true; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} - +// 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 Bitwise expressions invoke the bitwise operators on objects. +/// bitwiseOrExpression: +/// bitwiseXorExpression ('|' bitwiseXorExpression)* | +/// super ('|' bitwiseXorExpression)+ +/// ; +/// bitwiseXorExpression: +/// bitwiseAndExpression ('^' bitwiseAndExpression)* | +/// super ('^' bitwiseAndExpression)+ +/// ; +/// bitwiseAndExpression: +/// shiftExpression ('&' shiftExpression)* | +/// super ('&' shiftExpression)+ +/// ; +/// bitwiseOperator: +/// '&' | +/// '^' | +/// '|' +/// ; +/// A bitwise expression is either a shift expression, or an invocation of a +/// bitwise operator on either super or an expression e1, with argument e2. +/// @description Checks that an expression can't start with operator ^ +/// @author msyabro +/// @reviewer kaigorodov + + +main() { + try { + ^ true; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} + diff --git a/Language/Expressions/Bitwise_Expressions/syntax_t05.dart b/Language/Expressions/Bitwise_Expressions/syntax_t05.dart index 3ec2a2a100..e299ddab63 100644 --- a/Language/Expressions/Bitwise_Expressions/syntax_t05.dart +++ b/Language/Expressions/Bitwise_Expressions/syntax_t05.dart @@ -1,37 +1,37 @@ -// 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 Bitwise expressions invoke the bitwise operators on objects. -/// bitwiseOrExpression: -/// bitwiseXorExpression ('|' bitwiseXorExpression)* | -/// super ('|' bitwiseXorExpression)+ -/// ; -/// bitwiseXorExpression: -/// bitwiseAndExpression ('^' bitwiseAndExpression)* | -/// super ('^' bitwiseAndExpression)+ -/// ; -/// bitwiseAndExpression: -/// shiftExpression ('&' shiftExpression)* | -/// super ('&' shiftExpression)+ -/// ; -/// bitwiseOperator: -/// '&' | -/// '^' | -/// '|' -/// ; -/// A bitwise expression is either a shift expression, or an invocation of a -/// bitwise operator on either super or an expression e1, with argument e2. -/// @description Checks that an expression can't start with operator | -/// @author msyabro - - -main() { - try { - | ""; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} - +// 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 Bitwise expressions invoke the bitwise operators on objects. +/// bitwiseOrExpression: +/// bitwiseXorExpression ('|' bitwiseXorExpression)* | +/// super ('|' bitwiseXorExpression)+ +/// ; +/// bitwiseXorExpression: +/// bitwiseAndExpression ('^' bitwiseAndExpression)* | +/// super ('^' bitwiseAndExpression)+ +/// ; +/// bitwiseAndExpression: +/// shiftExpression ('&' shiftExpression)* | +/// super ('&' shiftExpression)+ +/// ; +/// bitwiseOperator: +/// '&' | +/// '^' | +/// '|' +/// ; +/// A bitwise expression is either a shift expression, or an invocation of a +/// bitwise operator on either super or an expression e1, with argument e2. +/// @description Checks that an expression can't start with operator | +/// @author msyabro + + +main() { + try { + | ""; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} + diff --git a/Language/Expressions/Bitwise_Expressions/syntax_t06.dart b/Language/Expressions/Bitwise_Expressions/syntax_t06.dart index 5b5a9ebcf4..54a5a7f328 100644 --- a/Language/Expressions/Bitwise_Expressions/syntax_t06.dart +++ b/Language/Expressions/Bitwise_Expressions/syntax_t06.dart @@ -1,37 +1,37 @@ -// 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 Bitwise expressions invoke the bitwise operators on objects. -/// bitwiseOrExpression: -/// bitwiseXorExpression ('|' bitwiseXorExpression)* | -/// super ('|' bitwiseXorExpression)+ -/// ; -/// bitwiseXorExpression: -/// bitwiseAndExpression ('^' bitwiseAndExpression)* | -/// super ('^' bitwiseAndExpression)+ -/// ; -/// bitwiseAndExpression: -/// shiftExpression ('&' shiftExpression)* | -/// super ('&' shiftExpression)+ -/// ; -/// bitwiseOperator: -/// '&' | -/// '^' | -/// '|' -/// ; -/// A bitwise expression is either a shift expression, or an invocation of a -/// bitwise operator on either super or an expression e1, with argument e2. -/// @description Checks that an expression can't terminate with operator & -/// @author msyabro - - -main() { - try { - 2 &; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} - +// 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 Bitwise expressions invoke the bitwise operators on objects. +/// bitwiseOrExpression: +/// bitwiseXorExpression ('|' bitwiseXorExpression)* | +/// super ('|' bitwiseXorExpression)+ +/// ; +/// bitwiseXorExpression: +/// bitwiseAndExpression ('^' bitwiseAndExpression)* | +/// super ('^' bitwiseAndExpression)+ +/// ; +/// bitwiseAndExpression: +/// shiftExpression ('&' shiftExpression)* | +/// super ('&' shiftExpression)+ +/// ; +/// bitwiseOperator: +/// '&' | +/// '^' | +/// '|' +/// ; +/// A bitwise expression is either a shift expression, or an invocation of a +/// bitwise operator on either super or an expression e1, with argument e2. +/// @description Checks that an expression can't terminate with operator & +/// @author msyabro + + +main() { + try { + 2 &; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} + diff --git a/Language/Expressions/Bitwise_Expressions/syntax_t07.dart b/Language/Expressions/Bitwise_Expressions/syntax_t07.dart index 83029de3a8..fc4c6717be 100644 --- a/Language/Expressions/Bitwise_Expressions/syntax_t07.dart +++ b/Language/Expressions/Bitwise_Expressions/syntax_t07.dart @@ -1,37 +1,37 @@ -// 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 Bitwise expressions invoke the bitwise operators on objects. -/// bitwiseOrExpression: -/// bitwiseXorExpression ('|' bitwiseXorExpression)* | -/// super ('|' bitwiseXorExpression)+ -/// ; -/// bitwiseXorExpression: -/// bitwiseAndExpression ('^' bitwiseAndExpression)* | -/// super ('^' bitwiseAndExpression)+ -/// ; -/// bitwiseAndExpression: -/// shiftExpression ('&' shiftExpression)* | -/// super ('&' shiftExpression)+ -/// ; -/// bitwiseOperator: -/// '&' | -/// '^' | -/// '|' -/// ; -/// A bitwise expression is either a shift expression, or an invocation of a -/// bitwise operator on either super or an expression e1, with argument e2. -/// @description Checks that an expression can't terminate with operator ^ -/// @author msyabro - - -main() { - try { - [] ^; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} - +// 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 Bitwise expressions invoke the bitwise operators on objects. +/// bitwiseOrExpression: +/// bitwiseXorExpression ('|' bitwiseXorExpression)* | +/// super ('|' bitwiseXorExpression)+ +/// ; +/// bitwiseXorExpression: +/// bitwiseAndExpression ('^' bitwiseAndExpression)* | +/// super ('^' bitwiseAndExpression)+ +/// ; +/// bitwiseAndExpression: +/// shiftExpression ('&' shiftExpression)* | +/// super ('&' shiftExpression)+ +/// ; +/// bitwiseOperator: +/// '&' | +/// '^' | +/// '|' +/// ; +/// A bitwise expression is either a shift expression, or an invocation of a +/// bitwise operator on either super or an expression e1, with argument e2. +/// @description Checks that an expression can't terminate with operator ^ +/// @author msyabro + + +main() { + try { + [] ^; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} + diff --git a/Language/Expressions/Bitwise_Expressions/syntax_t08.dart b/Language/Expressions/Bitwise_Expressions/syntax_t08.dart index c667c9f3aa..c1f6249973 100644 --- a/Language/Expressions/Bitwise_Expressions/syntax_t08.dart +++ b/Language/Expressions/Bitwise_Expressions/syntax_t08.dart @@ -1,37 +1,37 @@ -// 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 Bitwise expressions invoke the bitwise operators on objects. -/// bitwiseOrExpression: -/// bitwiseXorExpression ('|' bitwiseXorExpression)* | -/// super ('|' bitwiseXorExpression)+ -/// ; -/// bitwiseXorExpression: -/// bitwiseAndExpression ('^' bitwiseAndExpression)* | -/// super ('^' bitwiseAndExpression)+ -/// ; -/// bitwiseAndExpression: -/// shiftExpression ('&' shiftExpression)* | -/// super ('&' shiftExpression)+ -/// ; -/// bitwiseOperator: -/// '&' | -/// '^' | -/// '|' -/// ; -/// A bitwise expression is either a shift expression, or an invocation of a -/// bitwise operator on either super or an expression e1, with argument e2. -/// @description Checks that an expression can't terminate with operator | -/// @author msyabro - - -main() { - try { - {} |; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} - +// 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 Bitwise expressions invoke the bitwise operators on objects. +/// bitwiseOrExpression: +/// bitwiseXorExpression ('|' bitwiseXorExpression)* | +/// super ('|' bitwiseXorExpression)+ +/// ; +/// bitwiseXorExpression: +/// bitwiseAndExpression ('^' bitwiseAndExpression)* | +/// super ('^' bitwiseAndExpression)+ +/// ; +/// bitwiseAndExpression: +/// shiftExpression ('&' shiftExpression)* | +/// super ('&' shiftExpression)+ +/// ; +/// bitwiseOperator: +/// '&' | +/// '^' | +/// '|' +/// ; +/// A bitwise expression is either a shift expression, or an invocation of a +/// bitwise operator on either super or an expression e1, with argument e2. +/// @description Checks that an expression can't terminate with operator | +/// @author msyabro + + +main() { + try { + {} |; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} + diff --git a/Language/Expressions/Bitwise_Expressions/syntax_t09.dart b/Language/Expressions/Bitwise_Expressions/syntax_t09.dart index 2098d8d6cf..ad866233f3 100644 --- a/Language/Expressions/Bitwise_Expressions/syntax_t09.dart +++ b/Language/Expressions/Bitwise_Expressions/syntax_t09.dart @@ -1,37 +1,37 @@ -// 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 Bitwise expressions invoke the bitwise operators on objects. -/// bitwiseOrExpression: -/// bitwiseXorExpression ('|' bitwiseXorExpression)* | -/// super ('|' bitwiseXorExpression)+ -/// ; -/// bitwiseXorExpression: -/// bitwiseAndExpression ('^' bitwiseAndExpression)* | -/// super ('^' bitwiseAndExpression)+ -/// ; -/// bitwiseAndExpression: -/// shiftExpression ('&' shiftExpression)* | -/// super ('&' shiftExpression)+ -/// ; -/// bitwiseOperator: -/// '&' | -/// '^' | -/// '|' -/// ; -/// A bitwise expression is either a shift expression, or an invocation of a -/// bitwise operator on either super or an expression e1, with argument e2. -/// @description Checks that two operators & can't placed one after another. -/// @author msyabro - - -main() { - try { - 1 & & 2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} - +// 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 Bitwise expressions invoke the bitwise operators on objects. +/// bitwiseOrExpression: +/// bitwiseXorExpression ('|' bitwiseXorExpression)* | +/// super ('|' bitwiseXorExpression)+ +/// ; +/// bitwiseXorExpression: +/// bitwiseAndExpression ('^' bitwiseAndExpression)* | +/// super ('^' bitwiseAndExpression)+ +/// ; +/// bitwiseAndExpression: +/// shiftExpression ('&' shiftExpression)* | +/// super ('&' shiftExpression)+ +/// ; +/// bitwiseOperator: +/// '&' | +/// '^' | +/// '|' +/// ; +/// A bitwise expression is either a shift expression, or an invocation of a +/// bitwise operator on either super or an expression e1, with argument e2. +/// @description Checks that two operators & can't placed one after another. +/// @author msyabro + + +main() { + try { + 1 & & 2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} + diff --git a/Language/Expressions/Bitwise_Expressions/syntax_t10.dart b/Language/Expressions/Bitwise_Expressions/syntax_t10.dart index 92caaaaa07..e3cfba2503 100644 --- a/Language/Expressions/Bitwise_Expressions/syntax_t10.dart +++ b/Language/Expressions/Bitwise_Expressions/syntax_t10.dart @@ -1,37 +1,37 @@ -// 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 Bitwise expressions invoke the bitwise operators on objects. -/// bitwiseOrExpression: -/// bitwiseXorExpression ('|' bitwiseXorExpression)* | -/// super ('|' bitwiseXorExpression)+ -/// ; -/// bitwiseXorExpression: -/// bitwiseAndExpression ('^' bitwiseAndExpression)* | -/// super ('^' bitwiseAndExpression)+ -/// ; -/// bitwiseAndExpression: -/// shiftExpression ('&' shiftExpression)* | -/// super ('&' shiftExpression)+ -/// ; -/// bitwiseOperator: -/// '&' | -/// '^' | -/// '|' -/// ; -/// A bitwise expression is either a shift expression, or an invocation of a -/// bitwise operator on either super or an expression e1, with argument e2. -/// @description Checks that two operators ^ can't placed one after another. -/// @author msyabro - - -main() { - try { - 1 ^ ^ 2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} - +// 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 Bitwise expressions invoke the bitwise operators on objects. +/// bitwiseOrExpression: +/// bitwiseXorExpression ('|' bitwiseXorExpression)* | +/// super ('|' bitwiseXorExpression)+ +/// ; +/// bitwiseXorExpression: +/// bitwiseAndExpression ('^' bitwiseAndExpression)* | +/// super ('^' bitwiseAndExpression)+ +/// ; +/// bitwiseAndExpression: +/// shiftExpression ('&' shiftExpression)* | +/// super ('&' shiftExpression)+ +/// ; +/// bitwiseOperator: +/// '&' | +/// '^' | +/// '|' +/// ; +/// A bitwise expression is either a shift expression, or an invocation of a +/// bitwise operator on either super or an expression e1, with argument e2. +/// @description Checks that two operators ^ can't placed one after another. +/// @author msyabro + + +main() { + try { + 1 ^ ^ 2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} + diff --git a/Language/Expressions/Bitwise_Expressions/syntax_t11.dart b/Language/Expressions/Bitwise_Expressions/syntax_t11.dart index 7abbb31a2b..6b51e77ef8 100644 --- a/Language/Expressions/Bitwise_Expressions/syntax_t11.dart +++ b/Language/Expressions/Bitwise_Expressions/syntax_t11.dart @@ -1,37 +1,37 @@ -// 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 Bitwise expressions invoke the bitwise operators on objects. -/// bitwiseOrExpression: -/// bitwiseXorExpression ('|' bitwiseXorExpression)* | -/// super ('|' bitwiseXorExpression)+ -/// ; -/// bitwiseXorExpression: -/// bitwiseAndExpression ('^' bitwiseAndExpression)* | -/// super ('^' bitwiseAndExpression)+ -/// ; -/// bitwiseAndExpression: -/// shiftExpression ('&' shiftExpression)* | -/// super ('&' shiftExpression)+ -/// ; -/// bitwiseOperator: -/// '&' | -/// '^' | -/// '|' -/// ; -/// A bitwise expression is either a shift expression, or an invocation of a -/// bitwise operator on either super or an expression e1, with argument e2. -/// @description Checks that two operators | can't placed one after another. -/// @author msyabro - - -main() { - try { - 1 | | 2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} - +// 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 Bitwise expressions invoke the bitwise operators on objects. +/// bitwiseOrExpression: +/// bitwiseXorExpression ('|' bitwiseXorExpression)* | +/// super ('|' bitwiseXorExpression)+ +/// ; +/// bitwiseXorExpression: +/// bitwiseAndExpression ('^' bitwiseAndExpression)* | +/// super ('^' bitwiseAndExpression)+ +/// ; +/// bitwiseAndExpression: +/// shiftExpression ('&' shiftExpression)* | +/// super ('&' shiftExpression)+ +/// ; +/// bitwiseOperator: +/// '&' | +/// '^' | +/// '|' +/// ; +/// A bitwise expression is either a shift expression, or an invocation of a +/// bitwise operator on either super or an expression e1, with argument e2. +/// @description Checks that two operators | can't placed one after another. +/// @author msyabro + + +main() { + try { + 1 | | 2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} + diff --git a/Language/Expressions/Booleans/boolean_literals_t01.dart b/Language/Expressions/Booleans/boolean_literals_t01.dart index ac7989308e..07a42f81a9 100644 --- a/Language/Expressions/Booleans/boolean_literals_t01.dart +++ b/Language/Expressions/Booleans/boolean_literals_t01.dart @@ -1,24 +1,24 @@ -// 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 The reserved words true and false denote objects that represent -/// the boolean values true and false respectively. They are the boolean -/// literals. -/// booleanLiteral: -/// true | -/// false -/// ; -/// @description Checks that "true" is a reserved word (so it can't be used to -/// name a variable). -/// @author msyabro - - -main() { - try { - var true; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 The reserved words true and false denote objects that represent +/// the boolean values true and false respectively. They are the boolean +/// literals. +/// booleanLiteral: +/// true | +/// false +/// ; +/// @description Checks that "true" is a reserved word (so it can't be used to +/// name a variable). +/// @author msyabro + + +main() { + try { + var true; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Booleans/boolean_literals_t02.dart b/Language/Expressions/Booleans/boolean_literals_t02.dart index c636cedaaf..de93fe7127 100644 --- a/Language/Expressions/Booleans/boolean_literals_t02.dart +++ b/Language/Expressions/Booleans/boolean_literals_t02.dart @@ -1,23 +1,23 @@ -// 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 The reserved words true and false denote objects that represent -/// the boolean values true and false respectively. They are the boolean -/// literals. -/// booleanLiteral: -/// true | -/// false -/// ; -/// @description Checks that "false" is a reserved word. -/// @author msyabro - - -main() { - try { - var false; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 The reserved words true and false denote objects that represent +/// the boolean values true and false respectively. They are the boolean +/// literals. +/// booleanLiteral: +/// true | +/// false +/// ; +/// @description Checks that "false" is a reserved word. +/// @author msyabro + + +main() { + try { + var false; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Booleans/boolean_literals_t03.dart b/Language/Expressions/Booleans/boolean_literals_t03.dart index 20e63b2ec1..eed7f3a22f 100644 --- a/Language/Expressions/Booleans/boolean_literals_t03.dart +++ b/Language/Expressions/Booleans/boolean_literals_t03.dart @@ -1,23 +1,23 @@ -// 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 The reserved words true and false denote objects that represent -/// the boolean values true and false respectively. They are the boolean -/// literals. -/// booleanLiteral: -/// true | -/// false -/// ; -/// @description Checks that boolean literal can't be preceded by unary plus. -/// @author hlodvig - - -main() { - try { - +false; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 The reserved words true and false denote objects that represent +/// the boolean values true and false respectively. They are the boolean +/// literals. +/// booleanLiteral: +/// true | +/// false +/// ; +/// @description Checks that boolean literal can't be preceded by unary plus. +/// @author hlodvig + + +main() { + try { + +false; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Booleans/extend_or_implement_t01.dart b/Language/Expressions/Booleans/extend_or_implement_t01.dart index 8a2eba0363..d7a176069a 100644 --- a/Language/Expressions/Booleans/extend_or_implement_t01.dart +++ b/Language/Expressions/Booleans/extend_or_implement_t01.dart @@ -1,25 +1,25 @@ -// 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 It is a compile-time error for a class to attempt to extend, -/// mix in or implement bool. -/// @description Checks that it is a compile-time error when a user-defined -/// interface attempts to extend bool. -/// @author msyabro - - -abstract class I extends bool {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -class C implements I {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - new C(); - } catch (e) {} -} +// 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 It is a compile-time error for a class to attempt to extend, +/// mix in or implement bool. +/// @description Checks that it is a compile-time error when a user-defined +/// interface attempts to extend bool. +/// @author msyabro + + +abstract class I extends bool {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +class C implements I {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + new C(); + } catch (e) {} +} diff --git a/Language/Expressions/Booleans/extend_or_implement_t02.dart b/Language/Expressions/Booleans/extend_or_implement_t02.dart index 1741363a0d..feda25e8b8 100644 --- a/Language/Expressions/Booleans/extend_or_implement_t02.dart +++ b/Language/Expressions/Booleans/extend_or_implement_t02.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error for a class to attempt to extend, -/// mix in or implement bool. -/// @description Checks that it is a compile-time error when a user-defined -/// class attempts to implement bool. -/// @author msyabro - - -class C implements bool {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - new C(); - } catch (e) {} -} +// 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 It is a compile-time error for a class to attempt to extend, +/// mix in or implement bool. +/// @description Checks that it is a compile-time error when a user-defined +/// class attempts to implement bool. +/// @author msyabro + + +class C implements bool {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + new C(); + } catch (e) {} +} diff --git a/Language/Expressions/Booleans/extend_or_implement_t03.dart b/Language/Expressions/Booleans/extend_or_implement_t03.dart index f14480bac0..a684eb0093 100644 --- a/Language/Expressions/Booleans/extend_or_implement_t03.dart +++ b/Language/Expressions/Booleans/extend_or_implement_t03.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error for a class to attempt to extend, -/// mix in or implement bool. -/// @description Checks that it is a compile-time error when a user-defined -/// class attempts to extend bool. -/// @author msyabro - - -class C extends bool {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - new C(); - } catch (e) {} -} +// 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 It is a compile-time error for a class to attempt to extend, +/// mix in or implement bool. +/// @description Checks that it is a compile-time error when a user-defined +/// class attempts to extend bool. +/// @author msyabro + + +class C extends bool {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + new C(); + } catch (e) {} +} diff --git a/Language/Expressions/Booleans/extend_or_implement_t04.dart b/Language/Expressions/Booleans/extend_or_implement_t04.dart index 5832a14b79..aea06628e7 100644 --- a/Language/Expressions/Booleans/extend_or_implement_t04.dart +++ b/Language/Expressions/Booleans/extend_or_implement_t04.dart @@ -1,22 +1,22 @@ -// Copyright (c) 2015, 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 It is a compile-time error for a class to attempt to extend, -/// mix in or implement bool. -/// @description Checks that bool cannot be mixed in -/// @author sgrekhov@unipro.ru - - -class A {} - -class C extends A with bool {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - new C(); - } catch (e) {} -} +// Copyright (c) 2015, 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 It is a compile-time error for a class to attempt to extend, +/// mix in or implement bool. +/// @description Checks that bool cannot be mixed in +/// @author sgrekhov@unipro.ru + + +class A {} + +class C extends A with bool {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + new C(); + } catch (e) {} +} diff --git a/Language/Expressions/Booleans/extend_or_implement_t06.dart b/Language/Expressions/Booleans/extend_or_implement_t06.dart index ec9f3b0061..45c4133781 100644 --- a/Language/Expressions/Booleans/extend_or_implement_t06.dart +++ b/Language/Expressions/Booleans/extend_or_implement_t06.dart @@ -1,22 +1,22 @@ -// Copyright (c) 2015, 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 It is a compile-time error for a class to attempt to extend, -/// mix in or implement bool. -/// @description Checks that bool cannot be mixed in. Test class C = M form -/// @author sgrekhov@unipro.ru - - -class A {} - -class C = A with bool; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - new C(); - } catch (e) {} -} +// Copyright (c) 2015, 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 It is a compile-time error for a class to attempt to extend, +/// mix in or implement bool. +/// @description Checks that bool cannot be mixed in. Test class C = M form +/// @author sgrekhov@unipro.ru + + +class A {} + +class C = A with bool; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + new C(); + } catch (e) {} +} diff --git a/Language/Expressions/Conditional/syntax_t02.dart b/Language/Expressions/Conditional/syntax_t02.dart index 50451b54d2..d1c2292ba5 100644 --- a/Language/Expressions/Conditional/syntax_t02.dart +++ b/Language/Expressions/Conditional/syntax_t02.dart @@ -1,32 +1,32 @@ -// 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 conditional expression evaluates one of two expressions -/// based on a boolean condition. -/// conditionalExpression: -/// ifNullExpression ('?' expressionWithoutCascade ':' -/// expressionWithoutCascade)? -/// ; -/// @description Checks that super can't be used in a conditional expression -/// as the condition. -/// @author msyabro - - -class S {} - -class A extends S { - test() { - try { - super ? 1 : 2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} - } -} - -main() { - A a = new A(); - a.test(); -} +// 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 conditional expression evaluates one of two expressions +/// based on a boolean condition. +/// conditionalExpression: +/// ifNullExpression ('?' expressionWithoutCascade ':' +/// expressionWithoutCascade)? +/// ; +/// @description Checks that super can't be used in a conditional expression +/// as the condition. +/// @author msyabro + + +class S {} + +class A extends S { + test() { + try { + super ? 1 : 2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} + } +} + +main() { + A a = new A(); + a.test(); +} diff --git a/Language/Expressions/Conditional/syntax_t03.dart b/Language/Expressions/Conditional/syntax_t03.dart index 5572a10f9a..578f1dcdf6 100644 --- a/Language/Expressions/Conditional/syntax_t03.dart +++ b/Language/Expressions/Conditional/syntax_t03.dart @@ -1,32 +1,32 @@ -// 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 conditional expression evaluates one of two expressions -/// based on a boolean condition. -/// conditionalExpression: -/// ifNullExpression ('?' expressionWithoutCascade ':' -/// expressionWithoutCascade)? -/// ; -/// @description Checks that super can't be used in a conditional expression -/// as the first expression. -/// @author msyabro - - -class S {} - -class A extends S { - test() { - try { - true ? super : 2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} - } -} - -main() { - A a = new A(); - a.test(); -} +// 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 conditional expression evaluates one of two expressions +/// based on a boolean condition. +/// conditionalExpression: +/// ifNullExpression ('?' expressionWithoutCascade ':' +/// expressionWithoutCascade)? +/// ; +/// @description Checks that super can't be used in a conditional expression +/// as the first expression. +/// @author msyabro + + +class S {} + +class A extends S { + test() { + try { + true ? super : 2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} + } +} + +main() { + A a = new A(); + a.test(); +} diff --git a/Language/Expressions/Conditional/syntax_t04.dart b/Language/Expressions/Conditional/syntax_t04.dart index a9b5544db7..dfcd3dc3d6 100644 --- a/Language/Expressions/Conditional/syntax_t04.dart +++ b/Language/Expressions/Conditional/syntax_t04.dart @@ -1,32 +1,32 @@ -// 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 conditional expression evaluates one of two expressions -/// based on a boolean condition. -/// conditionalExpression: -/// ifNullExpression ('?' expressionWithoutCascade ':' -/// expressionWithoutCascade)? -/// ; -/// @description Checks that super can't be used in a conditional expression -/// as the second expression. -/// @author msyabro - - -class S {} - -class A extends S { - test() { - try { - true ? 1 : super; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} - } -} - -main() { - A a = new A(); - a.test(); -} +// 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 conditional expression evaluates one of two expressions +/// based on a boolean condition. +/// conditionalExpression: +/// ifNullExpression ('?' expressionWithoutCascade ':' +/// expressionWithoutCascade)? +/// ; +/// @description Checks that super can't be used in a conditional expression +/// as the second expression. +/// @author msyabro + + +class S {} + +class A extends S { + test() { + try { + true ? 1 : super; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} + } +} + +main() { + A a = new A(); + a.test(); +} diff --git a/Language/Expressions/Conditional/syntax_t05.dart b/Language/Expressions/Conditional/syntax_t05.dart index f1c1ab9596..bf0f83e4b3 100644 --- a/Language/Expressions/Conditional/syntax_t05.dart +++ b/Language/Expressions/Conditional/syntax_t05.dart @@ -1,22 +1,22 @@ -// 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 conditional expression evaluates one of two expressions -/// based on a boolean condition. -/// conditionalExpression: -/// ifNullExpression ('?' expressionWithoutCascade ':' -/// expressionWithoutCascade)? -/// ; -/// @description Checks that the second expression is necessary. -/// @author msyabro - - -main() { - try { - true ? 1 : ; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 conditional expression evaluates one of two expressions +/// based on a boolean condition. +/// conditionalExpression: +/// ifNullExpression ('?' expressionWithoutCascade ':' +/// expressionWithoutCascade)? +/// ; +/// @description Checks that the second expression is necessary. +/// @author msyabro + + +main() { + try { + true ? 1 : ; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Conditional/syntax_t06.dart b/Language/Expressions/Conditional/syntax_t06.dart index 3d77f87585..d7f10b5c4f 100644 --- a/Language/Expressions/Conditional/syntax_t06.dart +++ b/Language/Expressions/Conditional/syntax_t06.dart @@ -1,22 +1,22 @@ -// 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 conditional expression evaluates one of two expressions -/// based on a boolean condition. -/// conditionalExpression: -/// ifNullExpression ('?' expressionWithoutCascade ':' -/// expressionWithoutCascade)? -/// ; -/// @description Checks that the first expression is necessary. -/// @author msyabro - - -main() { - try { - true ? : 2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 conditional expression evaluates one of two expressions +/// based on a boolean condition. +/// conditionalExpression: +/// ifNullExpression ('?' expressionWithoutCascade ':' +/// expressionWithoutCascade)? +/// ; +/// @description Checks that the first expression is necessary. +/// @author msyabro + + +main() { + try { + true ? : 2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Conditional/syntax_t07.dart b/Language/Expressions/Conditional/syntax_t07.dart index bf27339f58..432ca6a72b 100644 --- a/Language/Expressions/Conditional/syntax_t07.dart +++ b/Language/Expressions/Conditional/syntax_t07.dart @@ -1,22 +1,22 @@ -// 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 conditional expression evaluates one of two expressions -/// based on a boolean condition. -/// conditionalExpression: -/// ifNullExpression ('?' expressionWithoutCascade ':' -/// expressionWithoutCascade)? -/// ; -/// @description Checks that the condition is necessary. -/// @author msyabro - - -main() { - try { - ? 1 : 2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 conditional expression evaluates one of two expressions +/// based on a boolean condition. +/// conditionalExpression: +/// ifNullExpression ('?' expressionWithoutCascade ':' +/// expressionWithoutCascade)? +/// ; +/// @description Checks that the condition is necessary. +/// @author msyabro + + +main() { + try { + ? 1 : 2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Conditional/syntax_t08.dart b/Language/Expressions/Conditional/syntax_t08.dart index 7d287ac8ff..03d5e68d08 100644 --- a/Language/Expressions/Conditional/syntax_t08.dart +++ b/Language/Expressions/Conditional/syntax_t08.dart @@ -1,22 +1,22 @@ -// 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 conditional expression evaluates one of two expressions -/// based on a boolean condition. -/// conditionalExpression: -/// ifNullExpression ('?' expressionWithoutCascade ':' -/// expressionWithoutCascade)? -/// ; -/// @description Checks that ':' expression is necessary. -/// @author msyabro - - -main() { - try { - true ? 1 2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 conditional expression evaluates one of two expressions +/// based on a boolean condition. +/// conditionalExpression: +/// ifNullExpression ('?' expressionWithoutCascade ':' +/// expressionWithoutCascade)? +/// ; +/// @description Checks that ':' expression is necessary. +/// @author msyabro + + +main() { + try { + true ? 1 2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Conditional/syntax_t09.dart b/Language/Expressions/Conditional/syntax_t09.dart index 8de0fb0a38..f43cb7787a 100644 --- a/Language/Expressions/Conditional/syntax_t09.dart +++ b/Language/Expressions/Conditional/syntax_t09.dart @@ -1,22 +1,22 @@ -// 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 conditional expression evaluates one of two expressions -/// based on a boolean condition. -/// conditionalExpression: -/// ifNullExpression ('?' expressionWithoutCascade ':' -/// expressionWithoutCascade)? -/// ; -/// @description Checks that '?' expression is necessary. -/// @author msyabro - - -main() { - try { - true 1 : 2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 conditional expression evaluates one of two expressions +/// based on a boolean condition. +/// conditionalExpression: +/// ifNullExpression ('?' expressionWithoutCascade ':' +/// expressionWithoutCascade)? +/// ; +/// @description Checks that '?' expression is necessary. +/// @author msyabro + + +main() { + try { + true 1 : 2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Conditional/syntax_t11.dart b/Language/Expressions/Conditional/syntax_t11.dart index f492e52d91..9e808a48e4 100644 --- a/Language/Expressions/Conditional/syntax_t11.dart +++ b/Language/Expressions/Conditional/syntax_t11.dart @@ -1,22 +1,22 @@ -// 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 conditional expression evaluates one of two expressions -/// based on a boolean condition. -/// conditionalExpression: -/// ifNullExpression ('?' expressionWithoutCascade ':' -/// expressionWithoutCascade)? -/// ; -/// @description Checks that a reference to a class declaration can be used -/// as one of expressions in a conditional expression without a compile error. -/// @author msyabro - - -class A {} - -main() { - try { - true ? 1 : A; - } catch (e) {} -} +// 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 conditional expression evaluates one of two expressions +/// based on a boolean condition. +/// conditionalExpression: +/// ifNullExpression ('?' expressionWithoutCascade ':' +/// expressionWithoutCascade)? +/// ; +/// @description Checks that a reference to a class declaration can be used +/// as one of expressions in a conditional expression without a compile error. +/// @author msyabro + + +class A {} + +main() { + try { + true ? 1 : A; + } catch (e) {} +} diff --git a/Language/Expressions/Conditional/syntax_t13.dart b/Language/Expressions/Conditional/syntax_t13.dart index 14f316a1cf..1e88df0a7e 100644 --- a/Language/Expressions/Conditional/syntax_t13.dart +++ b/Language/Expressions/Conditional/syntax_t13.dart @@ -1,23 +1,23 @@ -// 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 conditional expression evaluates one of two expressions -/// based on a boolean condition. -/// conditionalExpression: -/// ifNullExpression ('?' expressionWithoutCascade ':' -/// expressionWithoutCascade)? -/// ; -/// @description Checks that a reference to a type alias declaration can be -/// used as one of expressions in a conditional expression without a compile -/// error. -/// @author msyabro - - -typedef int fun(); - -main() { - try { - false ? fun : []; - } catch (e) {} -} +// 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 conditional expression evaluates one of two expressions +/// based on a boolean condition. +/// conditionalExpression: +/// ifNullExpression ('?' expressionWithoutCascade ':' +/// expressionWithoutCascade)? +/// ; +/// @description Checks that a reference to a type alias declaration can be +/// used as one of expressions in a conditional expression without a compile +/// error. +/// @author msyabro + + +typedef int fun(); + +main() { + try { + false ? fun : []; + } catch (e) {} +} diff --git a/Language/Expressions/Conditional/syntax_t15.dart b/Language/Expressions/Conditional/syntax_t15.dart index cce09c3d12..a906cad55f 100644 --- a/Language/Expressions/Conditional/syntax_t15.dart +++ b/Language/Expressions/Conditional/syntax_t15.dart @@ -1,27 +1,27 @@ -// 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 conditional expression evaluates one of two expressions -/// based on a boolean condition. -/// conditionalExpression: -/// ifNullExpression ('?' expressionWithoutCascade ':' -/// expressionWithoutCascade)? -/// ; -/// @description Checks that a type parameter can be used as one of expressions -/// in a conditional expression without a compile error. -/// @author msyabro - - -class A { - test() { - try { - true ? T : ''; - } catch (e) {} - } -} - -main() { - A a = new A(); - a.test(); -} +// 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 conditional expression evaluates one of two expressions +/// based on a boolean condition. +/// conditionalExpression: +/// ifNullExpression ('?' expressionWithoutCascade ':' +/// expressionWithoutCascade)? +/// ; +/// @description Checks that a type parameter can be used as one of expressions +/// in a conditional expression without a compile error. +/// @author msyabro + + +class A { + test() { + try { + true ? T : ''; + } catch (e) {} + } +} + +main() { + A a = new A(); + a.test(); +} diff --git a/Language/Expressions/Constants/bitwise_operators_t02.dart b/Language/Expressions/Constants/bitwise_operators_t02.dart index 7f7640091e..e55695980e 100644 --- a/Language/Expressions/Constants/bitwise_operators_t02.dart +++ b/Language/Expressions/Constants/bitwise_operators_t02.dart @@ -1,26 +1,26 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 | e2, e1 >> e2 -/// or e1 << e2, where e1 and e2 are constant expressions that evaluate to an -/// integer value or to null. -/// @description Checks that an expression of the form ~e cannot be used to -/// initialize a constant variable if e is boolean. -/// @author iefremov - - -const m = ~true; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (x) {} -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 | e2, e1 >> e2 +/// or e1 << e2, where e1 and e2 are constant expressions that evaluate to an +/// integer value or to null. +/// @description Checks that an expression of the form ~e cannot be used to +/// initialize a constant variable if e is boolean. +/// @author iefremov + + +const m = ~true; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/bitwise_operators_t03.dart b/Language/Expressions/Constants/bitwise_operators_t03.dart index 048506dddc..19d01a7f7e 100644 --- a/Language/Expressions/Constants/bitwise_operators_t03.dart +++ b/Language/Expressions/Constants/bitwise_operators_t03.dart @@ -1,26 +1,26 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 | e2, e1 >> e2 -/// or e1 << e2, where e1 and e2 are constant expressions that evaluate to an -/// integer value or to null. -/// @description Checks that it is a compile-time error when an expression of -/// the form e1 & e2 where e1 or e2 does not evaluate to an integer value, is -/// used to initialize a constant variable. -/// @author kaigorodov - -final constList = const [ - true & 1, -// ^ -// [analyzer] unspecified -// [cfe] unspecified -]; - -main() { - print(constList); -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 | e2, e1 >> e2 +/// or e1 << e2, where e1 and e2 are constant expressions that evaluate to an +/// integer value or to null. +/// @description Checks that it is a compile-time error when an expression of +/// the form e1 & e2 where e1 or e2 does not evaluate to an integer value, is +/// used to initialize a constant variable. +/// @author kaigorodov + +final constList = const [ + true & 1, +// ^ +// [analyzer] unspecified +// [cfe] unspecified +]; + +main() { + print(constList); +} diff --git a/Language/Expressions/Constants/bitwise_operators_t04.dart b/Language/Expressions/Constants/bitwise_operators_t04.dart index d8ac6f96cd..6c9cd9c53e 100644 --- a/Language/Expressions/Constants/bitwise_operators_t04.dart +++ b/Language/Expressions/Constants/bitwise_operators_t04.dart @@ -1,26 +1,26 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 | e2, e1 >> e2 -/// or e1 << e2, where e1 and e2 are constant expressions that evaluate to an -/// integer value or to null. -/// @description Checks that it is a compile-time error when an expression of -/// the form ~e where e does not evaluate to an integer value, is used to -/// initialize a constant variable. -/// @author kaigorodov - -final constList = const [ - ~"oneoneeleven" -//^ -// [analyzer] unspecified -// [cfe] unspecified -]; - -main() { - print(constList); -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 | e2, e1 >> e2 +/// or e1 << e2, where e1 and e2 are constant expressions that evaluate to an +/// integer value or to null. +/// @description Checks that it is a compile-time error when an expression of +/// the form ~e where e does not evaluate to an integer value, is used to +/// initialize a constant variable. +/// @author kaigorodov + +final constList = const [ + ~"oneoneeleven" +//^ +// [analyzer] unspecified +// [cfe] unspecified +]; + +main() { + print(constList); +} diff --git a/Language/Expressions/Constants/bitwise_operators_t05.dart b/Language/Expressions/Constants/bitwise_operators_t05.dart index 2061bbe2e0..d3ab9c53bd 100644 --- a/Language/Expressions/Constants/bitwise_operators_t05.dart +++ b/Language/Expressions/Constants/bitwise_operators_t05.dart @@ -1,26 +1,26 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 | e2, e1 >> e2 -/// or e1 << e2, where e1 and e2 are constant expressions that evaluate to an -/// integer value or to null. -/// @description Checks that it is a compile-time error when an expression of -/// the form e1 << e2 where e1 or e2 does not evaluate to an integer value, is -/// used to initialize a constant variable. -/// @author kaigorodov - -final constList = const [ - 1 << "one and a half" -// ^ -// [analyzer] unspecified -// [cfe] unspecified -]; - -main() { - print(constList); -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 | e2, e1 >> e2 +/// or e1 << e2, where e1 and e2 are constant expressions that evaluate to an +/// integer value or to null. +/// @description Checks that it is a compile-time error when an expression of +/// the form e1 << e2 where e1 or e2 does not evaluate to an integer value, is +/// used to initialize a constant variable. +/// @author kaigorodov + +final constList = const [ + 1 << "one and a half" +// ^ +// [analyzer] unspecified +// [cfe] unspecified +]; + +main() { + print(constList); +} diff --git a/Language/Expressions/Constants/bitwise_operators_t06.dart b/Language/Expressions/Constants/bitwise_operators_t06.dart index a45002a448..9bad94602d 100644 --- a/Language/Expressions/Constants/bitwise_operators_t06.dart +++ b/Language/Expressions/Constants/bitwise_operators_t06.dart @@ -1,26 +1,26 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 | e2, e1 >> e2 -/// or e1 << e2, where e1 and e2 are constant expressions that evaluate to an -/// integer value or to null. -/// @description Checks that it is a compile-time error when an expression of -/// the form e1 >> e2 where e1 or e2 does not evaluate to an integer value, is -/// used to initialize a constant variable. -/// @author kaigorodov - -final constList = const [ - true >> 25 -// ^ -// [analyzer] unspecified -// [cfe] unspecified -]; - -main() { - print(constList); -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • An expression of one of the forms ~e, e1 ^ e2, e1 & e2, e1 | e2, e1 >> e2 +/// or e1 << e2, where e1 and e2 are constant expressions that evaluate to an +/// integer value or to null. +/// @description Checks that it is a compile-time error when an expression of +/// the form e1 >> e2 where e1 or e2 does not evaluate to an integer value, is +/// used to initialize a constant variable. +/// @author kaigorodov + +final constList = const [ + true >> 25 +// ^ +// [analyzer] unspecified +// [cfe] unspecified +]; + +main() { + print(constList); +} diff --git a/Language/Expressions/Constants/constant_list_t02.dart b/Language/Expressions/Constants/constant_list_t02.dart index 87d1eabebd..81ca035302 100644 --- a/Language/Expressions/Constants/constant_list_t02.dart +++ b/Language/Expressions/Constants/constant_list_t02.dart @@ -1,26 +1,26 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • A constant list literal. -/// @description Checks that a non-constant list literal cannot be assigned to -/// a constant variable. -/// @author iefremov -/// @reviewer rodionov - - -var nonconstant = [1, 2, 3]; -const a = nonconstant; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(a); - } catch (x) {} -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • A constant list literal. +/// @description Checks that a non-constant list literal cannot be assigned to +/// a constant variable. +/// @author iefremov +/// @reviewer rodionov + + +var nonconstant = [1, 2, 3]; +const a = nonconstant; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(a); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/constant_map_t02.dart b/Language/Expressions/Constants/constant_map_t02.dart index f9482fe5fd..fc2de39b63 100644 --- a/Language/Expressions/Constants/constant_map_t02.dart +++ b/Language/Expressions/Constants/constant_map_t02.dart @@ -1,25 +1,25 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • A constant map literal. -/// @description Checks that a non-constant map literal cannot be assigned to -/// a constant variable. -/// @author iefremov - - -var b = {"a" : "b"}; -const a = b; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(a); - } catch (x) {} -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • A constant map literal. +/// @description Checks that a non-constant map literal cannot be assigned to +/// a constant variable. +/// @author iefremov + + +var b = {"a" : "b"}; +const a = b; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(a); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/depending_on_itself_t01.dart b/Language/Expressions/Constants/depending_on_itself_t01.dart index 9d4bed7eeb..ab27dcc688 100644 --- a/Language/Expressions/Constants/depending_on_itself_t01.dart +++ b/Language/Expressions/Constants/depending_on_itself_t01.dart @@ -1,20 +1,20 @@ -// 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 It is a compile-time error if the value of a compile-time -/// constant expression depends on itself. -/// @description Checks that it is a compile-time error if a constant variable -/// is initialized with itself. - - -const m = m; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (x) {} -} +// 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 It is a compile-time error if the value of a compile-time +/// constant expression depends on itself. +/// @description Checks that it is a compile-time error if a constant variable +/// is initialized with itself. + + +const m = m; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/depending_on_itself_t03.dart b/Language/Expressions/Constants/depending_on_itself_t03.dart index 814497d9a0..c40ca39c2d 100644 --- a/Language/Expressions/Constants/depending_on_itself_t03.dart +++ b/Language/Expressions/Constants/depending_on_itself_t03.dart @@ -1,25 +1,25 @@ -// 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 It is a compile-time error if the value of a compile-time -/// constant expression depends on itself. -/// @description Checks that it is a compile-time error if a final instance -/// field depends on a const constructor and vice versa. -/// @author iefremov - - -class A { - const A(); - final m = const A(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - - -main() { - try { - const A(); - } catch (x) {} -} +// 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 It is a compile-time error if the value of a compile-time +/// constant expression depends on itself. +/// @description Checks that it is a compile-time error if a final instance +/// field depends on a const constructor and vice versa. +/// @author iefremov + + +class A { + const A(); + final m = const A(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + + +main() { + try { + const A(); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/equals_expression_t02.dart b/Language/Expressions/Constants/equals_expression_t02.dart index 31c89674fc..89267d7f76 100644 --- a/Language/Expressions/Constants/equals_expression_t02.dart +++ b/Language/Expressions/Constants/equals_expression_t02.dart @@ -1,32 +1,32 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • An expression of one of the forms e1 == e2 or e1 != e2 where e1 and e2 are -/// constant expressions that evaluate to a numeric, string or boolean value -/// or to null. -/// @description Checks that an expression of the form e1 == e2 cannot be used -/// to initialize a constant variable if e1 does not evaluate to a numeric, -/// string or boolean value. -/// @author iefremov - - -class A { - const A(); -} - -final a = const A(); -const m = (a == 1); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (x) {} -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • An expression of one of the forms e1 == e2 or e1 != e2 where e1 and e2 are +/// constant expressions that evaluate to a numeric, string or boolean value +/// or to null. +/// @description Checks that an expression of the form e1 == e2 cannot be used +/// to initialize a constant variable if e1 does not evaluate to a numeric, +/// string or boolean value. +/// @author iefremov + + +class A { + const A(); +} + +final a = const A(); +const m = (a == 1); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/equals_expression_t03.dart b/Language/Expressions/Constants/equals_expression_t03.dart index 8e8ff46721..61565be2a9 100644 --- a/Language/Expressions/Constants/equals_expression_t03.dart +++ b/Language/Expressions/Constants/equals_expression_t03.dart @@ -1,45 +1,45 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • An expression of the form e1 == e2 is potentially constant if e1 and e2 -/// are both potentially constant expressions. It is further constant if both -/// e1 and e2 are constant, and either e2 evaluates to the null object -/// -/// @description Checks that it is not an error when an expression of the form -/// e1 == e2 or e1 != e2 is used to initialize a constant variable and both `e1` -/// and `e2` are potentially constant expressions. -/// @author kaigorodov - -class A { - const A() : a = "hello"; - final a; -} - -class B { - final x; - const B(this.x); - @override - bool operator ==(Object other) { - if (other is B) { - return this.x == other.x; - } - return false; - } -} - -final constList = const [ - const A() == "hello", - const A() != "world", - 3.14 == A(), - B(1) == null, - A() != null -]; - -main() { - print(constList); -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • An expression of the form e1 == e2 is potentially constant if e1 and e2 +/// are both potentially constant expressions. It is further constant if both +/// e1 and e2 are constant, and either e2 evaluates to the null object +/// +/// @description Checks that it is not an error when an expression of the form +/// e1 == e2 or e1 != e2 is used to initialize a constant variable and both `e1` +/// and `e2` are potentially constant expressions. +/// @author kaigorodov + +class A { + const A() : a = "hello"; + final a; +} + +class B { + final x; + const B(this.x); + @override + bool operator ==(Object other) { + if (other is B) { + return this.x == other.x; + } + return false; + } +} + +final constList = const [ + const A() == "hello", + const A() != "world", + 3.14 == A(), + B(1) == null, + A() != null +]; + +main() { + print(constList); +} diff --git a/Language/Expressions/Constants/exception_t01.dart b/Language/Expressions/Constants/exception_t01.dart index 25595f52d9..e9be232d60 100644 --- a/Language/Expressions/Constants/exception_t01.dart +++ b/Language/Expressions/Constants/exception_t01.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if an expression is required to be a -/// constant expression but its evaluation would raise an exception. -/// @description Checks that an IntegerDivisionByZeroException raised during -/// evaluation of a compile-time constant causes a compile-time error. -/// @author iefremov - - -const m = 1 % 0; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (anything) {} -} +// 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 It is a compile-time error if an expression is required to be a +/// constant expression but its evaluation would raise an exception. +/// @description Checks that an IntegerDivisionByZeroException raised during +/// evaluation of a compile-time constant causes a compile-time error. +/// @author iefremov + + +const m = 1 % 0; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (anything) {} +} diff --git a/Language/Expressions/Constants/exception_t02.dart b/Language/Expressions/Constants/exception_t02.dart index 20d53e5e41..b67f6b9eff 100644 --- a/Language/Expressions/Constants/exception_t02.dart +++ b/Language/Expressions/Constants/exception_t02.dart @@ -1,19 +1,19 @@ -// 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 It is a compile-time error if an expression is required to be a -/// constant expression but its evaluation would raise an exception. -/// @description Checks that an Exception raised during evaluation of -/// a compile-time constant causes a compile-time error. -/// @author iefremov - - -const m = 1 ~/ 0; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(m); -} +// 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 It is a compile-time error if an expression is required to be a +/// constant expression but its evaluation would raise an exception. +/// @description Checks that an Exception raised during evaluation of +/// a compile-time constant causes a compile-time error. +/// @author iefremov + + +const m = 1 ~/ 0; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(m); +} diff --git a/Language/Expressions/Constants/literal_string_t02.dart b/Language/Expressions/Constants/literal_string_t02.dart index 084acf2502..dcc75df6d5 100644 --- a/Language/Expressions/Constants/literal_string_t02.dart +++ b/Language/Expressions/Constants/literal_string_t02.dart @@ -1,23 +1,23 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • A literal string where any interpolated expression is a compile-time -/// constant that evaluates to a numeric, string or boolean value or to null. -/// @description Checks that a string literal that involves string interpolation, -/// that is a constant expression not evaluated to numeric, string or boolean -/// value, cannot be assigned to a constant variable. -/// @author iefremov - -const l = "${const {'k1': 1, 'k2': 2}}"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(l); -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • A literal string where any interpolated expression is a compile-time +/// constant that evaluates to a numeric, string or boolean value or to null. +/// @description Checks that a string literal that involves string interpolation, +/// that is a constant expression not evaluated to numeric, string or boolean +/// value, cannot be assigned to a constant variable. +/// @author iefremov + +const l = "${const {'k1': 1, 'k2': 2}}"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(l); +} diff --git a/Language/Expressions/Constants/literal_string_t03.dart b/Language/Expressions/Constants/literal_string_t03.dart index 7ea56df8a9..f815e43b54 100644 --- a/Language/Expressions/Constants/literal_string_t03.dart +++ b/Language/Expressions/Constants/literal_string_t03.dart @@ -1,25 +1,25 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • A literal string where any interpolated expression is a compile-time -/// constant that evaluates to a numeric, string or boolean value or to null. -/// @description Checks that a string literal that involves string interpolation, -/// that evaluates to a numeric value, but not a constant expression, -/// cannot be assigned to a constant variable. -/// @author msyabro - -foo() => 1; - -const i1 = "${foo()}"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(i1); -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • A literal string where any interpolated expression is a compile-time +/// constant that evaluates to a numeric, string or boolean value or to null. +/// @description Checks that a string literal that involves string interpolation, +/// that evaluates to a numeric value, but not a constant expression, +/// cannot be assigned to a constant variable. +/// @author msyabro + +foo() => 1; + +const i1 = "${foo()}"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(i1); +} diff --git a/Language/Expressions/Constants/literal_string_t04.dart b/Language/Expressions/Constants/literal_string_t04.dart index d0394f16ff..b2ff8db728 100644 --- a/Language/Expressions/Constants/literal_string_t04.dart +++ b/Language/Expressions/Constants/literal_string_t04.dart @@ -1,24 +1,24 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • A literal string where any interpolated expression is a compile-time -/// constant that evaluates to a numeric, string or boolean value or to null. -/// @description Checks that a string literal that involves string interpolation, -/// that evaluates to a bool value and is a constant expression can be assigned -/// to a constant variable. -/// @author msyabro - -import "../../../Utils/expect.dart"; - -const i1 = "${1 is int}"; -const i2 = "${1 is String}"; - -main() { - Expect.equals("true", i1); - Expect.equals("false", i2); -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • A literal string where any interpolated expression is a compile-time +/// constant that evaluates to a numeric, string or boolean value or to null. +/// @description Checks that a string literal that involves string interpolation, +/// that evaluates to a bool value and is a constant expression can be assigned +/// to a constant variable. +/// @author msyabro + +import "../../../Utils/expect.dart"; + +const i1 = "${1 is int}"; +const i2 = "${1 is String}"; + +main() { + Expect.equals("true", i1); + Expect.equals("false", i2); +} diff --git a/Language/Expressions/Constants/literal_string_t05.dart b/Language/Expressions/Constants/literal_string_t05.dart index fe98ad6064..39b1fcd764 100644 --- a/Language/Expressions/Constants/literal_string_t05.dart +++ b/Language/Expressions/Constants/literal_string_t05.dart @@ -1,23 +1,23 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • A literal string where any interpolated expression is a compile-time -/// constant that evaluates to a numeric, string or boolean value or to null. -/// @description Checks that a string literal that involves string interpolation, -/// that evaluates to a string value, but not a constant expression, cannot be -/// assigned to a constant variable. -/// @author msyabro - -const i1 = "${1.toString()}"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(i1); -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • A literal string where any interpolated expression is a compile-time +/// constant that evaluates to a numeric, string or boolean value or to null. +/// @description Checks that a string literal that involves string interpolation, +/// that evaluates to a string value, but not a constant expression, cannot be +/// assigned to a constant variable. +/// @author msyabro + +const i1 = "${1.toString()}"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(i1); +} diff --git a/Language/Expressions/Constants/logical_expression_t02.dart b/Language/Expressions/Constants/logical_expression_t02.dart index 56d66c9838..2f6da0079b 100644 --- a/Language/Expressions/Constants/logical_expression_t02.dart +++ b/Language/Expressions/Constants/logical_expression_t02.dart @@ -1,25 +1,25 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • An expression of one of the forms !e, e1 && e2 or e1 || e2, where e, e1 -/// and e2 are constant expressions that evaluate to a boolean value. -/// @description Checks that an expression of the form !e cannot be used to -/// initialize a constant variable if e does not evaluate to a boolean value. -/// @author iefremov - - -const m = !1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (x) {} -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • An expression of one of the forms !e, e1 && e2 or e1 || e2, where e, e1 +/// and e2 are constant expressions that evaluate to a boolean value. +/// @description Checks that an expression of the form !e cannot be used to +/// initialize a constant variable if e does not evaluate to a boolean value. +/// @author iefremov + + +const m = !1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/logical_expression_t03.dart b/Language/Expressions/Constants/logical_expression_t03.dart index 6e4cdb97ca..937f076212 100644 --- a/Language/Expressions/Constants/logical_expression_t03.dart +++ b/Language/Expressions/Constants/logical_expression_t03.dart @@ -1,25 +1,25 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • An expression of one of the forms !e, e1 && e2 or e1 || e2, where e, e1 -/// and e2 are constant expressions that evaluate to a boolean value. -/// @description Checks that an expression of the form e1 || e2 cannot be used -/// to initialize a constant variable if e2 is integer. -/// @author iefremov - - -const m = (true || 0); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (x) {} -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • An expression of one of the forms !e, e1 && e2 or e1 || e2, where e, e1 +/// and e2 are constant expressions that evaluate to a boolean value. +/// @description Checks that an expression of the form e1 || e2 cannot be used +/// to initialize a constant variable if e2 is integer. +/// @author iefremov + + +const m = (true || 0); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/logical_expression_t04.dart b/Language/Expressions/Constants/logical_expression_t04.dart index ff4ffa4b8c..b2c65c3552 100644 --- a/Language/Expressions/Constants/logical_expression_t04.dart +++ b/Language/Expressions/Constants/logical_expression_t04.dart @@ -1,25 +1,25 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • An expression of one of the forms !e, e1 && e2 or e1 || e2, where e, e1 -/// and e2 are constant expressions that evaluate to a boolean value. -/// @description Checks that it is a compile-time error when an expression of -/// the form e1 && e2 where e1 or e2 does not evaluate to a boolean value, is -/// used to initialize a constant variable. -/// @author kaigorodov - -final constList = const [ - true && 1, -// ^ -// [analyzer] unspecified -// [cfe] unspecified -]; - -main() { - print(constList); -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • An expression of one of the forms !e, e1 && e2 or e1 || e2, where e, e1 +/// and e2 are constant expressions that evaluate to a boolean value. +/// @description Checks that it is a compile-time error when an expression of +/// the form e1 && e2 where e1 or e2 does not evaluate to a boolean value, is +/// used to initialize a constant variable. +/// @author kaigorodov + +final constList = const [ + true && 1, +// ^ +// [analyzer] unspecified +// [cfe] unspecified +]; + +main() { + print(constList); +} diff --git a/Language/Expressions/Constants/math_operators_t02.dart b/Language/Expressions/Constants/math_operators_t02.dart index 837668ab68..a9fd63c0f1 100644 --- a/Language/Expressions/Constants/math_operators_t02.dart +++ b/Language/Expressions/Constants/math_operators_t02.dart @@ -1,28 +1,28 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • An expression of the form e1 + e2 where e1 and e2 are constant expressions -/// that evaluate to a numeric or string value or to null. -/// • An expression of one of the forms −e, e1 - e2, e1 * e2, e1 / e2, e1 ˜/ e2, -/// e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are -/// constant expressions that evaluate to a numeric value or to null. -/// @description Checks that an expression of the form e1 + e2 cannot be used to -/// initialize a constant variable if e1 is integer and e2 is a string. -/// @author iefremov - - -const m = 1 + ""; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (x) {} -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • An expression of the form e1 + e2 where e1 and e2 are constant expressions +/// that evaluate to a numeric or string value or to null. +/// • An expression of one of the forms −e, e1 - e2, e1 * e2, e1 / e2, e1 ˜/ e2, +/// e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are +/// constant expressions that evaluate to a numeric value or to null. +/// @description Checks that an expression of the form e1 + e2 cannot be used to +/// initialize a constant variable if e1 is integer and e2 is a string. +/// @author iefremov + + +const m = 1 + ""; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/math_operators_t03.dart b/Language/Expressions/Constants/math_operators_t03.dart index 6f110f7a41..e90a6637ed 100644 --- a/Language/Expressions/Constants/math_operators_t03.dart +++ b/Language/Expressions/Constants/math_operators_t03.dart @@ -1,28 +1,28 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • An expression of the form e1 + e2 where e1 and e2 are constant expressions -/// that evaluate to a numeric or string value or to null. -/// • An expression of one of the forms −e, e1 - e2, e1 * e2, e1 / e2, e1 ˜/ e2, -/// e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are -/// constant expressions that evaluate to a numeric value or to null. -/// @description Checks that an expression of the form e1 - e2 cannot be used to -/// initialize a constant variable if e2 is string. -/// @author iefremov - - -const m = 1 - "1"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (x) {} -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • An expression of the form e1 + e2 where e1 and e2 are constant expressions +/// that evaluate to a numeric or string value or to null. +/// • An expression of one of the forms −e, e1 - e2, e1 * e2, e1 / e2, e1 ˜/ e2, +/// e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are +/// constant expressions that evaluate to a numeric value or to null. +/// @description Checks that an expression of the form e1 - e2 cannot be used to +/// initialize a constant variable if e2 is string. +/// @author iefremov + + +const m = 1 - "1"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/math_operators_t04.dart b/Language/Expressions/Constants/math_operators_t04.dart index dfaaac30b5..3af5a6cb08 100644 --- a/Language/Expressions/Constants/math_operators_t04.dart +++ b/Language/Expressions/Constants/math_operators_t04.dart @@ -1,28 +1,28 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • An expression of the form e1 + e2 where e1 and e2 are constant expressions -/// that evaluate to a numeric or string value or to null. -/// • An expression of one of the forms −e, e1 - e2, e1 * e2, e1 / e2, e1 ˜/ e2, -/// e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are -/// constant expressions that evaluate to a numeric value or to null. -/// @description Checks that an expression of the form e1 <= e2 cannot be used -/// to initialize a constant variable if e1 is a string. -/// @author iefremov - - -const m = "1" <= 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (x) {} -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • An expression of the form e1 + e2 where e1 and e2 are constant expressions +/// that evaluate to a numeric or string value or to null. +/// • An expression of one of the forms −e, e1 - e2, e1 * e2, e1 / e2, e1 ˜/ e2, +/// e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are +/// constant expressions that evaluate to a numeric value or to null. +/// @description Checks that an expression of the form e1 <= e2 cannot be used +/// to initialize a constant variable if e1 is a string. +/// @author iefremov + + +const m = "1" <= 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/math_operators_t05.dart b/Language/Expressions/Constants/math_operators_t05.dart index 47f9e8922c..4a1d7846e2 100644 --- a/Language/Expressions/Constants/math_operators_t05.dart +++ b/Language/Expressions/Constants/math_operators_t05.dart @@ -1,27 +1,27 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • An expression of the form e1 + e2 where e1 and e2 are constant expressions -/// that evaluate to a numeric or string value or to null. -/// • An expression of one of the forms −e, e1 - e2, e1 * e2, e1 / e2, e1 ˜/ e2, -/// e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are -/// constant expressions that evaluate to a numeric value or to null. -/// @description Checks that it is a compile-time error when an expression of -/// the form e1 + e2 where e1 or e2 does not evaluate to a numeric value, is -/// used to initialize a constant variable. - -final constList = const [ - true + 1, -// ^ -// [analyzer] unspecified -// [cfe] unspecified -]; - -main() { - print(constList); -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • An expression of the form e1 + e2 where e1 and e2 are constant expressions +/// that evaluate to a numeric or string value or to null. +/// • An expression of one of the forms −e, e1 - e2, e1 * e2, e1 / e2, e1 ˜/ e2, +/// e1 > e2, e1 < e2, e1 >= e2, e1 <= e2 or e1 % e2, where e, e1 and e2 are +/// constant expressions that evaluate to a numeric value or to null. +/// @description Checks that it is a compile-time error when an expression of +/// the form e1 + e2 where e1 or e2 does not evaluate to a numeric value, is +/// used to initialize a constant variable. + +final constList = const [ + true + 1, +// ^ +// [analyzer] unspecified +// [cfe] unspecified +]; + +main() { + print(constList); +} diff --git a/Language/Expressions/Constants/no_other_constant_expressions_t06.dart b/Language/Expressions/Constants/no_other_constant_expressions_t06.dart index 5bb879e1de..13aeea95a5 100644 --- a/Language/Expressions/Constants/no_other_constant_expressions_t06.dart +++ b/Language/Expressions/Constants/no_other_constant_expressions_t06.dart @@ -1,21 +1,21 @@ -// 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 There are no other constant expressions. -/// @description Checks that a new expression cannot be used to initialize -/// a constant variable. -/// @author iefremov - - -class A {} -const a = new A(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(a); - } catch (x) {} -} +// 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 There are no other constant expressions. +/// @description Checks that a new expression cannot be used to initialize +/// a constant variable. +/// @author iefremov + + +class A {} +const a = new A(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(a); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/no_other_constant_expressions_t07.dart b/Language/Expressions/Constants/no_other_constant_expressions_t07.dart index c34d14fb3a..4a4a790ede 100644 --- a/Language/Expressions/Constants/no_other_constant_expressions_t07.dart +++ b/Language/Expressions/Constants/no_other_constant_expressions_t07.dart @@ -1,23 +1,23 @@ -// 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 There are no other constant expressions. -/// @description Checks that a new expression invoking a const constructor -/// cannot be used to initialize a constant variable. -/// @author iefremov - - -class A { - const A(); -} -const a = new A(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(a); - } catch (x) {} -} +// 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 There are no other constant expressions. +/// @description Checks that a new expression invoking a const constructor +/// cannot be used to initialize a constant variable. +/// @author iefremov + + +class A { + const A(); +} +const a = new A(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(a); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/no_other_constant_expressions_t08.dart b/Language/Expressions/Constants/no_other_constant_expressions_t08.dart index f02a4dbcbd..be32c34021 100644 --- a/Language/Expressions/Constants/no_other_constant_expressions_t08.dart +++ b/Language/Expressions/Constants/no_other_constant_expressions_t08.dart @@ -1,26 +1,26 @@ -// 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 There are no other constant expressions. -/// @description Checks that a property extraction expression cannot be used to -/// initialize a constant variable. -/// @author iefremov - - -class A { - const A(); - m() {} -} - -final a = const A(); -const m = a.m; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (x) {} -} +// 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 There are no other constant expressions. +/// @description Checks that a property extraction expression cannot be used to +/// initialize a constant variable. +/// @author iefremov + + +class A { + const A(); + m() {} +} + +final a = const A(); +const m = a.m; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/no_other_constant_expressions_t09.dart b/Language/Expressions/Constants/no_other_constant_expressions_t09.dart index eaf41c5b13..c2477eb196 100644 --- a/Language/Expressions/Constants/no_other_constant_expressions_t09.dart +++ b/Language/Expressions/Constants/no_other_constant_expressions_t09.dart @@ -1,26 +1,26 @@ -// 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 There are no other constant expressions. -/// @description Checks that a method invocation expression cannot be used to -/// initialize a constant variable. -/// @author iefremov - - -class A { - const A(); - m() {} -} - -final a = const A(); -const m = a.m(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (x) {} -} +// 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 There are no other constant expressions. +/// @description Checks that a method invocation expression cannot be used to +/// initialize a constant variable. +/// @author iefremov + + +class A { + const A(); + m() {} +} + +final a = const A(); +const m = a.m(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/no_other_constant_expressions_t10.dart b/Language/Expressions/Constants/no_other_constant_expressions_t10.dart index ba3e361eed..420c2d7d96 100644 --- a/Language/Expressions/Constants/no_other_constant_expressions_t10.dart +++ b/Language/Expressions/Constants/no_other_constant_expressions_t10.dart @@ -1,24 +1,24 @@ -// 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 There are no other constant expressions. -/// @description Checks that a method invocation expression cannot be used to -/// initialize a constant variable. -/// @author iefremov - - -class A { - static m() {} -} - -const m = A.m(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (x) {} -} +// 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 There are no other constant expressions. +/// @description Checks that a method invocation expression cannot be used to +/// initialize a constant variable. +/// @author iefremov + + +class A { + static m() {} +} + +const m = A.m(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/no_other_constant_expressions_t11.dart b/Language/Expressions/Constants/no_other_constant_expressions_t11.dart index 5ceb2e5639..e4d23dacd8 100644 --- a/Language/Expressions/Constants/no_other_constant_expressions_t11.dart +++ b/Language/Expressions/Constants/no_other_constant_expressions_t11.dart @@ -1,24 +1,24 @@ -// 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 There are no other constant expressions. -/// @description Checks that a getter invocation expression cannot be used to -/// initialize a constant variable. -/// @author iefremov - - -class A { - static get m {} -} - -const m = A.m; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (x) {} -} +// 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 There are no other constant expressions. +/// @description Checks that a getter invocation expression cannot be used to +/// initialize a constant variable. +/// @author iefremov + + +class A { + static get m {} +} + +const m = A.m; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/no_other_constant_expressions_t12.dart b/Language/Expressions/Constants/no_other_constant_expressions_t12.dart index bdfce109a9..09f0dd4091 100644 --- a/Language/Expressions/Constants/no_other_constant_expressions_t12.dart +++ b/Language/Expressions/Constants/no_other_constant_expressions_t12.dart @@ -1,26 +1,26 @@ -// 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 There are no other constant expressions. -/// @description Checks that a getter invocation expression cannot be used to -/// initialize a constant variable. -/// @author iefremov - - -class A { - const A(); - get m {} -} - -final a = const A(); -const m = a.m; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (x) {} -} +// 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 There are no other constant expressions. +/// @description Checks that a getter invocation expression cannot be used to +/// initialize a constant variable. +/// @author iefremov + + +class A { + const A(); + get m {} +} + +final a = const A(); +const m = a.m; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/no_other_constant_expressions_t13.dart b/Language/Expressions/Constants/no_other_constant_expressions_t13.dart index 8a2ef9a6a1..17e30483e8 100644 --- a/Language/Expressions/Constants/no_other_constant_expressions_t13.dart +++ b/Language/Expressions/Constants/no_other_constant_expressions_t13.dart @@ -1,21 +1,21 @@ -// 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 There are no other constant expressions. -/// @description Checks that an assignment expression cannot be used to -/// initialize a constant variable. -/// @author iefremov - - -var a; -const m = (a = 1); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (x) {} -} +// 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 There are no other constant expressions. +/// @description Checks that an assignment expression cannot be used to +/// initialize a constant variable. +/// @author iefremov + + +var a; +const m = (a = 1); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/no_other_constant_expressions_t14.dart b/Language/Expressions/Constants/no_other_constant_expressions_t14.dart index 656cbef902..123fa5613d 100644 --- a/Language/Expressions/Constants/no_other_constant_expressions_t14.dart +++ b/Language/Expressions/Constants/no_other_constant_expressions_t14.dart @@ -1,25 +1,25 @@ -// 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 There are no other constant expressions. -/// @description Checks that an assignment expression cannot be used to -/// initialize a constant variable. -/// @author iefremov - - -class A { - const A(); - final z = null; -} - -const m = ((const A()).z = 1); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (x) {} -} +// 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 There are no other constant expressions. +/// @description Checks that an assignment expression cannot be used to +/// initialize a constant variable. +/// @author iefremov + + +class A { + const A(); + final z = null; +} + +const m = ((const A()).z = 1); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/no_other_constant_expressions_t15.dart b/Language/Expressions/Constants/no_other_constant_expressions_t15.dart index 09e3a18f83..bc600c9aa2 100644 --- a/Language/Expressions/Constants/no_other_constant_expressions_t15.dart +++ b/Language/Expressions/Constants/no_other_constant_expressions_t15.dart @@ -1,25 +1,25 @@ -// 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 There are no other constant expressions. -/// @description Checks that a compound assignment expression cannot be used to -/// initialize a constant variable. -/// @author iefremov - - -class A { - const A(); - final z = null; -} - -const m = ((const A()).z *= 1); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (x) {} -} +// 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 There are no other constant expressions. +/// @description Checks that a compound assignment expression cannot be used to +/// initialize a constant variable. +/// @author iefremov + + +class A { + const A(); + final z = null; +} + +const m = ((const A()).z *= 1); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/no_other_constant_expressions_t17.dart b/Language/Expressions/Constants/no_other_constant_expressions_t17.dart index 182ca06a11..9de0be2205 100644 --- a/Language/Expressions/Constants/no_other_constant_expressions_t17.dart +++ b/Language/Expressions/Constants/no_other_constant_expressions_t17.dart @@ -1,22 +1,22 @@ -// 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 An expression of the form [e is T] is potentially constant if [e] -/// is a potentially constant expression and [T] is a constant type expression, -/// and it is further constant if [e] is constant. -/// @description Checks that a type test expression can be used to initialize a -/// constant variable. -/// @author iefremov - -import "../../../Utils/expect.dart"; - -const m1 = null is Object; -const m2 = "testme" is String; -const m3 = "testme" is int; - -main() { - Expect.isFalse(m1); - Expect.isTrue(m2); - Expect.isFalse(m3); -} +// 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 An expression of the form [e is T] is potentially constant if [e] +/// is a potentially constant expression and [T] is a constant type expression, +/// and it is further constant if [e] is constant. +/// @description Checks that a type test expression can be used to initialize a +/// constant variable. +/// @author iefremov + +import "../../../Utils/expect.dart"; + +const m1 = null is Object; +const m2 = "testme" is String; +const m3 = "testme" is int; + +main() { + Expect.isFalse(m1); + Expect.isTrue(m2); + Expect.isFalse(m3); +} diff --git a/Language/Expressions/Constants/no_other_constant_expressions_t18.dart b/Language/Expressions/Constants/no_other_constant_expressions_t18.dart index 84aba4098c..f85ffab0f8 100644 --- a/Language/Expressions/Constants/no_other_constant_expressions_t18.dart +++ b/Language/Expressions/Constants/no_other_constant_expressions_t18.dart @@ -1,21 +1,21 @@ -// 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 There are no other constant expressions. -/// @description Checks that a postfix increment expression cannot be used to -/// initialize a constant variable. -/// @author iefremov - - -var a = 1; -const m = a++; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (x) {} -} +// 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 There are no other constant expressions. +/// @description Checks that a postfix increment expression cannot be used to +/// initialize a constant variable. +/// @author iefremov + + +var a = 1; +const m = a++; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/no_other_constant_expressions_t20.dart b/Language/Expressions/Constants/no_other_constant_expressions_t20.dart index bc6682a512..1383c43f01 100644 --- a/Language/Expressions/Constants/no_other_constant_expressions_t20.dart +++ b/Language/Expressions/Constants/no_other_constant_expressions_t20.dart @@ -1,21 +1,21 @@ -// 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 There are no other constant expressions. -/// @description Checks that a prefix decrement expression cannot be used to -/// initialize a constant variable. -/// @author iefremov - - -var a = 1; -const m = --a; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (x) {} -} +// 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 There are no other constant expressions. +/// @description Checks that a prefix decrement expression cannot be used to +/// initialize a constant variable. +/// @author iefremov + + +var a = 1; +const m = --a; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/no_other_constant_expressions_t21.dart b/Language/Expressions/Constants/no_other_constant_expressions_t21.dart index f1dfe96ce6..7156e41d0e 100644 --- a/Language/Expressions/Constants/no_other_constant_expressions_t21.dart +++ b/Language/Expressions/Constants/no_other_constant_expressions_t21.dart @@ -1,21 +1,21 @@ -// 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 There are no other constant expressions. -/// @description Checks that a prefix increment expression cannot be used to -/// initialize a constant variable. -/// @author iefremov - - -var a = 1; -const m = ++a; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (x) {} -} +// 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 There are no other constant expressions. +/// @description Checks that a prefix increment expression cannot be used to +/// initialize a constant variable. +/// @author iefremov + + +var a = 1; +const m = ++a; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/no_other_constant_expressions_t31.dart b/Language/Expressions/Constants/no_other_constant_expressions_t31.dart index c82f50ebc5..efe0cedc1f 100644 --- a/Language/Expressions/Constants/no_other_constant_expressions_t31.dart +++ b/Language/Expressions/Constants/no_other_constant_expressions_t31.dart @@ -1,21 +1,21 @@ -// 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 There are no other constant expressions. -/// @description Checks that a postfix decrement expression cannot be used to -/// initialize a constant variable. -/// @author iefremov - - -var a = 1; -const m = a--; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (x) {} -} +// 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 There are no other constant expressions. +/// @description Checks that a postfix decrement expression cannot be used to +/// initialize a constant variable. +/// @author iefremov + + +var a = 1; +const m = a--; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/static_constant_t02.dart b/Language/Expressions/Constants/static_constant_t02.dart index b969556000..e450de90b1 100644 --- a/Language/Expressions/Constants/static_constant_t02.dart +++ b/Language/Expressions/Constants/static_constant_t02.dart @@ -1,27 +1,27 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • A qualified reference to a static constant variable that is not qualified -/// by a deferred prefix. -/// @description Checks that a reference to a final variable cannot be assigned -/// to a constant variable. -/// @author msyabro - - -final x = 1; - -const i1 = x; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(i1); - } catch (x) {} -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • A qualified reference to a static constant variable that is not qualified +/// by a deferred prefix. +/// @description Checks that a reference to a final variable cannot be assigned +/// to a constant variable. +/// @author msyabro + + +final x = 1; + +const i1 = x; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(i1); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/static_constant_t03.dart b/Language/Expressions/Constants/static_constant_t03.dart index b29b43ef1c..ef21e4ecbe 100644 --- a/Language/Expressions/Constants/static_constant_t03.dart +++ b/Language/Expressions/Constants/static_constant_t03.dart @@ -1,29 +1,29 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • A qualified reference to a static constant variable that is not qualified -/// by a deferred prefix. -/// @description Checks that a reference to a static final variable cannot be -/// assigned to a constant variable. -/// @author msyabro - - -class A { - static final x = 1; -} - -const i1 = x; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(i1); - } catch (x) {} -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • A qualified reference to a static constant variable that is not qualified +/// by a deferred prefix. +/// @description Checks that a reference to a static final variable cannot be +/// assigned to a constant variable. +/// @author msyabro + + +class A { + static final x = 1; +} + +const i1 = x; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(i1); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/static_constant_t04.dart b/Language/Expressions/Constants/static_constant_t04.dart index f5c5216850..cab6cf1de7 100644 --- a/Language/Expressions/Constants/static_constant_t04.dart +++ b/Language/Expressions/Constants/static_constant_t04.dart @@ -1,26 +1,26 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • A qualified reference to a static constant variable that is not qualified -/// by a deferred prefix. -/// @description Checks that a reference to a non-constant top-level variable -/// cannot be used to initialize a constant variable. -/// @author iefremov - - -var a = 1; -const m = a; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(m); - } catch (x) {} -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • A qualified reference to a static constant variable that is not qualified +/// by a deferred prefix. +/// @description Checks that a reference to a non-constant top-level variable +/// cannot be used to initialize a constant variable. +/// @author iefremov + + +var a = 1; +const m = a; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(m); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/top_level_function_t01.dart b/Language/Expressions/Constants/top_level_function_t01.dart index 6fd7573dc2..4febe619a4 100644 --- a/Language/Expressions/Constants/top_level_function_t01.dart +++ b/Language/Expressions/Constants/top_level_function_t01.dart @@ -1,25 +1,25 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • A simple or qualified identifier denoting a top-level function or a static -/// method that is not qualified by a deferred prefix. -/// @description Checks that a function literal cannot be assigned to a constant -/// variable. -/// @author iefremov - - -const a = () {}; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(a); - } catch (x) {} -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • A simple or qualified identifier denoting a top-level function or a static +/// method that is not qualified by a deferred prefix. +/// @description Checks that a function literal cannot be assigned to a constant +/// variable. +/// @author iefremov + + +const a = () {}; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(a); + } catch (x) {} +} diff --git a/Language/Expressions/Constants/top_level_function_t02.dart b/Language/Expressions/Constants/top_level_function_t02.dart index 33bcf27c27..8351150756 100644 --- a/Language/Expressions/Constants/top_level_function_t02.dart +++ b/Language/Expressions/Constants/top_level_function_t02.dart @@ -1,25 +1,25 @@ -// 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 constant expression is an expression whose value can never -/// change, and that can be evaluated entirely at compile time. -/// A constant expression is one of the following: -/// . . . -/// • A simple or qualified identifier denoting a top-level function or a static -/// method that is not qualified by a deferred prefix. -/// @description Checks that a function literal cannot be assigned to a constant -/// variable. -/// @author iefremov - - -const a = () => null; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - print(a); - } catch (x) {} -} +// 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 constant expression is an expression whose value can never +/// change, and that can be evaluated entirely at compile time. +/// A constant expression is one of the following: +/// . . . +/// • A simple or qualified identifier denoting a top-level function or a static +/// method that is not qualified by a deferred prefix. +/// @description Checks that a function literal cannot be assigned to a constant +/// variable. +/// @author iefremov + + +const a = () => null; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + print(a); + } catch (x) {} +} diff --git a/Language/Expressions/Equality/static_type_t01.dart b/Language/Expressions/Equality/static_type_t01.dart index fa328560c5..c48a47120c 100644 --- a/Language/Expressions/Equality/static_type_t01.dart +++ b/Language/Expressions/Equality/static_type_t01.dart @@ -1,16 +1,16 @@ -// 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 The static type of an equality expression is bool. -/// @description Checks that static type of an equality expression is bool. -/// @author msyabro - - -main() { - bool b; - b = (1 == 1); - b = (1 == 2); - b = (1 != 3); - b = (4 != 4); -} +// 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 The static type of an equality expression is bool. +/// @description Checks that static type of an equality expression is bool. +/// @author msyabro + + +main() { + bool b; + b = (1 == 1); + b = (1 == 2); + b = (1 != 3); + b = (4 != 4); +} diff --git a/Language/Expressions/Equality/syntax_t02.dart b/Language/Expressions/Equality/syntax_t02.dart index 090edf13e4..7dacd45236 100644 --- a/Language/Expressions/Equality/syntax_t02.dart +++ b/Language/Expressions/Equality/syntax_t02.dart @@ -1,37 +1,37 @@ -// 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 Equality expressions test objects for equality. -/// equalityExpression: -/// relationalExpression (equalityOperator relationalExpression)? | -/// super equalityOperator relationalExpression -/// ; -/// equalityOperator: -/// '==' | -/// '!=' -/// ; -/// An equality expression is either a relational expression, or an invocation of -/// an equality operator on either super or an expression e1, with argument e2. -/// @description Checks that super can be used only as the first operand -/// of an equality expression. -/// @author msyabro - - -class S {} - -class A extends S { - test() { - try { - 1 == super; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} - } -} - -main() { - A a = new A(); - a.test(); -} +// 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 Equality expressions test objects for equality. +/// equalityExpression: +/// relationalExpression (equalityOperator relationalExpression)? | +/// super equalityOperator relationalExpression +/// ; +/// equalityOperator: +/// '==' | +/// '!=' +/// ; +/// An equality expression is either a relational expression, or an invocation of +/// an equality operator on either super or an expression e1, with argument e2. +/// @description Checks that super can be used only as the first operand +/// of an equality expression. +/// @author msyabro + + +class S {} + +class A extends S { + test() { + try { + 1 == super; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} + } +} + +main() { + A a = new A(); + a.test(); +} diff --git a/Language/Expressions/Equality/syntax_t03.dart b/Language/Expressions/Equality/syntax_t03.dart index a4842f0805..1814096e8c 100644 --- a/Language/Expressions/Equality/syntax_t03.dart +++ b/Language/Expressions/Equality/syntax_t03.dart @@ -1,27 +1,27 @@ -// 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 Equality expressions test objects for equality. -/// equalityExpression: -/// relationalExpression (equalityOperator relationalExpression)? | -/// super equalityOperator relationalExpression -/// ; -/// equalityOperator: -/// '==' | -/// '!=' -/// ; -/// An equality expression is either a relational expression, or an invocation of -/// an equality operator on either super or an expression e1, with argument e2. -/// @description Checks that an equality expression can't start with operator ==. -/// @author msyabro - - -main() { - try { - == 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Equality expressions test objects for equality. +/// equalityExpression: +/// relationalExpression (equalityOperator relationalExpression)? | +/// super equalityOperator relationalExpression +/// ; +/// equalityOperator: +/// '==' | +/// '!=' +/// ; +/// An equality expression is either a relational expression, or an invocation of +/// an equality operator on either super or an expression e1, with argument e2. +/// @description Checks that an equality expression can't start with operator ==. +/// @author msyabro + + +main() { + try { + == 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Equality/syntax_t04.dart b/Language/Expressions/Equality/syntax_t04.dart index 2a97325855..ca5ac1dafa 100644 --- a/Language/Expressions/Equality/syntax_t04.dart +++ b/Language/Expressions/Equality/syntax_t04.dart @@ -1,27 +1,27 @@ -// 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 Equality expressions test objects for equality. -/// equalityExpression: -/// relationalExpression (equalityOperator relationalExpression)? | -/// super equalityOperator relationalExpression -/// ; -/// equalityOperator: -/// '==' | -/// '!=' -/// ; -/// An equality expression is either a relational expression, or an invocation of -/// an equality operator on either super or an expression e1, with argument e2. -/// @description Checks that an equality expression can't start with operator !=. -/// @author msyabro - - -main() { - try { - != true; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Equality expressions test objects for equality. +/// equalityExpression: +/// relationalExpression (equalityOperator relationalExpression)? | +/// super equalityOperator relationalExpression +/// ; +/// equalityOperator: +/// '==' | +/// '!=' +/// ; +/// An equality expression is either a relational expression, or an invocation of +/// an equality operator on either super or an expression e1, with argument e2. +/// @description Checks that an equality expression can't start with operator !=. +/// @author msyabro + + +main() { + try { + != true; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Equality/syntax_t07.dart b/Language/Expressions/Equality/syntax_t07.dart index fcc04856df..6984ff0bd7 100644 --- a/Language/Expressions/Equality/syntax_t07.dart +++ b/Language/Expressions/Equality/syntax_t07.dart @@ -1,28 +1,28 @@ -// 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 Equality expressions test objects for equality. -/// equalityExpression: -/// relationalExpression (equalityOperator relationalExpression)? | -/// super equalityOperator relationalExpression -/// ; -/// equalityOperator: -/// '==' | -/// '!=' -/// ; -/// An equality expression is either a relational expression, or an invocation of -/// an equality operator on either super or an expression e1, with argument e2. -/// @description Checks that an equality expression can't terminate with -/// operator ==. -/// @author msyabro - - -main() { - try { - 1 ==; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Equality expressions test objects for equality. +/// equalityExpression: +/// relationalExpression (equalityOperator relationalExpression)? | +/// super equalityOperator relationalExpression +/// ; +/// equalityOperator: +/// '==' | +/// '!=' +/// ; +/// An equality expression is either a relational expression, or an invocation of +/// an equality operator on either super or an expression e1, with argument e2. +/// @description Checks that an equality expression can't terminate with +/// operator ==. +/// @author msyabro + + +main() { + try { + 1 ==; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Equality/syntax_t08.dart b/Language/Expressions/Equality/syntax_t08.dart index e4679e5810..e667cfacd3 100644 --- a/Language/Expressions/Equality/syntax_t08.dart +++ b/Language/Expressions/Equality/syntax_t08.dart @@ -1,28 +1,28 @@ -// 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 Equality expressions test objects for equality. -/// equalityExpression: -/// relationalExpression (equalityOperator relationalExpression)? | -/// super equalityOperator relationalExpression -/// ; -/// equalityOperator: -/// '==' | -/// '!=' -/// ; -/// An equality expression is either a relational expression, or an invocation of -/// an equality operator on either super or an expression e1, with argument e2. -/// @description Checks that an equality expression can't terminate with -/// operator !=. -/// @author msyabro - - -main() { - try { - 1 !=; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Equality expressions test objects for equality. +/// equalityExpression: +/// relationalExpression (equalityOperator relationalExpression)? | +/// super equalityOperator relationalExpression +/// ; +/// equalityOperator: +/// '==' | +/// '!=' +/// ; +/// An equality expression is either a relational expression, or an invocation of +/// an equality operator on either super or an expression e1, with argument e2. +/// @description Checks that an equality expression can't terminate with +/// operator !=. +/// @author msyabro + + +main() { + try { + 1 !=; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Equality/syntax_t11.dart b/Language/Expressions/Equality/syntax_t11.dart index 54419acc47..8a811a7e64 100644 --- a/Language/Expressions/Equality/syntax_t11.dart +++ b/Language/Expressions/Equality/syntax_t11.dart @@ -1,27 +1,27 @@ -// 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 Equality expressions test objects for equality. -/// equalityExpression: -/// relationalExpression (equalityOperator relationalExpression)? | -/// super equalityOperator relationalExpression -/// ; -/// equalityOperator: -/// '==' | -/// '!=' -/// ; -/// An equality expression is either a relational expression, or an invocation of -/// an equality operator on either super or an expression e1, with argument e2. -/// @description Checks that two operators == can't be placed one after another. -/// @author msyabro - - -main() { - try { - 1 == == 2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Equality expressions test objects for equality. +/// equalityExpression: +/// relationalExpression (equalityOperator relationalExpression)? | +/// super equalityOperator relationalExpression +/// ; +/// equalityOperator: +/// '==' | +/// '!=' +/// ; +/// An equality expression is either a relational expression, or an invocation of +/// an equality operator on either super or an expression e1, with argument e2. +/// @description Checks that two operators == can't be placed one after another. +/// @author msyabro + + +main() { + try { + 1 == == 2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Equality/syntax_t12.dart b/Language/Expressions/Equality/syntax_t12.dart index aa6497939f..2a915a20b1 100644 --- a/Language/Expressions/Equality/syntax_t12.dart +++ b/Language/Expressions/Equality/syntax_t12.dart @@ -1,27 +1,27 @@ -// 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 Equality expressions test objects for equality. -/// equalityExpression: -/// relationalExpression (equalityOperator relationalExpression)? | -/// super equalityOperator relationalExpression -/// ; -/// equalityOperator: -/// '==' | -/// '!=' -/// ; -/// An equality expression is either a relational expression, or an invocation of -/// an equality operator on either super or an expression e1, with argument e2. -/// @description Checks that two operators != can't be placed one after another. -/// @author msyabro - - -main() { - try { - 1 != != ""; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Equality expressions test objects for equality. +/// equalityExpression: +/// relationalExpression (equalityOperator relationalExpression)? | +/// super equalityOperator relationalExpression +/// ; +/// equalityOperator: +/// '==' | +/// '!=' +/// ; +/// An equality expression is either a relational expression, or an invocation of +/// an equality operator on either super or an expression e1, with argument e2. +/// @description Checks that two operators != can't be placed one after another. +/// @author msyabro + + +main() { + try { + 1 != != ""; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Equality/syntax_t15.dart b/Language/Expressions/Equality/syntax_t15.dart index 1aa31c3519..04cfa868e0 100644 --- a/Language/Expressions/Equality/syntax_t15.dart +++ b/Language/Expressions/Equality/syntax_t15.dart @@ -1,28 +1,28 @@ -// 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 Equality expressions test objects for equality. -/// equalityExpression: -/// relationalExpression (equalityOperator relationalExpression)? | -/// super equalityOperator relationalExpression -/// ; -/// equalityOperator: -/// '==' | -/// '!=' -/// ; -/// An equality expression is either a relational expression, or an invocation of -/// an equality operator on either super or an expression e1, with argument e2. -/// @description Checks that equality expressions cannot be operands of another -/// equality expression. -/// @author msyabro - - -main() { - try { - 1 == 2 == 3; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Equality expressions test objects for equality. +/// equalityExpression: +/// relationalExpression (equalityOperator relationalExpression)? | +/// super equalityOperator relationalExpression +/// ; +/// equalityOperator: +/// '==' | +/// '!=' +/// ; +/// An equality expression is either a relational expression, or an invocation of +/// an equality operator on either super or an expression e1, with argument e2. +/// @description Checks that equality expressions cannot be operands of another +/// equality expression. +/// @author msyabro + + +main() { + try { + 1 == 2 == 3; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Equality/syntax_t16.dart b/Language/Expressions/Equality/syntax_t16.dart index ea0aff2996..2a31638ec1 100644 --- a/Language/Expressions/Equality/syntax_t16.dart +++ b/Language/Expressions/Equality/syntax_t16.dart @@ -1,28 +1,28 @@ -// 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 Equality expressions test objects for equality. -/// equalityExpression: -/// relationalExpression (equalityOperator relationalExpression)? | -/// super equalityOperator relationalExpression -/// ; -/// equalityOperator: -/// '==' | -/// '!=' -/// ; -/// An equality expression is either a relational expression, or an invocation of -/// an equality operator on either super or an expression e1, with argument e2. -/// @description Checks that equality expressions cannot be operands of another -/// equality expression. -/// @author msyabro - - -main() { - try { - 1 != 2 != 3; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Equality expressions test objects for equality. +/// equalityExpression: +/// relationalExpression (equalityOperator relationalExpression)? | +/// super equalityOperator relationalExpression +/// ; +/// equalityOperator: +/// '==' | +/// '!=' +/// ; +/// An equality expression is either a relational expression, or an invocation of +/// an equality operator on either super or an expression e1, with argument e2. +/// @description Checks that equality expressions cannot be operands of another +/// equality expression. +/// @author msyabro + + +main() { + try { + 1 != 2 != 3; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Function_Expressions/syntax_t03.dart b/Language/Expressions/Function_Expressions/syntax_t03.dart index 3d4fab11f4..1ffe963687 100644 --- a/Language/Expressions/Function_Expressions/syntax_t03.dart +++ b/Language/Expressions/Function_Expressions/syntax_t03.dart @@ -1,21 +1,21 @@ -// 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 function literal is an object that encapsulates an executable -/// unit of code. -/// functionExpression: -/// formalParameterList functionExpressionBody -/// ; -/// @description Checks that the function body is required. -/// @author msyabro - - -main() { - try { - (p1, p2); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 function literal is an object that encapsulates an executable +/// unit of code. +/// functionExpression: +/// formalParameterList functionExpressionBody +/// ; +/// @description Checks that the function body is required. +/// @author msyabro + + +main() { + try { + (p1, p2); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Function_Expressions/syntax_t05.dart b/Language/Expressions/Function_Expressions/syntax_t05.dart index 14da17a91f..111f505743 100644 --- a/Language/Expressions/Function_Expressions/syntax_t05.dart +++ b/Language/Expressions/Function_Expressions/syntax_t05.dart @@ -1,31 +1,31 @@ -// 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 function literal is an object that encapsulates an executable -/// unit of code. -/// functionExpression: -/// formalParameterList functionExpressionBody -/// ; -/// @description Checks that various valid function literal invocation -/// expressions don't produce compile-time errors. -/// @author kaigorodov - - -abstract class I {} -class C implements I{} -typedef tf(); - -main() { - () {}(); - (k) { return k; }(1); - (() => 1)(); - ((C? x, y) => new C())(null, null); - ((C? p1, tf? p2, [tf? p3]) => null)(null, null); - ((C? p1, tf? p2, {tf? p3}) => null)(null, null); - - (tf? p1, tf? p2, [tf? p3]) => null; - try { - ((tf? p1, tf? p2, [tf? p3]) => null)(null, null); - } catch (x) {} -} +// 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 function literal is an object that encapsulates an executable +/// unit of code. +/// functionExpression: +/// formalParameterList functionExpressionBody +/// ; +/// @description Checks that various valid function literal invocation +/// expressions don't produce compile-time errors. +/// @author kaigorodov + + +abstract class I {} +class C implements I{} +typedef tf(); + +main() { + () {}(); + (k) { return k; }(1); + (() => 1)(); + ((C? x, y) => new C())(null, null); + ((C? p1, tf? p2, [tf? p3]) => null)(null, null); + ((C? p1, tf? p2, {tf? p3}) => null)(null, null); + + (tf? p1, tf? p2, [tf? p3]) => null; + try { + ((tf? p1, tf? p2, [tf? p3]) => null)(null, null); + } catch (x) {} +} diff --git a/Language/Expressions/Function_Expressions/syntax_t06.dart b/Language/Expressions/Function_Expressions/syntax_t06.dart index 7b1ce1b565..992f9334c8 100644 --- a/Language/Expressions/Function_Expressions/syntax_t06.dart +++ b/Language/Expressions/Function_Expressions/syntax_t06.dart @@ -1,26 +1,26 @@ -// 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 function literal is an object that encapsulates an executable -/// unit of code. -/// functionExpression: -/// formalParameterList functionExpressionBody -/// ; -/// @description Checks that expression is necessary in the form -/// ['=>' expression ';'] -/// @author kaigorodov - - -f(var func) { - return func(); -} - -main() { - try { - f(void func() =>); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (x) {} -} +// 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 function literal is an object that encapsulates an executable +/// unit of code. +/// functionExpression: +/// formalParameterList functionExpressionBody +/// ; +/// @description Checks that expression is necessary in the form +/// ['=>' expression ';'] +/// @author kaigorodov + + +f(var func) { + return func(); +} + +main() { + try { + f(void func() =>); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (x) {} +} diff --git a/Language/Expressions/Function_Invocation/Actual_Argument_List_Evaluation/syntax_t02.dart b/Language/Expressions/Function_Invocation/Actual_Argument_List_Evaluation/syntax_t02.dart index 67d7f69558..f50a7fed53 100644 --- a/Language/Expressions/Function_Invocation/Actual_Argument_List_Evaluation/syntax_t02.dart +++ b/Language/Expressions/Function_Invocation/Actual_Argument_List_Evaluation/syntax_t02.dart @@ -1,33 +1,33 @@ -// 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 Function invocation involves evaluation of the list of actual -/// arguments to the function and binding of the results to the functions -/// formal parameters. -/// arguments: -/// '(' argumentList? ')' -/// ; -/// argumentList: -/// namedArgument (', ' namedArgument)* | -/// expressionList (', ' namedArgument)* -/// ; -/// namedArgument: -/// label expression -/// ; -/// @description Checks that it is a compile-time error when named arguments -/// precede positional arguments in a function invocation expression. -/// @author msyabro - -// @dart = 2.16 - -func(p1, {p2}) {} - -main() { - try { - func(p2: 1, 2); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Function invocation involves evaluation of the list of actual +/// arguments to the function and binding of the results to the functions +/// formal parameters. +/// arguments: +/// '(' argumentList? ')' +/// ; +/// argumentList: +/// namedArgument (', ' namedArgument)* | +/// expressionList (', ' namedArgument)* +/// ; +/// namedArgument: +/// label expression +/// ; +/// @description Checks that it is a compile-time error when named arguments +/// precede positional arguments in a function invocation expression. +/// @author msyabro + +// @dart = 2.16 + +func(p1, {p2}) {} + +main() { + try { + func(p2: 1, 2); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Function_Invocation/Actual_Argument_List_Evaluation/syntax_t03.dart b/Language/Expressions/Function_Invocation/Actual_Argument_List_Evaluation/syntax_t03.dart index 32a6e5c249..ef31dea1d3 100644 --- a/Language/Expressions/Function_Invocation/Actual_Argument_List_Evaluation/syntax_t03.dart +++ b/Language/Expressions/Function_Invocation/Actual_Argument_List_Evaluation/syntax_t03.dart @@ -1,32 +1,32 @@ -// 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 Function invocation involves evaluation of the list of actual -/// arguments to the function and binding of the results to the functions -/// formal parameters. -/// arguments: -/// '(' argumentList? ')' -/// ; -/// argumentList: -/// namedArgument (', ' namedArgument)* | -/// expressionList (', ' namedArgument)* -/// ; -/// namedArgument: -/// label expression -/// ; -/// @description Checks that it is a compile-time error if named arguments are -/// placed between positional arguments in a function invocation expression. -/// @author msyabro - - -func(p1, {p2, p3}) {} - -main() { - try { - func(1, p2: 1, 2); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Function invocation involves evaluation of the list of actual +/// arguments to the function and binding of the results to the functions +/// formal parameters. +/// arguments: +/// '(' argumentList? ')' +/// ; +/// argumentList: +/// namedArgument (', ' namedArgument)* | +/// expressionList (', ' namedArgument)* +/// ; +/// namedArgument: +/// label expression +/// ; +/// @description Checks that it is a compile-time error if named arguments are +/// placed between positional arguments in a function invocation expression. +/// @author msyabro + + +func(p1, {p2, p3}) {} + +main() { + try { + func(1, p2: 1, 2); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Function_Invocation/Actual_Argument_List_Evaluation/syntax_t04.dart b/Language/Expressions/Function_Invocation/Actual_Argument_List_Evaluation/syntax_t04.dart index 0774699d73..7a735e80ca 100644 --- a/Language/Expressions/Function_Invocation/Actual_Argument_List_Evaluation/syntax_t04.dart +++ b/Language/Expressions/Function_Invocation/Actual_Argument_List_Evaluation/syntax_t04.dart @@ -1,32 +1,32 @@ -// 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 Function invocation involves evaluation of the list of actual -/// arguments to the function and binding of the results to the functions -/// formal parameters. -/// arguments: -/// '(' argumentList? ')' -/// ; -/// argumentList: -/// namedArgument (', ' namedArgument)* | -/// expressionList (', ' namedArgument)* -/// ; -/// namedArgument: -/// label expression -/// ; -/// @description Checks that arguments in a function invocation expression -/// must be comma-delimited. -/// @author msyabro - - -func(p1, p2) {} - -main() { - try { - func(1 2); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Function invocation involves evaluation of the list of actual +/// arguments to the function and binding of the results to the functions +/// formal parameters. +/// arguments: +/// '(' argumentList? ')' +/// ; +/// argumentList: +/// namedArgument (', ' namedArgument)* | +/// expressionList (', ' namedArgument)* +/// ; +/// namedArgument: +/// label expression +/// ; +/// @description Checks that arguments in a function invocation expression +/// must be comma-delimited. +/// @author msyabro + + +func(p1, p2) {} + +main() { + try { + func(1 2); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Function_Invocation/Actual_Argument_List_Evaluation/syntax_t05.dart b/Language/Expressions/Function_Invocation/Actual_Argument_List_Evaluation/syntax_t05.dart index 9ce8d8a2a2..70860eb7fa 100644 --- a/Language/Expressions/Function_Invocation/Actual_Argument_List_Evaluation/syntax_t05.dart +++ b/Language/Expressions/Function_Invocation/Actual_Argument_List_Evaluation/syntax_t05.dart @@ -1,27 +1,27 @@ -// 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 Function invocation involves evaluation of the list of actual -/// arguments to the function and binding of the results to the functions -/// formal parameters. -/// arguments: -/// '(' argumentList? ')' -/// ; -/// argumentList: -/// namedArgument (', ' namedArgument)* | -/// expressionList (', ' namedArgument)* -/// ; -/// namedArgument: -/// label expression -/// ; -/// @description Checks that there is no compile-time error when the argument -/// list in a function invocation expression ends with a comma. -/// @author msyabro - - -func(p1, p2) {} - -main() { - func(1, 2, ); -} +// 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 Function invocation involves evaluation of the list of actual +/// arguments to the function and binding of the results to the functions +/// formal parameters. +/// arguments: +/// '(' argumentList? ')' +/// ; +/// argumentList: +/// namedArgument (', ' namedArgument)* | +/// expressionList (', ' namedArgument)* +/// ; +/// namedArgument: +/// label expression +/// ; +/// @description Checks that there is no compile-time error when the argument +/// list in a function invocation expression ends with a comma. +/// @author msyabro + + +func(p1, p2) {} + +main() { + func(1, 2, ); +} diff --git a/Language/Expressions/Function_Invocation/Binding_Actuals_to_Formals/same_name_arguments_t01.dart b/Language/Expressions/Function_Invocation/Binding_Actuals_to_Formals/same_name_arguments_t01.dart index cb8822e5c6..0d4a496124 100644 --- a/Language/Expressions/Function_Invocation/Binding_Actuals_to_Formals/same_name_arguments_t01.dart +++ b/Language/Expressions/Function_Invocation/Binding_Actuals_to_Formals/same_name_arguments_t01.dart @@ -1,20 +1,20 @@ -// 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 It is a compile-time error if qi = qj for any i != j. -/// @description Checks that it is a compile-time error if there are two -/// named arguments with the same name in a function invocation expression. -/// @author msyabro - - -func({int? np1, int? np2, int? np3}) {} - -main() { - try { - func(np1: 1, np2: 2, np2: 2); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 It is a compile-time error if qi = qj for any i != j. +/// @description Checks that it is a compile-time error if there are two +/// named arguments with the same name in a function invocation expression. +/// @author msyabro + + +func({int? np1, int? np2, int? np3}) {} + +main() { + try { + func(np1: 1, np2: 2, np2: 2); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t01.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t01.dart index a0fda840e5..98af0123fb 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t01.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t01.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "abstract" is used as the declared name of a class. -/// @author rodionov - - -class abstract {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "abstract" is used as the declared name of a class. +/// @author rodionov + + +class abstract {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t04.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t04.dart index c38260fe2a..47d74bf19b 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t04.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t04.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "abstract" is used as the declared name of a type alias. -/// @author rodionov - - -typedef int abstract(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "abstract" is used as the declared name of a type alias. +/// @author rodionov + + +typedef int abstract(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t08.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t08.dart index b4291999ae..362f2a8922 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t08.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t08.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "dynamic" is used as the declared name of a class. -/// @author rodionov - - -class dynamic {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -class foo extends dynamic {} - -main() { - null is foo; -} +// 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "dynamic" is used as the declared name of a class. +/// @author rodionov + + +class dynamic {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +class foo extends dynamic {} + +main() { + null is foo; +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t10.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t10.dart index 63f096789f..b07f14efd4 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t10.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t10.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "dynamic" is used as the declared name of a type alias. -/// @author rodionov - - -typedef int dynamic(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "dynamic" is used as the declared name of a type alias. +/// @author rodionov + + +typedef int dynamic(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t11.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t11.dart index 33c7e15a3e..aa8dbedc49 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t11.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t11.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "factory" is used as the declared name of a class. -/// @author rodionov - - -class factory {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "factory" is used as the declared name of a class. +/// @author rodionov + + +class factory {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t13.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t13.dart index 5020f8f065..2d56bd9c4b 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t13.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t13.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "factory" factory is used as the declared name of a type alias. -/// @author rodionov - - -typedef int factory(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "factory" factory is used as the declared name of a type alias. +/// @author rodionov + + +typedef int factory(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t14.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t14.dart index e7950d201c..34a1c9e404 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t14.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t14.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "get" is used as the declared name of a class. -/// @author rodionov - - -class get {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "get" is used as the declared name of a class. +/// @author rodionov + + +class get {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t16.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t16.dart index 278ee64f56..59bed16167 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t16.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t16.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "get" is used as the declared name of a type alias. -/// @author rodionov - - -typedef int get(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "get" is used as the declared name of a type alias. +/// @author rodionov + + +typedef int get(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t17.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t17.dart index 791d5097ee..60cbc0c105 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t17.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t17.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "implements" is used as the declared name of a class. -/// @author rodionov - - -class implements {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "implements" is used as the declared name of a class. +/// @author rodionov + + +class implements {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t19.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t19.dart index e293d7b6d5..589d1cd1f8 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t19.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t19.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "implements" is used as the declared name of a type alias. -/// @author rodionov - - -typedef int implements(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "implements" is used as the declared name of a type alias. +/// @author rodionov + + +typedef int implements(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t20.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t20.dart index cc2a486d18..ac7461199e 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t20.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t20.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "operator" is used as the declared name of a class. -/// @author rodionov - - -class operator {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "operator" is used as the declared name of a class. +/// @author rodionov + + +class operator {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t22.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t22.dart index 9504106a86..78ad83bff8 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t22.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t22.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "operator" is used as the declared name of a type alias. -/// @author rodionov - - -typedef int operator(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "operator" is used as the declared name of a type alias. +/// @author rodionov + + +typedef int operator(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t23.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t23.dart index 7b6e9f8e6a..12f7b653e8 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t23.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t23.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "set" is used as the declared name of a class. -/// @author rodionov - - -class set {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "set" is used as the declared name of a class. +/// @author rodionov + + +class set {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t25.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t25.dart index cf473dc4a4..4d747ca71e 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t25.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t25.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "set" is used as the declared name of a type alias. -/// @author rodionov - - -typedef int set(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "set" is used as the declared name of a type alias. +/// @author rodionov + + +typedef int set(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t26.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t26.dart index b2c781b6cc..581ec2de24 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t26.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t26.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "static" is used as the declared name of a class. -/// @author rodionov - - -class static {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "static" is used as the declared name of a class. +/// @author rodionov + + +class static {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t28.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t28.dart index 67f3ddb903..3d839cae93 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t28.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t28.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "static" is used as the declared name of a type alias. -/// @author rodionov - - -typedef int static(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "static" is used as the declared name of a type alias. +/// @author rodionov + + +typedef int static(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t29.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t29.dart index 85f3bb9472..0f7540ee85 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t29.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t29.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "typedef" is used as the declared name of a class. -/// @author rodionov - - -class typedef {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "typedef" is used as the declared name of a class. +/// @author rodionov + + +class typedef {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t31.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t31.dart index a59673569c..6ffa3ff43d 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t31.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t31.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "typedef" is used as the declared name of a type alias. -/// @author rodionov - - -typedef int typedef(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "typedef" is used as the declared name of a type alias. +/// @author rodionov + + +typedef int typedef(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t32.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t32.dart index c6cd4e658c..afb98bed4a 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t32.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t32.dart @@ -1,18 +1,18 @@ -// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "as" is used as the declared name of a class. -/// @author ngl@unipro.ru - - -class as {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "as" is used as the declared name of a class. +/// @author ngl@unipro.ru + + +class as {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t34.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t34.dart index dbb40f1932..8070cb0d8c 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t34.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t34.dart @@ -1,17 +1,17 @@ -// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "as" is used as the declared name of a type alias. -/// @author ngl@unipro.ru - -typedef int as(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "as" is used as the declared name of a type alias. +/// @author ngl@unipro.ru + +typedef int as(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t35.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t35.dart index 762fbbf1e5..6cafe547fb 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t35.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t35.dart @@ -1,19 +1,19 @@ -// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "deferred" is used as the declared name of a class. -/// @author ngl@unipro.ru -/// @issue 25732 - - -class deferred {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "deferred" is used as the declared name of a class. +/// @author ngl@unipro.ru +/// @issue 25732 + + +class deferred {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t37.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t37.dart index c552d46398..3903f4bccf 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t37.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t37.dart @@ -1,19 +1,19 @@ -// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "deferred" is used as the declared name of a type alias. -/// @issue 25732 -/// @author ngl@unipro.ru - - -typedef int deferred(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "deferred" is used as the declared name of a type alias. +/// @issue 25732 +/// @author ngl@unipro.ru + + +typedef int deferred(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t38.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t38.dart index 046ddf9436..e3e2666f20 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t38.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t38.dart @@ -1,18 +1,18 @@ -// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "export" is used as the declared name of a class. -/// @author ngl@unipro.ru - - -class export {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "export" is used as the declared name of a class. +/// @author ngl@unipro.ru + + +class export {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t40.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t40.dart index df4772962b..daaeb37bf5 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t40.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t40.dart @@ -1,18 +1,18 @@ -// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "export" is used as the declared name of a type alias. -/// @author ngl@unipro.ru - - -typedef int export(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "export" is used as the declared name of a type alias. +/// @author ngl@unipro.ru + + +typedef int export(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t41.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t41.dart index 1974825b80..51f71c1293 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t41.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t41.dart @@ -1,18 +1,18 @@ -// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "external" is used as the declared name of a class. -/// @author ngl@unipro.ru - - -class external {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "external" is used as the declared name of a class. +/// @author ngl@unipro.ru + + +class external {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t43.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t43.dart index c1519c5036..08aa06ad58 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t43.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t43.dart @@ -1,18 +1,18 @@ -// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "external" is used as the declared name of a type alias. -/// @author ngl@unipro.ru - - -typedef int external(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "external" is used as the declared name of a type alias. +/// @author ngl@unipro.ru + + +typedef int external(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t44.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t44.dart index 65368dd766..c93f6c991f 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t44.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t44.dart @@ -1,18 +1,18 @@ -// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "import" is used as the declared name of a class. -/// @author ngl@unipro.ru - - -class import {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "import" is used as the declared name of a class. +/// @author ngl@unipro.ru + + +class import {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t46.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t46.dart index ca37ad52dd..db4da84b77 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t46.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t46.dart @@ -1,18 +1,18 @@ -// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "import" is used as the declared name of a type alias. -/// @author ngl@unipro.ru - - -typedef int import(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "import" is used as the declared name of a type alias. +/// @author ngl@unipro.ru + + +typedef int import(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t47.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t47.dart index 677a7bb36f..90ed322e3e 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t47.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t47.dart @@ -1,22 +1,22 @@ -// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "library" is used as the declared name of a class. -/// @author ngl@unipro.ru - - -class library {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is library; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "library" is used as the declared name of a class. +/// @author ngl@unipro.ru + + +class library {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is library; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t49.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t49.dart index ae50068a7c..b5cbf88d43 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t49.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t49.dart @@ -1,18 +1,18 @@ -// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "library" is used as the declared name of a type alias. -/// @author ngl@unipro.ru - - -typedef int library(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "library" is used as the declared name of a type alias. +/// @author ngl@unipro.ru + + +typedef int library(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t50.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t50.dart index b04d91c80e..b62bb64e6c 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t50.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t50.dart @@ -1,22 +1,22 @@ -// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "part" is used as the declared name of a class. -/// @author ngl@unipro.ru - - -class part {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is part; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "part" is used as the declared name of a class. +/// @author ngl@unipro.ru + + +class part {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is part; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Identifier_Reference/built_in_identifier_t52.dart b/Language/Expressions/Identifier_Reference/built_in_identifier_t52.dart index 0a3e605db3..7a776d206a 100644 --- a/Language/Expressions/Identifier_Reference/built_in_identifier_t52.dart +++ b/Language/Expressions/Identifier_Reference/built_in_identifier_t52.dart @@ -1,18 +1,18 @@ -// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as -/// the declared name of a prefix, class, type parameter or type alias. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "part" is used as the declared name of a type alias. -/// @author ngl@unipro.ru - - -typedef int part(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2016, 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 It is a compile-time error if a built-in identifier is used as +/// the declared name of a prefix, class, type parameter or type alias. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "part" is used as the declared name of a type alias. +/// @author ngl@unipro.ru + + +typedef int part(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t01.dart b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t01.dart index c83aa454f4..f6f53361e2 100644 --- a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t01.dart +++ b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t01.dart @@ -1,17 +1,17 @@ -// 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 It is a compile-time error to use a built-in identifier other than -/// dynamic as a type annotation or type parameter. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "abstract" is used as a type annotation of a local variable. -/// @author rodionov - - -main() { - abstract foo; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error to use a built-in identifier other than +/// dynamic as a type annotation or type parameter. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "abstract" is used as a type annotation of a local variable. +/// @author rodionov + + +main() { + abstract foo; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t02.dart b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t02.dart index 818f434252..3bfeb5e033 100644 --- a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t02.dart +++ b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t02.dart @@ -1,17 +1,17 @@ -// 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 It is a compile-time error to use a built-in identifier other than -/// dynamic as a type annotation or type parameter. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "as" is used as a type annotation of a local variable. -/// @author rodionov - - -main() { - as foo; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error to use a built-in identifier other than +/// dynamic as a type annotation or type parameter. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "as" is used as a type annotation of a local variable. +/// @author rodionov + + +main() { + as foo; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t04.dart b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t04.dart index 29bc6cff7c..abea2e65b7 100644 --- a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t04.dart +++ b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t04.dart @@ -1,17 +1,17 @@ -// 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 It is a compile-time error to use a built-in identifier other than -/// dynamic as a type annotation or type parameter. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "export" is used as a type annotation of a local variable. -/// @author rodionov - - -main() { - export foo; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error to use a built-in identifier other than +/// dynamic as a type annotation or type parameter. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "export" is used as a type annotation of a local variable. +/// @author rodionov + + +main() { + export foo; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t05.dart b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t05.dart index 576429f820..0ccfe2c512 100644 --- a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t05.dart +++ b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t05.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error to use a built-in identifier other than -/// dynamic as a type annotation or type parameter. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "factory" is used as a type annotation of a local variable. -/// @author rodionov - - - -main() { - factory foo; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error to use a built-in identifier other than +/// dynamic as a type annotation or type parameter. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "factory" is used as a type annotation of a local variable. +/// @author rodionov + + + +main() { + factory foo; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t06.dart b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t06.dart index c0ce77d9df..7891c6d67f 100644 --- a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t06.dart +++ b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t06.dart @@ -1,17 +1,17 @@ -// 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 It is a compile-time error to use a built-in identifier other than -/// dynamic as a type annotation or type parameter. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "get" is used as a type annotation of a local variable. -/// @author rodionov - - -main() { - get foo; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error to use a built-in identifier other than +/// dynamic as a type annotation or type parameter. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "get" is used as a type annotation of a local variable. +/// @author rodionov + + +main() { + get foo; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t07.dart b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t07.dart index 88fd65184a..08847bf190 100644 --- a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t07.dart +++ b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t07.dart @@ -1,17 +1,17 @@ -// 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 It is a compile-time error to use a built-in identifier other than -/// dynamic as a type annotation or type parameter. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "implements" is used as a type annotation of a local variable. -/// @author rodionov - - -main() { - implements foo; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error to use a built-in identifier other than +/// dynamic as a type annotation or type parameter. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "implements" is used as a type annotation of a local variable. +/// @author rodionov + + +main() { + implements foo; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t08.dart b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t08.dart index 9fdaea5763..7538bdeab4 100644 --- a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t08.dart +++ b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t08.dart @@ -1,17 +1,17 @@ -// 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 It is a compile-time error to use a built-in identifier other than -/// dynamic as a type annotation or type parameter. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "import" is used as a type annotation of a local variable. -/// @author rodionov - - -main() { - import foo; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error to use a built-in identifier other than +/// dynamic as a type annotation or type parameter. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "import" is used as a type annotation of a local variable. +/// @author rodionov + + +main() { + import foo; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t09.dart b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t09.dart index 9d0dcd417d..eae7efe430 100644 --- a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t09.dart +++ b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t09.dart @@ -1,17 +1,17 @@ -// 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 It is a compile-time error to use a built-in identifier other than -/// dynamic as a type annotation or type parameter. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "part" is used as a type annotation of a local variable. -/// @author rodionov - - -main() { - part foo; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error to use a built-in identifier other than +/// dynamic as a type annotation or type parameter. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "part" is used as a type annotation of a local variable. +/// @author rodionov + + +main() { + part foo; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t10.dart b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t10.dart index d78510e6f2..7764ee72e6 100644 --- a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t10.dart +++ b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t10.dart @@ -1,17 +1,17 @@ -// 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 It is a compile-time error to use a built-in identifier other than -/// dynamic as a type annotation or type parameter. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "operator" is used as a type annotation of a local variable. -/// @author rodionov - - -main() { - operator foo; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error to use a built-in identifier other than +/// dynamic as a type annotation or type parameter. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "operator" is used as a type annotation of a local variable. +/// @author rodionov + + +main() { + operator foo; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t11.dart b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t11.dart index 53c9f1deb1..9f1b1be676 100644 --- a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t11.dart +++ b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t11.dart @@ -1,17 +1,17 @@ -// 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 It is a compile-time error to use a built-in identifier other than -/// dynamic as a type annotation or type parameter. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "set" is used as a type annotation of a local variable. -/// @author rodionov - - -main() { - set foo; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error to use a built-in identifier other than +/// dynamic as a type annotation or type parameter. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "set" is used as a type annotation of a local variable. +/// @author rodionov + + +main() { + set foo; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t12.dart b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t12.dart index 37cfc562ae..38ea8c313b 100644 --- a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t12.dart +++ b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t12.dart @@ -1,17 +1,17 @@ -// 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 It is a compile-time error to use a built-in identifier other than -/// dynamic as a type annotation or type parameter. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "static" is used as a type annotation of a local variable. -/// @author rodionov - - -main() { - static foo; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error to use a built-in identifier other than +/// dynamic as a type annotation or type parameter. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "static" is used as a type annotation of a local variable. +/// @author rodionov + + +main() { + static foo; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t13.dart b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t13.dart index 3c0b9a8492..f014d4429a 100644 --- a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t13.dart +++ b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t13.dart @@ -1,17 +1,17 @@ -// 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 It is a compile-time error to use a built-in identifier other than -/// dynamic as a type annotation or type parameter. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "typedef" is used as a type annotation of a local variable. -/// @author rodionov - - -main() { - typedef foo; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error to use a built-in identifier other than +/// dynamic as a type annotation or type parameter. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "typedef" is used as a type annotation of a local variable. +/// @author rodionov + + +main() { + typedef foo; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t14.dart b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t14.dart index 3555be6508..f065e7eb78 100644 --- a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t14.dart +++ b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t14.dart @@ -1,19 +1,19 @@ -// Copyright (c) 2016, 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 It is a compile-time error to use a built-in identifier other than -/// dynamic as a type annotation or type parameter. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "deferred" is used as a type annotation of a local variable. -/// @issue 25732 -/// @author ngl@unipro.ru - - -main() { - deferred foo; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// Copyright (c) 2016, 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 It is a compile-time error to use a built-in identifier other than +/// dynamic as a type annotation or type parameter. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "deferred" is used as a type annotation of a local variable. +/// @issue 25732 +/// @author ngl@unipro.ru + + +main() { + deferred foo; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t15.dart b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t15.dart index 5af1bf4741..3310cf3622 100644 --- a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t15.dart +++ b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t15.dart @@ -1,18 +1,18 @@ -// Copyright (c) 2016, 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 It is a compile-time error to use a built-in identifier other than -/// dynamic as a type annotation or type parameter. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "external" is used as a type annotation of a local variable. -/// @author ngl@unipro.ru - - -main() { - external foo; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// Copyright (c) 2016, 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 It is a compile-time error to use a built-in identifier other than +/// dynamic as a type annotation or type parameter. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "external" is used as a type annotation of a local variable. +/// @author ngl@unipro.ru + + +main() { + external foo; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t16.dart b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t16.dart index 8ac69c5a62..dd20080f3a 100644 --- a/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t16.dart +++ b/Language/Expressions/Identifier_Reference/built_in_not_dynamic_t16.dart @@ -1,18 +1,18 @@ -// Copyright (c) 2016, 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 It is a compile-time error to use a built-in identifier other than -/// dynamic as a type annotation or type parameter. -/// @description Checks that it is a compile-time error if a built-in identifier -/// "library" is used as a type annotation of a local variable. -/// @author ngl@unipro.ru - - -main() { - library foo; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// Copyright (c) 2016, 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 It is a compile-time error to use a built-in identifier other than +/// dynamic as a type annotation or type parameter. +/// @description Checks that it is a compile-time error if a built-in identifier +/// "library" is used as a type annotation of a local variable. +/// @author ngl@unipro.ru + + +main() { + library foo; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Expressions/Identifier_Reference/syntax_t02.dart b/Language/Expressions/Identifier_Reference/syntax_t02.dart index aaab17f7c3..0ed43c894d 100644 --- a/Language/Expressions/Identifier_Reference/syntax_t02.dart +++ b/Language/Expressions/Identifier_Reference/syntax_t02.dart @@ -1,44 +1,44 @@ -// 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 An identifier expression consists of a single identifier; it -/// provides access to an object via an unqualified name. -/// identifier: -/// IDENTIFIER -/// ; -/// IDENTIFIER_NO_DOLLAR: -/// IDENTIFIER_START_NO_DOLLAR IDENTIFIER_PART_NO_DOLLAR* -/// ; -/// IDENTIFIER: -/// IDENTIFIER_START IDENTIFIER_PART* -/// ; -/// IDENTIFIER_START: -/// IDENTIFIER_START_NO_DOLLAR | -/// '$' -/// ; -/// IDENTIFIER_START_NO_DOLLAR: -/// LETTER | -/// '_' -/// ; -/// IDENTIFIER_PART_NO_DOLLAR: -/// IDENTIFIER_START_NO_DOLLAR | -/// DIGIT -/// ; -/// IDENTIFIER_PART: -/// IDENTIFIER_START | -/// DIGIT -/// ; -/// LETTER: -/// ‘a’ .. ‘z’ | -/// ‘A’ ..‘Z’ -/// ; -/// @description Checks that identifier can't start with digit. -/// @author msyabro - -main() { - int? 1a; //# 01: syntax error - String 2b = "It's wrong!"; //# 02: syntax error - var 3c; //# 03: syntax error - 4d; //# 04: syntax error -} +// 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 An identifier expression consists of a single identifier; it +/// provides access to an object via an unqualified name. +/// identifier: +/// IDENTIFIER +/// ; +/// IDENTIFIER_NO_DOLLAR: +/// IDENTIFIER_START_NO_DOLLAR IDENTIFIER_PART_NO_DOLLAR* +/// ; +/// IDENTIFIER: +/// IDENTIFIER_START IDENTIFIER_PART* +/// ; +/// IDENTIFIER_START: +/// IDENTIFIER_START_NO_DOLLAR | +/// '$' +/// ; +/// IDENTIFIER_START_NO_DOLLAR: +/// LETTER | +/// '_' +/// ; +/// IDENTIFIER_PART_NO_DOLLAR: +/// IDENTIFIER_START_NO_DOLLAR | +/// DIGIT +/// ; +/// IDENTIFIER_PART: +/// IDENTIFIER_START | +/// DIGIT +/// ; +/// LETTER: +/// ‘a’ .. ‘z’ | +/// ‘A’ ..‘Z’ +/// ; +/// @description Checks that identifier can't start with digit. +/// @author msyabro + +main() { + int? 1a; //# 01: syntax error + String 2b = "It's wrong!"; //# 02: syntax error + var 3c; //# 03: syntax error + 4d; //# 04: syntax error +} diff --git a/Language/Expressions/Identifier_Reference/syntax_t04.dart b/Language/Expressions/Identifier_Reference/syntax_t04.dart index 165a80bdca..a25c20b844 100644 --- a/Language/Expressions/Identifier_Reference/syntax_t04.dart +++ b/Language/Expressions/Identifier_Reference/syntax_t04.dart @@ -1,53 +1,53 @@ -// 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 An identifier expression consists of a single identifier; it -/// provides access to an object via an unqualified name. -/// identifier: -/// IDENTIFIER -/// ; -/// IDENTIFIER_NO_DOLLAR: -/// IDENTIFIER_START_NO_DOLLAR IDENTIFIER_PART_NO_DOLLAR* -/// ; -/// IDENTIFIER: -/// IDENTIFIER_START IDENTIFIER_PART* -/// ; -/// IDENTIFIER_START: -/// IDENTIFIER_START_NO_DOLLAR | -/// '$' -/// ; -/// IDENTIFIER_START_NO_DOLLAR: -/// LETTER | -/// '_' -/// ; -/// IDENTIFIER_PART_NO_DOLLAR: -/// IDENTIFIER_START_NO_DOLLAR | -/// DIGIT -/// ; -/// IDENTIFIER_PART: -/// IDENTIFIER_START | -/// DIGIT -/// ; -/// LETTER: -/// ‘a’ .. ‘z’ | -/// ‘A’ ..‘Z’ -/// ; -/// @description Checks that identifier can't contain ' ' symbol. -/// @author msyabro - -class C { - bool x() { - return y y; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } -} - -main() { - С(); -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An identifier expression consists of a single identifier; it +/// provides access to an object via an unqualified name. +/// identifier: +/// IDENTIFIER +/// ; +/// IDENTIFIER_NO_DOLLAR: +/// IDENTIFIER_START_NO_DOLLAR IDENTIFIER_PART_NO_DOLLAR* +/// ; +/// IDENTIFIER: +/// IDENTIFIER_START IDENTIFIER_PART* +/// ; +/// IDENTIFIER_START: +/// IDENTIFIER_START_NO_DOLLAR | +/// '$' +/// ; +/// IDENTIFIER_START_NO_DOLLAR: +/// LETTER | +/// '_' +/// ; +/// IDENTIFIER_PART_NO_DOLLAR: +/// IDENTIFIER_START_NO_DOLLAR | +/// DIGIT +/// ; +/// IDENTIFIER_PART: +/// IDENTIFIER_START | +/// DIGIT +/// ; +/// LETTER: +/// ‘a’ .. ‘z’ | +/// ‘A’ ..‘Z’ +/// ; +/// @description Checks that identifier can't contain ' ' symbol. +/// @author msyabro + +class C { + bool x() { + return y y; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + С(); +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Identifier_Reference/syntax_t06.dart b/Language/Expressions/Identifier_Reference/syntax_t06.dart index 5251dcaf09..7cccb5852b 100644 --- a/Language/Expressions/Identifier_Reference/syntax_t06.dart +++ b/Language/Expressions/Identifier_Reference/syntax_t06.dart @@ -1,57 +1,57 @@ -// 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 An identifier expression consists of a single identifier; it -/// provides access to an object via an unqualified name. -/// identifier: -/// IDENTIFIER -/// ; -/// IDENTIFIER_NO_DOLLAR: -/// IDENTIFIER_START_NO_DOLLAR IDENTIFIER_PART_NO_DOLLAR* -/// ; -/// IDENTIFIER: -/// IDENTIFIER_START IDENTIFIER_PART* -/// ; -/// IDENTIFIER_START: -/// IDENTIFIER_START_NO_DOLLAR | -/// '$' -/// ; -/// IDENTIFIER_START_NO_DOLLAR: -/// LETTER | -/// '_' -/// ; -/// IDENTIFIER_PART_NO_DOLLAR: -/// IDENTIFIER_START_NO_DOLLAR | -/// DIGIT -/// ; -/// IDENTIFIER_PART: -/// IDENTIFIER_START | -/// DIGIT -/// ; -/// LETTER: -/// ‘a’ .. ‘z’ | -/// ‘A’ ..‘Z’ -/// ; -/// @description Checks that identifier can't contain '@' symbol. -/// @author msyabro - -main() { - int? a@; -//^^^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified - - String b@ = "It's wrong!"; -//^^ -// [analyzer] unspecified -// [cfe] unspecified - - var c@; -// ^^^ -// [analyzer] unspecified -// [cfe] unspecified - } -//^ -// [analyzer] unspecified -// [cfe] unspecified +// 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 An identifier expression consists of a single identifier; it +/// provides access to an object via an unqualified name. +/// identifier: +/// IDENTIFIER +/// ; +/// IDENTIFIER_NO_DOLLAR: +/// IDENTIFIER_START_NO_DOLLAR IDENTIFIER_PART_NO_DOLLAR* +/// ; +/// IDENTIFIER: +/// IDENTIFIER_START IDENTIFIER_PART* +/// ; +/// IDENTIFIER_START: +/// IDENTIFIER_START_NO_DOLLAR | +/// '$' +/// ; +/// IDENTIFIER_START_NO_DOLLAR: +/// LETTER | +/// '_' +/// ; +/// IDENTIFIER_PART_NO_DOLLAR: +/// IDENTIFIER_START_NO_DOLLAR | +/// DIGIT +/// ; +/// IDENTIFIER_PART: +/// IDENTIFIER_START | +/// DIGIT +/// ; +/// LETTER: +/// ‘a’ .. ‘z’ | +/// ‘A’ ..‘Z’ +/// ; +/// @description Checks that identifier can't contain '@' symbol. +/// @author msyabro + +main() { + int? a@; +//^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + String b@ = "It's wrong!"; +//^^ +// [analyzer] unspecified +// [cfe] unspecified + + var c@; +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified + } +//^ +// [analyzer] unspecified +// [cfe] unspecified diff --git a/Language/Expressions/Identifier_Reference/syntax_t07.dart b/Language/Expressions/Identifier_Reference/syntax_t07.dart index 89bcb73ef1..5519f3c051 100644 --- a/Language/Expressions/Identifier_Reference/syntax_t07.dart +++ b/Language/Expressions/Identifier_Reference/syntax_t07.dart @@ -1,45 +1,45 @@ -// 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 An identifier expression consists of a single identifier; it -/// provides access to an object via an unqualified name. -/// identifier: -/// IDENTIFIER -/// ; -/// IDENTIFIER_NO_DOLLAR: -/// IDENTIFIER_START_NO_DOLLAR IDENTIFIER_PART_NO_DOLLAR* -/// ; -/// IDENTIFIER: -/// IDENTIFIER_START IDENTIFIER_PART* -/// ; -/// IDENTIFIER_START: -/// IDENTIFIER_START_NO_DOLLAR | -/// '$' -/// ; -/// IDENTIFIER_START_NO_DOLLAR: -/// LETTER | -/// '_' -/// ; -/// IDENTIFIER_PART_NO_DOLLAR: -/// IDENTIFIER_START_NO_DOLLAR | -/// DIGIT -/// ; -/// IDENTIFIER_PART: -/// IDENTIFIER_START | -/// DIGIT -/// ; -/// LETTER: -/// ‘a’ .. ‘z’ | -/// ‘A’ ..‘Z’ -/// ; -/// @description Checks that identifier can't contain letters -/// from the cyrillic alphabet. -/// @author msyabro - -main() { - int? а; //# 01: syntax error - String б = "It's wrong!"; //# 02: syntax error - var в1; //# 03: syntax error - д2; //# 04: syntax error -} +// 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 An identifier expression consists of a single identifier; it +/// provides access to an object via an unqualified name. +/// identifier: +/// IDENTIFIER +/// ; +/// IDENTIFIER_NO_DOLLAR: +/// IDENTIFIER_START_NO_DOLLAR IDENTIFIER_PART_NO_DOLLAR* +/// ; +/// IDENTIFIER: +/// IDENTIFIER_START IDENTIFIER_PART* +/// ; +/// IDENTIFIER_START: +/// IDENTIFIER_START_NO_DOLLAR | +/// '$' +/// ; +/// IDENTIFIER_START_NO_DOLLAR: +/// LETTER | +/// '_' +/// ; +/// IDENTIFIER_PART_NO_DOLLAR: +/// IDENTIFIER_START_NO_DOLLAR | +/// DIGIT +/// ; +/// IDENTIFIER_PART: +/// IDENTIFIER_START | +/// DIGIT +/// ; +/// LETTER: +/// ‘a’ .. ‘z’ | +/// ‘A’ ..‘Z’ +/// ; +/// @description Checks that identifier can't contain letters +/// from the cyrillic alphabet. +/// @author msyabro + +main() { + int? а; //# 01: syntax error + String б = "It's wrong!"; //# 02: syntax error + var в1; //# 03: syntax error + д2; //# 04: syntax error +} diff --git a/Language/Expressions/Identifier_Reference/syntax_t09.dart b/Language/Expressions/Identifier_Reference/syntax_t09.dart index f8a04b70f4..bb0abfdb8b 100644 --- a/Language/Expressions/Identifier_Reference/syntax_t09.dart +++ b/Language/Expressions/Identifier_Reference/syntax_t09.dart @@ -1,46 +1,46 @@ -// 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 An identifier expression consists of a single identifier; it -/// provides access to an object via an unqualified name. -/// identifier: -/// IDENTIFIER -/// ; -/// IDENTIFIER_NO_DOLLAR: -/// IDENTIFIER_START_NO_DOLLAR IDENTIFIER_PART_NO_DOLLAR* -/// ; -/// IDENTIFIER: -/// IDENTIFIER_START IDENTIFIER_PART* -/// ; -/// IDENTIFIER_START: -/// IDENTIFIER_START_NO_DOLLAR | -/// '$' -/// ; -/// IDENTIFIER_START_NO_DOLLAR: -/// LETTER | -/// '_' -/// ; -/// IDENTIFIER_PART_NO_DOLLAR: -/// IDENTIFIER_START_NO_DOLLAR | -/// DIGIT -/// ; -/// IDENTIFIER_PART: -/// IDENTIFIER_START | -/// DIGIT -/// ; -/// LETTER: -/// ‘a’ .. ‘z’ | -/// ‘A’ ..‘Z’ -/// ; -/// @description Checks that neither backslashes, nor unicode escape sequences -/// are allowed in identifiers. -/// @author iefremov - - -main() { - var abc\u0061=1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An identifier expression consists of a single identifier; it +/// provides access to an object via an unqualified name. +/// identifier: +/// IDENTIFIER +/// ; +/// IDENTIFIER_NO_DOLLAR: +/// IDENTIFIER_START_NO_DOLLAR IDENTIFIER_PART_NO_DOLLAR* +/// ; +/// IDENTIFIER: +/// IDENTIFIER_START IDENTIFIER_PART* +/// ; +/// IDENTIFIER_START: +/// IDENTIFIER_START_NO_DOLLAR | +/// '$' +/// ; +/// IDENTIFIER_START_NO_DOLLAR: +/// LETTER | +/// '_' +/// ; +/// IDENTIFIER_PART_NO_DOLLAR: +/// IDENTIFIER_START_NO_DOLLAR | +/// DIGIT +/// ; +/// IDENTIFIER_PART: +/// IDENTIFIER_START | +/// DIGIT +/// ; +/// LETTER: +/// ‘a’ .. ‘z’ | +/// ‘A’ ..‘Z’ +/// ; +/// @description Checks that neither backslashes, nor unicode escape sequences +/// are allowed in identifiers. +/// @author iefremov + + +main() { + var abc\u0061=1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Instance_Creation/Const/accessibility_t01.dart b/Language/Expressions/Instance_Creation/Const/accessibility_t01.dart index e69b6a7e3e..e4e5f8d127 100644 --- a/Language/Expressions/Instance_Creation/Const/accessibility_t01.dart +++ b/Language/Expressions/Instance_Creation/Const/accessibility_t01.dart @@ -1,19 +1,19 @@ -// 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 Let e be a constant object expression of the form -/// const T.id(a1, .., an, xn+1: an+1, ..., xn+k: an+k) or the form -/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). It is a compile-time -/// error if T does not denote a class accessible in the current scope. -/// @description Checks that it is a compile-time error if T does not denote -/// any declaration. -/// @author msyabro - - -main() { - const UnavailableType(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Let e be a constant object expression of the form +/// const T.id(a1, .., an, xn+1: an+1, ..., xn+k: an+k) or the form +/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). It is a compile-time +/// error if T does not denote a class accessible in the current scope. +/// @description Checks that it is a compile-time error if T does not denote +/// any declaration. +/// @author msyabro + + +main() { + const UnavailableType(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Instance_Creation/Const/accessibility_t02.dart b/Language/Expressions/Instance_Creation/Const/accessibility_t02.dart index f58b432eb1..bb19dcaabf 100644 --- a/Language/Expressions/Instance_Creation/Const/accessibility_t02.dart +++ b/Language/Expressions/Instance_Creation/Const/accessibility_t02.dart @@ -1,19 +1,19 @@ -// 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 Let e be a constant object expression of the form -/// const T.id(a1, .., an, xn+1: an+1, ..., xn+k: an+k) or the form -/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). It is a compile-time -/// error if T does not denote a class accessible in the current scope. -/// @description Checks that it is a compile-time error if T does not denote -/// any declaration. Named constructor case. -/// @author msyabro - - -main() { - const UnavailableType.named(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Let e be a constant object expression of the form +/// const T.id(a1, .., an, xn+1: an+1, ..., xn+k: an+k) or the form +/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). It is a compile-time +/// error if T does not denote a class accessible in the current scope. +/// @description Checks that it is a compile-time error if T does not denote +/// any declaration. Named constructor case. +/// @author msyabro + + +main() { + const UnavailableType.named(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Instance_Creation/Const/accessibility_t03.dart b/Language/Expressions/Instance_Creation/Const/accessibility_t03.dart index 80afee2f3f..3c47e4f117 100644 --- a/Language/Expressions/Instance_Creation/Const/accessibility_t03.dart +++ b/Language/Expressions/Instance_Creation/Const/accessibility_t03.dart @@ -1,21 +1,21 @@ -// 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 Let e be a constant object expression of the form -/// const T.id(a1, .., an, xn+1: an+1, ..., xn+k: an+k) or the form -/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). It is a compile-time -/// error if T does not denote a class accessible in the current scope. -/// @description Checks that it is a compile-time error if T is a reference to -/// a top-level function. -/// @author msyabro - - -func() {} - -main() { - const func(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Let e be a constant object expression of the form +/// const T.id(a1, .., an, xn+1: an+1, ..., xn+k: an+k) or the form +/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). It is a compile-time +/// error if T does not denote a class accessible in the current scope. +/// @description Checks that it is a compile-time error if T is a reference to +/// a top-level function. +/// @author msyabro + + +func() {} + +main() { + const func(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Instance_Creation/Const/accessibility_t04.dart b/Language/Expressions/Instance_Creation/Const/accessibility_t04.dart index 3ba9008d6c..7d63294a1d 100644 --- a/Language/Expressions/Instance_Creation/Const/accessibility_t04.dart +++ b/Language/Expressions/Instance_Creation/Const/accessibility_t04.dart @@ -1,23 +1,23 @@ -// 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 Let e be a constant object expression of the form -/// const T.id(a1, .., an, xn+1: an+1, ..., xn+k: an+k) or the form -/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). It is a compile-time -/// error if T does not denote a class accessible in the current scope. -/// @description Checks that it is a compile-time error if T is a reference to -/// a static method. -/// @author msyabro - - -class A { - static method() {} -} - -main() { - const A.method(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Let e be a constant object expression of the form +/// const T.id(a1, .., an, xn+1: an+1, ..., xn+k: an+k) or the form +/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). It is a compile-time +/// error if T does not denote a class accessible in the current scope. +/// @description Checks that it is a compile-time error if T is a reference to +/// a static method. +/// @author msyabro + + +class A { + static method() {} +} + +main() { + const A.method(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Instance_Creation/Const/accessibility_t05.dart b/Language/Expressions/Instance_Creation/Const/accessibility_t05.dart index 9691a26234..2f9951e24c 100644 --- a/Language/Expressions/Instance_Creation/Const/accessibility_t05.dart +++ b/Language/Expressions/Instance_Creation/Const/accessibility_t05.dart @@ -1,21 +1,21 @@ -// 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 Let e be a constant object expression of the form -/// const T.id(a1, .., an, xn+1: an+1, ..., xn+k: an+k) or the form -/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). It is a compile-time -/// error if T does not denote a class accessible in the current scope. -/// @description Checks that it is a compile-time error if T is a reference to -/// a top-level variable. -/// @author msyabro - - -final c = 1; - -main() { - const c(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Let e be a constant object expression of the form +/// const T.id(a1, .., an, xn+1: an+1, ..., xn+k: an+k) or the form +/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). It is a compile-time +/// error if T does not denote a class accessible in the current scope. +/// @description Checks that it is a compile-time error if T is a reference to +/// a top-level variable. +/// @author msyabro + + +final c = 1; + +main() { + const c(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Instance_Creation/Const/accessibility_t06.dart b/Language/Expressions/Instance_Creation/Const/accessibility_t06.dart index 40f61d5053..0d02507d11 100644 --- a/Language/Expressions/Instance_Creation/Const/accessibility_t06.dart +++ b/Language/Expressions/Instance_Creation/Const/accessibility_t06.dart @@ -1,20 +1,20 @@ -// 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 Let e be a constant object expression of the form -/// const T.id(a1, .., an, xn+1: an+1, ..., xn+k: an+k) or the form -/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). It is a compile-time -/// error if T does not denote a class accessible in the current scope. -/// @description Checks that it is a compile-time error if T is a type alias. -/// @author msyabro - - -typedef foo(); - -main() { - const foo(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Let e be a constant object expression of the form +/// const T.id(a1, .., an, xn+1: an+1, ..., xn+k: an+k) or the form +/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). It is a compile-time +/// error if T does not denote a class accessible in the current scope. +/// @description Checks that it is a compile-time error if T is a type alias. +/// @author msyabro + + +typedef foo(); + +main() { + const foo(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Instance_Creation/Const/accessibility_t07.dart b/Language/Expressions/Instance_Creation/Const/accessibility_t07.dart index 5903b8a589..c2d47a249f 100644 --- a/Language/Expressions/Instance_Creation/Const/accessibility_t07.dart +++ b/Language/Expressions/Instance_Creation/Const/accessibility_t07.dart @@ -1,28 +1,28 @@ -// 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 Let e be a constant object expression of the form -/// const T.id(a1, .., an, xn+1: an+1, ..., xn+k: an+k) or the form -/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). It is a compile-time -/// error if T does not denote a class accessible in the current scope. -/// @description Checks that it is a compile-time error if T is a type variable. -/// @author msyabro - - -class A { - const A(); -} - -class C { - test() { - const T(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } -} - -main() { - C(); -} +// 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 Let e be a constant object expression of the form +/// const T.id(a1, .., an, xn+1: an+1, ..., xn+k: an+k) or the form +/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). It is a compile-time +/// error if T does not denote a class accessible in the current scope. +/// @description Checks that it is a compile-time error if T is a type variable. +/// @author msyabro + + +class A { + const A(); +} + +class C { + test() { + const T(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + C(); +} diff --git a/Language/Expressions/Instance_Creation/Const/arguments_t01.dart b/Language/Expressions/Instance_Creation/Const/arguments_t01.dart index 6281cfb060..74defb0930 100644 --- a/Language/Expressions/Instance_Creation/Const/arguments_t01.dart +++ b/Language/Expressions/Instance_Creation/Const/arguments_t01.dart @@ -1,24 +1,24 @@ -// 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 Let e be a constant object expression of the form -/// const T.id(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) or the form -/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). It is a compile-time -/// error if ai, 1 < = i <= n + k, is not a compile-time constant expression. -/// @description Checks that it is a compile-time error if any positional -/// arguments of a constant object expression are not compile-time constants. -/// @author msyabro - - -class T { - const T(p1, p2, p3); -} - -main() { - Object o = Object(); - const T(1, o, 2); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Let e be a constant object expression of the form +/// const T.id(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) or the form +/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). It is a compile-time +/// error if ai, 1 < = i <= n + k, is not a compile-time constant expression. +/// @description Checks that it is a compile-time error if any positional +/// arguments of a constant object expression are not compile-time constants. +/// @author msyabro + + +class T { + const T(p1, p2, p3); +} + +main() { + Object o = Object(); + const T(1, o, 2); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Instance_Creation/Const/arguments_t02.dart b/Language/Expressions/Instance_Creation/Const/arguments_t02.dart index 3ef8ca6168..4712f8666b 100644 --- a/Language/Expressions/Instance_Creation/Const/arguments_t02.dart +++ b/Language/Expressions/Instance_Creation/Const/arguments_t02.dart @@ -1,24 +1,24 @@ -// 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 Let e be a constant object expression of the form -/// const T.id(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) or the form -/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). It is a compile-time -/// error if ai, 1 < = i <= n + k, is not a compile-time constant expression. -/// @description Checks that it is a compile-time error if any named arguments -/// of a constant object expression are not compile-time constants. -/// @author msyabro - - -class T { - const T(p1, {p2, p3}); -} - -main() { - int i = 2; - const T(1, p2: i, p3: [0, 1]); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Let e be a constant object expression of the form +/// const T.id(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) or the form +/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). It is a compile-time +/// error if ai, 1 < = i <= n + k, is not a compile-time constant expression. +/// @description Checks that it is a compile-time error if any named arguments +/// of a constant object expression are not compile-time constants. +/// @author msyabro + + +class T { + const T(p1, {p2, p3}); +} + +main() { + int i = 2; + const T(1, p2: i, p3: [0, 1]); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Instance_Creation/Const/arguments_t03.dart b/Language/Expressions/Instance_Creation/Const/arguments_t03.dart index ee58b43d00..39074d1444 100644 --- a/Language/Expressions/Instance_Creation/Const/arguments_t03.dart +++ b/Language/Expressions/Instance_Creation/Const/arguments_t03.dart @@ -1,25 +1,25 @@ -// 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 Let e be a constant object expression of the form -/// const T.id(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) or the form -/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). It is a compile-time -/// error if ai, 1 < = i <= n + k, is not a compile-time constant expression. -/// @description Checks that it is a compile-time error if any optional -/// positional arguments of a constant object expression are not compile-time -/// constants. -/// @author ilya - - -class T { - const T(p1, [p2, p3]); -} - -main() { - int i = 14; - const T(1, i, [0, 1]); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Let e be a constant object expression of the form +/// const T.id(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) or the form +/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). It is a compile-time +/// error if ai, 1 < = i <= n + k, is not a compile-time constant expression. +/// @description Checks that it is a compile-time error if any optional +/// positional arguments of a constant object expression are not compile-time +/// constants. +/// @author ilya + + +class T { + const T(p1, [p2, p3]); +} + +main() { + int i = 14; + const T(1, i, [0, 1]); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Instance_Creation/Const/constant_constructor_name_t01.dart b/Language/Expressions/Instance_Creation/Const/constant_constructor_name_t01.dart index e0cf87e7ad..8ea26b7fe0 100644 --- a/Language/Expressions/Instance_Creation/Const/constant_constructor_name_t01.dart +++ b/Language/Expressions/Instance_Creation/Const/constant_constructor_name_t01.dart @@ -1,21 +1,21 @@ -// 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 If e is of the form -/// const T.id(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) it is a compile-time -/// error if T.id is not the name of a constant constructor declared by the -/// type T. -/// @description Checks that it is a compile-time error if T.id -/// is not a name of any constructor declared by the type T. -/// @author msyabro - - -class A {} - -main() { - const A.nonexistentConstructor(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 If e is of the form +/// const T.id(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) it is a compile-time +/// error if T.id is not the name of a constant constructor declared by the +/// type T. +/// @description Checks that it is a compile-time error if T.id +/// is not a name of any constructor declared by the type T. +/// @author msyabro + + +class A {} + +main() { + const A.nonexistentConstructor(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Instance_Creation/Const/constant_constructor_name_t02.dart b/Language/Expressions/Instance_Creation/Const/constant_constructor_name_t02.dart index 2a49d6003b..2d8cc20d67 100644 --- a/Language/Expressions/Instance_Creation/Const/constant_constructor_name_t02.dart +++ b/Language/Expressions/Instance_Creation/Const/constant_constructor_name_t02.dart @@ -1,23 +1,23 @@ -// 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 If e is of the form -/// const T.id(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) it is a compile-time -/// error if T.id is not the name of a constant constructor declared by the -/// type T. -/// @description Checks that it is a compile-time error if T.id -/// is the name of a non-constant constructor declared by the type T. -/// @author msyabro - - -class A { - A.nonConstCtor() {} -} - -main() { - const A.nonConstCtor(); -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 If e is of the form +/// const T.id(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) it is a compile-time +/// error if T.id is not the name of a constant constructor declared by the +/// type T. +/// @description Checks that it is a compile-time error if T.id +/// is the name of a non-constant constructor declared by the type T. +/// @author msyabro + + +class A { + A.nonConstCtor() {} +} + +main() { + const A.nonConstCtor(); +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Instance_Creation/Const/constant_constructor_name_t03.dart b/Language/Expressions/Instance_Creation/Const/constant_constructor_name_t03.dart index b6736a988a..56480216d2 100644 --- a/Language/Expressions/Instance_Creation/Const/constant_constructor_name_t03.dart +++ b/Language/Expressions/Instance_Creation/Const/constant_constructor_name_t03.dart @@ -1,23 +1,23 @@ -// 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 If e is of the form -/// const T.id(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) it is a compile-time -/// error if T.id is not the name of a constant constructor declared by the -/// type T. -/// @description Checks that it is a compile-time error if id -/// is the name of an instance method declared by the type T. -/// @author msyabro - - -class A { - method() {} -} - -main() { - const A.method(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 If e is of the form +/// const T.id(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) it is a compile-time +/// error if T.id is not the name of a constant constructor declared by the +/// type T. +/// @description Checks that it is a compile-time error if id +/// is the name of an instance method declared by the type T. +/// @author msyabro + + +class A { + method() {} +} + +main() { + const A.method(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Instance_Creation/Const/constant_constructor_name_t04.dart b/Language/Expressions/Instance_Creation/Const/constant_constructor_name_t04.dart index 89d23112c8..1e8c38686c 100644 --- a/Language/Expressions/Instance_Creation/Const/constant_constructor_name_t04.dart +++ b/Language/Expressions/Instance_Creation/Const/constant_constructor_name_t04.dart @@ -1,23 +1,23 @@ -// 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 If e is of the form -/// const T.id(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) it is a compile-time -/// error if T.id is not the name of a constant constructor declared by the -/// type T. -/// @description Checks that it is a compile-time error if id -/// is the name of a static method declared by the type T. -/// @author msyabro - - -class A { - static method() {} -} - -main() { - const A.method(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 If e is of the form +/// const T.id(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) it is a compile-time +/// error if T.id is not the name of a constant constructor declared by the +/// type T. +/// @description Checks that it is a compile-time error if id +/// is the name of a static method declared by the type T. +/// @author msyabro + + +class A { + static method() {} +} + +main() { + const A.method(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Instance_Creation/Const/constant_constructor_same_name_as_class_t01.dart b/Language/Expressions/Instance_Creation/Const/constant_constructor_same_name_as_class_t01.dart index f62c9459d6..79b9b9a606 100644 --- a/Language/Expressions/Instance_Creation/Const/constant_constructor_same_name_as_class_t01.dart +++ b/Language/Expressions/Instance_Creation/Const/constant_constructor_same_name_as_class_t01.dart @@ -1,23 +1,23 @@ -// 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 If e of the form -/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) it is a compile-time -/// error if the type T does not declare a constant constructor with the same -/// name as the declaration of T. -/// @description Checks that it is a compile-time error if T does not declare a -/// constant constructor with the same name as the declaration of T. -/// @author msyabro - - -class T { - const T.name(); -} - -main() { - const T(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 If e of the form +/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) it is a compile-time +/// error if the type T does not declare a constant constructor with the same +/// name as the declaration of T. +/// @description Checks that it is a compile-time error if T does not declare a +/// constant constructor with the same name as the declaration of T. +/// @author msyabro + + +class T { + const T.name(); +} + +main() { + const T(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Instance_Creation/Const/constant_constructor_same_name_as_class_t02.dart b/Language/Expressions/Instance_Creation/Const/constant_constructor_same_name_as_class_t02.dart index 15d17e1353..09f1f716e9 100644 --- a/Language/Expressions/Instance_Creation/Const/constant_constructor_same_name_as_class_t02.dart +++ b/Language/Expressions/Instance_Creation/Const/constant_constructor_same_name_as_class_t02.dart @@ -1,23 +1,23 @@ -// 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 If e of the form -/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) it is a compile-time -/// error if the type T does not declare a constant constructor with the same -/// name as the declaration of T. -/// @description Checks that it is a compile-time error if T declares a -/// non-constant constructor with the same name as the declaration of T. -/// @author msyabro - - -class T { - T() {} -} - -main() { - const T(); -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 If e of the form +/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) it is a compile-time +/// error if the type T does not declare a constant constructor with the same +/// name as the declaration of T. +/// @description Checks that it is a compile-time error if T declares a +/// non-constant constructor with the same name as the declaration of T. +/// @author msyabro + + +class T { + T() {} +} + +main() { + const T(); +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Instance_Creation/Const/exception_t01.dart b/Language/Expressions/Instance_Creation/Const/exception_t01.dart index ce47f6fb0c..80f7f7050a 100644 --- a/Language/Expressions/Instance_Creation/Const/exception_t01.dart +++ b/Language/Expressions/Instance_Creation/Const/exception_t01.dart @@ -1,26 +1,26 @@ -// 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 It is a compile-time error if evaluation of a constant object -/// results in an uncaught exception being thrown. -/// @description Checks that it is a compile-time error if evaluation of a -/// constant object results in an uncaught exception being thrown. -/// @author msyabro - - -class A { - const A(): x = 1 ~/ 0; // IntegerDivisionByZeroException - final x; -} - -const a = const A(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - try { - a; - } catch (e) {} -} +// 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 It is a compile-time error if evaluation of a constant object +/// results in an uncaught exception being thrown. +/// @description Checks that it is a compile-time error if evaluation of a +/// constant object results in an uncaught exception being thrown. +/// @author msyabro + + +class A { + const A(): x = 1 ~/ 0; // IntegerDivisionByZeroException + final x; +} + +const a = const A(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + try { + a; + } catch (e) {} +} diff --git a/Language/Expressions/Instance_Creation/Const/parameterized_type_t01.dart b/Language/Expressions/Instance_Creation/Const/parameterized_type_t01.dart index b485e31c89..2fddf5a695 100644 --- a/Language/Expressions/Instance_Creation/Const/parameterized_type_t01.dart +++ b/Language/Expressions/Instance_Creation/Const/parameterized_type_t01.dart @@ -1,31 +1,31 @@ -// 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 Let e be a constant object expression of the form -/// const T.id(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) or the form -/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). -/// If T is a parameterized type, it is a compile-time error if T includes -/// a type variable among its type arguments. -/// @description Checks that it is an error if T includes any type parameters as -/// a type argument. -/// @issue 27492 -/// @author msyabro - - -class S { - const S(); -} - -class A { - test() { - const S(); //type variable as a type argument -// ^ -// [analyzer]unspecified -// [cfe]unspecified - } -} - -main() { - A(); -} +// 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 Let e be a constant object expression of the form +/// const T.id(a1, ..., an, xn+1: an+1, ..., xn+k: an+k) or the form +/// const T(a1, ..., an, xn+1: an+1, ..., xn+k: an+k). +/// If T is a parameterized type, it is a compile-time error if T includes +/// a type variable among its type arguments. +/// @description Checks that it is an error if T includes any type parameters as +/// a type argument. +/// @issue 27492 +/// @author msyabro + + +class S { + const S(); +} + +class A { + test() { + const S(); //type variable as a type argument +// ^ +// [analyzer]unspecified +// [cfe]unspecified + } +} + +main() { + A(); +} diff --git a/Language/Expressions/Instance_Creation/Const/parameterized_type_t02.dart b/Language/Expressions/Instance_Creation/Const/parameterized_type_t02.dart index 34ce8a969a..389c4b2a3a 100644 --- a/Language/Expressions/Instance_Creation/Const/parameterized_type_t02.dart +++ b/Language/Expressions/Instance_Creation/Const/parameterized_type_t02.dart @@ -1,31 +1,31 @@ -// 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 Let e be a constant object expression of the form -/// const T.id(a1, .., an, xn+1: an+1, …, xn+k: an+k) or the form -/// const T(a1, .., an, xn+1: an+1, …, xn+k: an+k). -/// If T is a parameterized type, it is a compile-time error if T includes -/// a type variable among its type arguments. -/// @description Checks that it is an error if T includes any type parameters as -/// a type argument. -/// @issue 27492 -/// @author kaigorodov - - -class S { - const S.named(); -} - -class A { - test() { - const S.named(); //type variable as a type argument -// ^ -// [analyzer]unspecified -// [cfe]unspecified - } -} - -main() { - new A().test(); -} +// 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 Let e be a constant object expression of the form +/// const T.id(a1, .., an, xn+1: an+1, …, xn+k: an+k) or the form +/// const T(a1, .., an, xn+1: an+1, …, xn+k: an+k). +/// If T is a parameterized type, it is a compile-time error if T includes +/// a type variable among its type arguments. +/// @description Checks that it is an error if T includes any type parameters as +/// a type argument. +/// @issue 27492 +/// @author kaigorodov + + +class S { + const S.named(); +} + +class A { + test() { + const S.named(); //type variable as a type argument +// ^ +// [analyzer]unspecified +// [cfe]unspecified + } +} + +main() { + new A().test(); +} diff --git a/Language/Expressions/Instance_Creation/Const/syntax_t03.dart b/Language/Expressions/Instance_Creation/Const/syntax_t03.dart index df92d5f08b..f11eff41be 100644 --- a/Language/Expressions/Instance_Creation/Const/syntax_t03.dart +++ b/Language/Expressions/Instance_Creation/Const/syntax_t03.dart @@ -1,23 +1,23 @@ -// 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 constant object expression invokes a constant constructor. -/// constObjectExpression: -/// const type ('.' identifier)? arguments -/// ; -/// @description Checks that it is a compile-time error if -/// a constant object expression is missing the type name. -/// @author msyabro - -class A { - final int i; - const A(this.i); -} - -main() { - const (42); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 constant object expression invokes a constant constructor. +/// constObjectExpression: +/// const type ('.' identifier)? arguments +/// ; +/// @description Checks that it is a compile-time error if +/// a constant object expression is missing the type name. +/// @author msyabro + +class A { + final int i; + const A(this.i); +} + +main() { + const (42); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Instance_Creation/Const/syntax_t04.dart b/Language/Expressions/Instance_Creation/Const/syntax_t04.dart index ec56e77956..ae64b69e35 100644 --- a/Language/Expressions/Instance_Creation/Const/syntax_t04.dart +++ b/Language/Expressions/Instance_Creation/Const/syntax_t04.dart @@ -1,23 +1,23 @@ -// 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 constant object expression invokes a constant constructor. -/// constObjectExpression: -/// const type ('.' identifier)? arguments -/// ; -/// @description Checks that it is a compile-time error if the identifier of a -/// named constructor in a constant object expression is empty. -/// @author msyabro - - -class A { - const A.name(); -} - -main() { - const A.(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 constant object expression invokes a constant constructor. +/// constObjectExpression: +/// const type ('.' identifier)? arguments +/// ; +/// @description Checks that it is a compile-time error if the identifier of a +/// named constructor in a constant object expression is empty. +/// @author msyabro + + +class A { + const A.name(); +} + +main() { + const A.(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Instance_Creation/New/syntax_t02.dart b/Language/Expressions/Instance_Creation/New/syntax_t02.dart index 4c53e7fdcd..4a5b968238 100644 --- a/Language/Expressions/Instance_Creation/New/syntax_t02.dart +++ b/Language/Expressions/Instance_Creation/New/syntax_t02.dart @@ -1,23 +1,23 @@ -// 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 The new expression invokes a constructor. -/// newExpression: -/// new type ('.' identifier)? arguments -/// ; -/// @description Checks that it is a compile-time error if a new expression does -/// not have argument brackets after the class name. -/// @author msyabro - - -class A { - A() {} -} - -main() { - new A; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The new expression invokes a constructor. +/// newExpression: +/// new type ('.' identifier)? arguments +/// ; +/// @description Checks that it is a compile-time error if a new expression does +/// not have argument brackets after the class name. +/// @author msyabro + + +class A { + A() {} +} + +main() { + new A; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Instance_Creation/New/syntax_t03.dart b/Language/Expressions/Instance_Creation/New/syntax_t03.dart index ce1ae195fc..7dfeba0c2f 100644 --- a/Language/Expressions/Instance_Creation/New/syntax_t03.dart +++ b/Language/Expressions/Instance_Creation/New/syntax_t03.dart @@ -1,23 +1,23 @@ -// 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 The new expression invokes a constructor. -/// newExpression: -/// new type ('.' identifier)? arguments -/// ; -/// @description Checks that it is a compile-time error if a new expression is -/// missing the type name. -/// @author msyabro - - -class A { - A() {} -} - -main() { - new (); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The new expression invokes a constructor. +/// newExpression: +/// new type ('.' identifier)? arguments +/// ; +/// @description Checks that it is a compile-time error if a new expression is +/// missing the type name. +/// @author msyabro + + +class A { + A() {} +} + +main() { + new (); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Instance_Creation/New/syntax_t05.dart b/Language/Expressions/Instance_Creation/New/syntax_t05.dart index 4db56ef46f..850938fa8c 100644 --- a/Language/Expressions/Instance_Creation/New/syntax_t05.dart +++ b/Language/Expressions/Instance_Creation/New/syntax_t05.dart @@ -1,23 +1,23 @@ -// 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 The new expression invokes a constructor. -/// newExpression: -/// new type ('.' identifier)? arguments -/// ; -/// @description Checks that it is a compile-time error if -/// a the identifier of a named constructor in a new expression is empty. -/// @author msyabro - - -class A { - A() {} -} - -main() { - new A.(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The new expression invokes a constructor. +/// newExpression: +/// new type ('.' identifier)? arguments +/// ; +/// @description Checks that it is a compile-time error if +/// a the identifier of a named constructor in a new expression is empty. +/// @author msyabro + + +class A { + A() {} +} + +main() { + new A.(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Lists/constant_list_t01.dart b/Language/Expressions/Lists/constant_list_t01.dart index ece541e2a0..9bfe0722cc 100644 --- a/Language/Expressions/Lists/constant_list_t01.dart +++ b/Language/Expressions/Lists/constant_list_t01.dart @@ -1,25 +1,25 @@ -// 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 It is a compile time error if an element of a constant list -/// literal is not a compile-time constant. It is a compile time error if the -/// type argument of a constant list literal includes a type parameter. -/// @description Checks that it is an error if the type argument of a constant -/// list literal includes a type variable. -/// @Issue 27492 -/// @author msyabro - - -class C { - test(T t) { - const [t, t]; -// ^ -// [analyzer]unspecified -// [cfe]unspecified - } -} - -main() { - new C().test(""); -} +// 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 It is a compile time error if an element of a constant list +/// literal is not a compile-time constant. It is a compile time error if the +/// type argument of a constant list literal includes a type parameter. +/// @description Checks that it is an error if the type argument of a constant +/// list literal includes a type variable. +/// @Issue 27492 +/// @author msyabro + + +class C { + test(T t) { + const [t, t]; +// ^ +// [analyzer]unspecified +// [cfe]unspecified + } +} + +main() { + new C().test(""); +} diff --git a/Language/Expressions/Lists/constant_list_t02.dart b/Language/Expressions/Lists/constant_list_t02.dart index c6acc019e0..d1f9d8ed65 100644 --- a/Language/Expressions/Lists/constant_list_t02.dart +++ b/Language/Expressions/Lists/constant_list_t02.dart @@ -1,22 +1,22 @@ -// 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 It is a compile time error if an element of a constant list -/// literal is not a compile-time constant. It is a compile time error if the -/// type argument of a constant list literal includes a type parameter. -/// @description Checks that a constant list literal cannot contain non-constant -/// expression. -/// @author kaigorodov - - -class A { - List a = const [1, new Date.now()]; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -} +// 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 It is a compile time error if an element of a constant list +/// literal is not a compile-time constant. It is a compile time error if the +/// type argument of a constant list literal includes a type parameter. +/// @description Checks that a constant list literal cannot contain non-constant +/// expression. +/// @author kaigorodov + + +class A { + List a = const [1, new Date.now()]; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +} diff --git a/Language/Expressions/Lists/syntax_t02.dart b/Language/Expressions/Lists/syntax_t02.dart index 9c4d8868fc..05494b4326 100644 --- a/Language/Expressions/Lists/syntax_t02.dart +++ b/Language/Expressions/Lists/syntax_t02.dart @@ -1,20 +1,20 @@ -// 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 list literal denotes a list, which is an integer indexed -/// collection of objects. -/// listLiteral: -/// const? typeArguments? '[' (expressionList ','?)? ']' -/// ; -/// @description Checks that its a compile-time error if elements in a list are -/// not separated by comma. -/// @author msyabro - - -main() { - [1 2 3]; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 list literal denotes a list, which is an integer indexed +/// collection of objects. +/// listLiteral: +/// const? typeArguments? '[' (expressionList ','?)? ']' +/// ; +/// @description Checks that its a compile-time error if elements in a list are +/// not separated by comma. +/// @author msyabro + + +main() { + [1 2 3]; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Lists/syntax_t03.dart b/Language/Expressions/Lists/syntax_t03.dart index b29992faa4..1021d9f5ea 100644 --- a/Language/Expressions/Lists/syntax_t03.dart +++ b/Language/Expressions/Lists/syntax_t03.dart @@ -1,19 +1,19 @@ -// 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 list literal denotes a list, which is an integer indexed -/// collection of objects. -/// listLiteral: -/// const? typeArguments? '[' (expressionList ','?)? ']' -/// ; -/// @description Checks that a list literal can't contain an empty element. -/// @author msyabro - - -main() { - [1, , 2, 3]; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 list literal denotes a list, which is an integer indexed +/// collection of objects. +/// listLiteral: +/// const? typeArguments? '[' (expressionList ','?)? ']' +/// ; +/// @description Checks that a list literal can't contain an empty element. +/// @author msyabro + + +main() { + [1, , 2, 3]; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Lists/syntax_t04.dart b/Language/Expressions/Lists/syntax_t04.dart index 02598b69d1..29e2562911 100644 --- a/Language/Expressions/Lists/syntax_t04.dart +++ b/Language/Expressions/Lists/syntax_t04.dart @@ -1,19 +1,19 @@ -// 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 list literal denotes a list, which is an integer indexed -/// collection of objects. -/// listLiteral: -/// const? typeArguments? '[' (expressionList ','?)? ']' -/// ; -/// @description Checks that a list literal can't start with empty element. -/// @author msyabro - - -main() { - [, 1, 2, 3]; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 list literal denotes a list, which is an integer indexed +/// collection of objects. +/// listLiteral: +/// const? typeArguments? '[' (expressionList ','?)? ']' +/// ; +/// @description Checks that a list literal can't start with empty element. +/// @author msyabro + + +main() { + [, 1, 2, 3]; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Lists/syntax_t05.dart b/Language/Expressions/Lists/syntax_t05.dart index 4dcc7cbf0b..0172e488b2 100644 --- a/Language/Expressions/Lists/syntax_t05.dart +++ b/Language/Expressions/Lists/syntax_t05.dart @@ -1,20 +1,20 @@ -// 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 list literal denotes a list, which is an integer indexed -/// collection of objects. -/// listLiteral: -/// const? typeArguments? '[' (expressionList ','?)? ']' -/// ; -/// @description Checks that it is a compile-time error if a list literal does -/// not start with '['. -/// @author msyabro - - -main() { - 1, 2, 3]; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 list literal denotes a list, which is an integer indexed +/// collection of objects. +/// listLiteral: +/// const? typeArguments? '[' (expressionList ','?)? ']' +/// ; +/// @description Checks that it is a compile-time error if a list literal does +/// not start with '['. +/// @author msyabro + + +main() { + 1, 2, 3]; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Lists/syntax_t06.dart b/Language/Expressions/Lists/syntax_t06.dart index c92033fcf6..f2399a7be7 100644 --- a/Language/Expressions/Lists/syntax_t06.dart +++ b/Language/Expressions/Lists/syntax_t06.dart @@ -1,20 +1,20 @@ -// 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 list literal denotes a list, which is an integer indexed -/// collection of objects. -/// listLiteral: -/// const? typeArguments? '[' (expressionList ','?)? ']' -/// ; -/// @description Checks that it is a compile-time error if a list literal does -/// not end with ']'. -/// @author msyabro - - -main() { - [1, 2, 3; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 list literal denotes a list, which is an integer indexed +/// collection of objects. +/// listLiteral: +/// const? typeArguments? '[' (expressionList ','?)? ']' +/// ; +/// @description Checks that it is a compile-time error if a list literal does +/// not end with ']'. +/// @author msyabro + + +main() { + [1, 2, 3; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Lists/syntax_t07.dart b/Language/Expressions/Lists/syntax_t07.dart index 521bd8f250..f6e0ad072a 100644 --- a/Language/Expressions/Lists/syntax_t07.dart +++ b/Language/Expressions/Lists/syntax_t07.dart @@ -1,20 +1,20 @@ -// 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 list literal denotes a list, which is an integer indexed -/// collection of objects. -/// listLiteral: -/// const? typeArguments? '[' (expressionList ','?)? ']' -/// ; -/// @description Checks that it is a compile-time error if a const list literal -/// does not start with '['. -/// @author kaigorodov - - -main() { - var x = const 1, 2, 3]; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 list literal denotes a list, which is an integer indexed +/// collection of objects. +/// listLiteral: +/// const? typeArguments? '[' (expressionList ','?)? ']' +/// ; +/// @description Checks that it is a compile-time error if a const list literal +/// does not start with '['. +/// @author kaigorodov + + +main() { + var x = const 1, 2, 3]; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Logical_Boolean_Expressions/syntax_t02.dart b/Language/Expressions/Logical_Boolean_Expressions/syntax_t02.dart index 23db44aced..11f61af3c7 100644 --- a/Language/Expressions/Logical_Boolean_Expressions/syntax_t02.dart +++ b/Language/Expressions/Logical_Boolean_Expressions/syntax_t02.dart @@ -1,34 +1,34 @@ -// 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 The logical boolean expressions combine boolean objects using -/// the boolean conjunction and disjunction operators. -/// logicalOrExpression: -/// logicalAndExpression ('||' logicalAndExpression)* -/// ; -/// logicalAndExpression: -/// equalityExpression ('&&' equalityExpression)* -/// ; -/// A logical boolean expression is either an equality expression, or an -/// invocation of a logical boolean operator on an expression e1 with argument -/// e2. -/// @description Checks that super can't be used as the first operand of a -/// logical boolean expression. -/// @author msyabro - - -class S {} - -class A extends S { - test() { - super && true; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } -} - -main() { - A(); -} +// 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 The logical boolean expressions combine boolean objects using +/// the boolean conjunction and disjunction operators. +/// logicalOrExpression: +/// logicalAndExpression ('||' logicalAndExpression)* +/// ; +/// logicalAndExpression: +/// equalityExpression ('&&' equalityExpression)* +/// ; +/// A logical boolean expression is either an equality expression, or an +/// invocation of a logical boolean operator on an expression e1 with argument +/// e2. +/// @description Checks that super can't be used as the first operand of a +/// logical boolean expression. +/// @author msyabro + + +class S {} + +class A extends S { + test() { + super && true; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + A(); +} diff --git a/Language/Expressions/Logical_Boolean_Expressions/syntax_t03.dart b/Language/Expressions/Logical_Boolean_Expressions/syntax_t03.dart index 663b8af4a4..fb4731842b 100644 --- a/Language/Expressions/Logical_Boolean_Expressions/syntax_t03.dart +++ b/Language/Expressions/Logical_Boolean_Expressions/syntax_t03.dart @@ -1,34 +1,34 @@ -// 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 The logical boolean expressions combine boolean objects using -/// the boolean conjunction and disjunction operators. -/// logicalOrExpression: -/// logicalAndExpression ('||' logicalAndExpression)* -/// ; -/// logicalAndExpression: -/// equalityExpression ('&&' equalityExpression)* -/// ; -/// A logical boolean expression is either an equality expression, or an -/// invocation of a logical boolean operator on an expression e1 with argument -/// e2. -/// @description Checks that super can't be used as the second operand of a -/// logical boolean expression. -/// @author msyabro - - -class S {} - -class A extends S { - test() { - false || super; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } -} - -main() { - A(); -} +// 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 The logical boolean expressions combine boolean objects using +/// the boolean conjunction and disjunction operators. +/// logicalOrExpression: +/// logicalAndExpression ('||' logicalAndExpression)* +/// ; +/// logicalAndExpression: +/// equalityExpression ('&&' equalityExpression)* +/// ; +/// A logical boolean expression is either an equality expression, or an +/// invocation of a logical boolean operator on an expression e1 with argument +/// e2. +/// @description Checks that super can't be used as the second operand of a +/// logical boolean expression. +/// @author msyabro + + +class S {} + +class A extends S { + test() { + false || super; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + A(); +} diff --git a/Language/Expressions/Logical_Boolean_Expressions/syntax_t04.dart b/Language/Expressions/Logical_Boolean_Expressions/syntax_t04.dart index c7cc2a190a..5bb500a5cc 100644 --- a/Language/Expressions/Logical_Boolean_Expressions/syntax_t04.dart +++ b/Language/Expressions/Logical_Boolean_Expressions/syntax_t04.dart @@ -1,26 +1,26 @@ -// 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 The logical boolean expressions combine boolean objects using -/// the boolean conjunction and disjunction operators. -/// logicalOrExpression: -/// logicalAndExpression ('||' logicalAndExpression)* -/// ; -/// logicalAndExpression: -/// equalityExpression ('&&' equalityExpression)* -/// ; -/// A logical boolean expression is either an equality expression, or an -/// invocation of a logical boolean operator on an expression e1 with argument -/// e2. -/// @description Checks that a logical boolean expression can't start with -/// operator ||. -/// @author msyabro - - -main() { - || true || false; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The logical boolean expressions combine boolean objects using +/// the boolean conjunction and disjunction operators. +/// logicalOrExpression: +/// logicalAndExpression ('||' logicalAndExpression)* +/// ; +/// logicalAndExpression: +/// equalityExpression ('&&' equalityExpression)* +/// ; +/// A logical boolean expression is either an equality expression, or an +/// invocation of a logical boolean operator on an expression e1 with argument +/// e2. +/// @description Checks that a logical boolean expression can't start with +/// operator ||. +/// @author msyabro + + +main() { + || true || false; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Logical_Boolean_Expressions/syntax_t05.dart b/Language/Expressions/Logical_Boolean_Expressions/syntax_t05.dart index 4e62279dea..bd2fcabd62 100644 --- a/Language/Expressions/Logical_Boolean_Expressions/syntax_t05.dart +++ b/Language/Expressions/Logical_Boolean_Expressions/syntax_t05.dart @@ -1,26 +1,26 @@ -// 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 The logical boolean expressions combine boolean objects using -/// the boolean conjunction and disjunction operators. -/// logicalOrExpression: -/// logicalAndExpression ('||' logicalAndExpression)* -/// ; -/// logicalAndExpression: -/// equalityExpression ('&&' equalityExpression)* -/// ; -/// A logical boolean expression is either an equality expression, or an -/// invocation of a logical boolean operator on an expression e1 with argument -/// e2. -/// @description Checks that a logical boolean expression can't start with -/// operator &&. -/// @author msyabro - - -main() { - && true && false; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The logical boolean expressions combine boolean objects using +/// the boolean conjunction and disjunction operators. +/// logicalOrExpression: +/// logicalAndExpression ('||' logicalAndExpression)* +/// ; +/// logicalAndExpression: +/// equalityExpression ('&&' equalityExpression)* +/// ; +/// A logical boolean expression is either an equality expression, or an +/// invocation of a logical boolean operator on an expression e1 with argument +/// e2. +/// @description Checks that a logical boolean expression can't start with +/// operator &&. +/// @author msyabro + + +main() { + && true && false; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Logical_Boolean_Expressions/syntax_t06.dart b/Language/Expressions/Logical_Boolean_Expressions/syntax_t06.dart index 2a5e96398f..ec14901fb8 100644 --- a/Language/Expressions/Logical_Boolean_Expressions/syntax_t06.dart +++ b/Language/Expressions/Logical_Boolean_Expressions/syntax_t06.dart @@ -1,26 +1,26 @@ -// 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 The logical boolean expressions combine boolean objects using -/// the boolean conjunction and disjunction operators. -/// logicalOrExpression: -/// logicalAndExpression ('||' logicalAndExpression)* -/// ; -/// logicalAndExpression: -/// equalityExpression ('&&' equalityExpression)* -/// ; -/// A logical boolean expression is either an equality expression, or an -/// invocation of a logical boolean operator on an expression e1 with argument -/// e2. -/// @description Checks that a logical boolean expression can't terminate with -/// operator ||. -/// @author msyabro - - -main() { - true || false ||; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The logical boolean expressions combine boolean objects using +/// the boolean conjunction and disjunction operators. +/// logicalOrExpression: +/// logicalAndExpression ('||' logicalAndExpression)* +/// ; +/// logicalAndExpression: +/// equalityExpression ('&&' equalityExpression)* +/// ; +/// A logical boolean expression is either an equality expression, or an +/// invocation of a logical boolean operator on an expression e1 with argument +/// e2. +/// @description Checks that a logical boolean expression can't terminate with +/// operator ||. +/// @author msyabro + + +main() { + true || false ||; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Logical_Boolean_Expressions/syntax_t07.dart b/Language/Expressions/Logical_Boolean_Expressions/syntax_t07.dart index a8063749b3..a56aa5d7df 100644 --- a/Language/Expressions/Logical_Boolean_Expressions/syntax_t07.dart +++ b/Language/Expressions/Logical_Boolean_Expressions/syntax_t07.dart @@ -1,26 +1,26 @@ -// 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 The logical boolean expressions combine boolean objects using -/// the boolean conjunction and disjunction operators. -/// logicalOrExpression: -/// logicalAndExpression ('||' logicalAndExpression)* -/// ; -/// logicalAndExpression: -/// equalityExpression ('&&' equalityExpression)* -/// ; -/// A logical boolean expression is either an equality expression, or an -/// invocation of a logical boolean operator on an expression e1 with argument -/// e2. -/// @description Checks that a logical boolean expression can't terminate with -/// operator &&. -/// @author msyabro - - -main() { - true && false &&; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The logical boolean expressions combine boolean objects using +/// the boolean conjunction and disjunction operators. +/// logicalOrExpression: +/// logicalAndExpression ('||' logicalAndExpression)* +/// ; +/// logicalAndExpression: +/// equalityExpression ('&&' equalityExpression)* +/// ; +/// A logical boolean expression is either an equality expression, or an +/// invocation of a logical boolean operator on an expression e1 with argument +/// e2. +/// @description Checks that a logical boolean expression can't terminate with +/// operator &&. +/// @author msyabro + + +main() { + true && false &&; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Logical_Boolean_Expressions/syntax_t08.dart b/Language/Expressions/Logical_Boolean_Expressions/syntax_t08.dart index dda08e9fd5..63793f5926 100644 --- a/Language/Expressions/Logical_Boolean_Expressions/syntax_t08.dart +++ b/Language/Expressions/Logical_Boolean_Expressions/syntax_t08.dart @@ -1,25 +1,25 @@ -// 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 The logical boolean expressions combine boolean objects using -/// the boolean conjunction and disjunction operators. -/// logicalOrExpression: -/// logicalAndExpression ('||' logicalAndExpression)* -/// ; -/// logicalAndExpression: -/// equalityExpression ('&&' equalityExpression)* -/// ; -/// A logical boolean expression is either an equality expression, or an -/// invocation of a logical boolean operator on an expression e1 with argument -/// e2. -/// @description Checks that two operators || can't be placed one after another. -/// @author msyabro - - -main() { - true || || false; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The logical boolean expressions combine boolean objects using +/// the boolean conjunction and disjunction operators. +/// logicalOrExpression: +/// logicalAndExpression ('||' logicalAndExpression)* +/// ; +/// logicalAndExpression: +/// equalityExpression ('&&' equalityExpression)* +/// ; +/// A logical boolean expression is either an equality expression, or an +/// invocation of a logical boolean operator on an expression e1 with argument +/// e2. +/// @description Checks that two operators || can't be placed one after another. +/// @author msyabro + + +main() { + true || || false; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Logical_Boolean_Expressions/syntax_t09.dart b/Language/Expressions/Logical_Boolean_Expressions/syntax_t09.dart index db68fcf411..cd6f7338a5 100644 --- a/Language/Expressions/Logical_Boolean_Expressions/syntax_t09.dart +++ b/Language/Expressions/Logical_Boolean_Expressions/syntax_t09.dart @@ -1,25 +1,25 @@ -// 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 The logical boolean expressions combine boolean objects using -/// the boolean conjunction and disjunction operators. -/// logicalOrExpression: -/// logicalAndExpression ('||' logicalAndExpression)* -/// ; -/// logicalAndExpression: -/// equalityExpression ('&&' equalityExpression)* -/// ; -/// A logical boolean expression is either an equality expression, or an -/// invocation of a logical boolean operator on an expression e1 with argument -/// e2. -/// @description Checks that two operators && can't be placed one after another. -/// @author msyabro - - -main() { - true && && false; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The logical boolean expressions combine boolean objects using +/// the boolean conjunction and disjunction operators. +/// logicalOrExpression: +/// logicalAndExpression ('||' logicalAndExpression)* +/// ; +/// logicalAndExpression: +/// equalityExpression ('&&' equalityExpression)* +/// ; +/// A logical boolean expression is either an equality expression, or an +/// invocation of a logical boolean operator on an expression e1 with argument +/// e2. +/// @description Checks that two operators && can't be placed one after another. +/// @author msyabro + + +main() { + true && && false; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Maps/constant_map_t01.dart b/Language/Expressions/Maps/constant_map_t01.dart index 84ef6bb4ea..9f6ab590bb 100644 --- a/Language/Expressions/Maps/constant_map_t01.dart +++ b/Language/Expressions/Maps/constant_map_t01.dart @@ -1,18 +1,18 @@ -// 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 It is a compile time error if either a key or a value of an entry -/// in a constant map literal is not a compile-time constant. -/// @description Checks that it is a compile-error if a key of an entry -/// in a constant map literal is not a compile-time constant. -/// @author msyabro - - -main() { - var x; - const {"$x": 1}; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile time error if either a key or a value of an entry +/// in a constant map literal is not a compile-time constant. +/// @description Checks that it is a compile-error if a key of an entry +/// in a constant map literal is not a compile-time constant. +/// @author msyabro + + +main() { + var x; + const {"$x": 1}; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Maps/constant_map_t02.dart b/Language/Expressions/Maps/constant_map_t02.dart index 608d03825d..306f9bc42a 100644 --- a/Language/Expressions/Maps/constant_map_t02.dart +++ b/Language/Expressions/Maps/constant_map_t02.dart @@ -1,18 +1,18 @@ -// 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 It is a compile time error if either a key or a value of an entry -/// in a constant map literal is not a compile-time constant. -/// @description Checks that it is a compile-error if a value of an entry -/// in a constant map literal is not a compile-time constant. -/// @author msyabro - - -main() { - Object o = [1, 2]; - const { "key": o }; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile time error if either a key or a value of an entry +/// in a constant map literal is not a compile-time constant. +/// @description Checks that it is a compile-error if a value of an entry +/// in a constant map literal is not a compile-time constant. +/// @author msyabro + + +main() { + Object o = [1, 2]; + const { "key": o }; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Maps/constant_map_type_t01.dart b/Language/Expressions/Maps/constant_map_type_t01.dart index 7c085e2500..19d3578c5a 100644 --- a/Language/Expressions/Maps/constant_map_type_t01.dart +++ b/Language/Expressions/Maps/constant_map_type_t01.dart @@ -1,24 +1,24 @@ -// 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 It is a compile time error if the type argument of a -/// constant map literal includes a type parameter. -/// @description Checks that it is an error if the type argument of a -/// constant map literal includes a type variable. -/// @issue 27492 -/// @author msyabro - - -class C { - test() { - const {}; -// ^ -// [analyzer]unspecified -// [cfe]unspecified - } -} - -main() { - new C().test(); -} +// 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 It is a compile time error if the type argument of a +/// constant map literal includes a type parameter. +/// @description Checks that it is an error if the type argument of a +/// constant map literal includes a type variable. +/// @issue 27492 +/// @author msyabro + + +class C { + test() { + const {}; +// ^ +// [analyzer]unspecified +// [cfe]unspecified + } +} + +main() { + new C().test(); +} diff --git a/Language/Expressions/Maps/syntax_t03.dart b/Language/Expressions/Maps/syntax_t03.dart index 47b35a2f66..47de1b5df3 100644 --- a/Language/Expressions/Maps/syntax_t03.dart +++ b/Language/Expressions/Maps/syntax_t03.dart @@ -1,27 +1,27 @@ -// 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 map literal denotes a map object. -/// mapLiteral: -/// const? typeArguments? '{' (mapLiteralEntry (',' mapLiteralEntry)* ','?)? -/// '}' -/// ; -/// mapLiteralEntry: -/// expression ':' expression -/// ; -/// A map literal consists of zero or more entries. Each entry has a key and a -/// value. Each key and each value is denoted by an expression. -/// @description Checks that it is a compile-time error if map entries -/// are not separated by a comma. -/// @author msyabro - - -main() { - try { - {"1": 1 "2" : 2}; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 map literal denotes a map object. +/// mapLiteral: +/// const? typeArguments? '{' (mapLiteralEntry (',' mapLiteralEntry)* ','?)? +/// '}' +/// ; +/// mapLiteralEntry: +/// expression ':' expression +/// ; +/// A map literal consists of zero or more entries. Each entry has a key and a +/// value. Each key and each value is denoted by an expression. +/// @description Checks that it is a compile-time error if map entries +/// are not separated by a comma. +/// @author msyabro + + +main() { + try { + {"1": 1 "2" : 2}; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Maps/syntax_t04.dart b/Language/Expressions/Maps/syntax_t04.dart index 6862bb8cec..410f85ac59 100644 --- a/Language/Expressions/Maps/syntax_t04.dart +++ b/Language/Expressions/Maps/syntax_t04.dart @@ -1,25 +1,25 @@ -// 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 map literal denotes a map object. -/// mapLiteral: -/// const? typeArguments? '{' (mapLiteralEntry (',' mapLiteralEntry)* ','?)? -/// '}' -/// ; -/// mapLiteralEntry: -/// expression ':' expression -/// ; -/// A map literal consists of zero or more entries. Each entry has a key and a -/// value. Each key and each value is denoted by an expression. -/// @description Checks that it is a compile-time error if a key and a value are -/// not separated by a colon. -/// @author msyabro - - -main() { - var map = {"1" 1}; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 map literal denotes a map object. +/// mapLiteral: +/// const? typeArguments? '{' (mapLiteralEntry (',' mapLiteralEntry)* ','?)? +/// '}' +/// ; +/// mapLiteralEntry: +/// expression ':' expression +/// ; +/// A map literal consists of zero or more entries. Each entry has a key and a +/// value. Each key and each value is denoted by an expression. +/// @description Checks that it is a compile-time error if a key and a value are +/// not separated by a colon. +/// @author msyabro + + +main() { + var map = {"1" 1}; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Maps/syntax_t05.dart b/Language/Expressions/Maps/syntax_t05.dart index e7e1651691..6f066bb576 100644 --- a/Language/Expressions/Maps/syntax_t05.dart +++ b/Language/Expressions/Maps/syntax_t05.dart @@ -1,24 +1,24 @@ -// 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 map literal denotes a map object. -/// mapLiteral: -/// const? typeArguments? '{' (mapLiteralEntry (',' mapLiteralEntry)* ','?)? -/// '}' -/// ; -/// mapLiteralEntry: -/// expression ':' expression -/// ; -/// A map literal consists of zero or more entries. Each entry has a key and a -/// value. Each key and each value is denoted by an expression. -/// @description Checks that a map literal can't contain an empty entry. -/// @author msyabro - - -main() { - {"key1": 1, "key2" : 2,,"key3":3}; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 map literal denotes a map object. +/// mapLiteral: +/// const? typeArguments? '{' (mapLiteralEntry (',' mapLiteralEntry)* ','?)? +/// '}' +/// ; +/// mapLiteralEntry: +/// expression ':' expression +/// ; +/// A map literal consists of zero or more entries. Each entry has a key and a +/// value. Each key and each value is denoted by an expression. +/// @description Checks that a map literal can't contain an empty entry. +/// @author msyabro + + +main() { + {"key1": 1, "key2" : 2,,"key3":3}; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Maps/syntax_t06.dart b/Language/Expressions/Maps/syntax_t06.dart index fcdc7bf756..b2c926d1e3 100644 --- a/Language/Expressions/Maps/syntax_t06.dart +++ b/Language/Expressions/Maps/syntax_t06.dart @@ -1,24 +1,24 @@ -// 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 map literal denotes a map object. -/// mapLiteral: -/// const? typeArguments? '{' (mapLiteralEntry (',' mapLiteralEntry)* ','?)? -/// '}' -/// ; -/// mapLiteralEntry: -/// expression ':' expression -/// ; -/// A map literal consists of zero or more entries. Each entry has a key and a -/// value. Each key and each value is denoted by an expression. -/// @description Checks that a map literal can't begin with an empty entry. -/// @author msyabro - - -main() { - var map = {, "key1": 1, "key2" : 2, "key3": 3}; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 map literal denotes a map object. +/// mapLiteral: +/// const? typeArguments? '{' (mapLiteralEntry (',' mapLiteralEntry)* ','?)? +/// '}' +/// ; +/// mapLiteralEntry: +/// expression ':' expression +/// ; +/// A map literal consists of zero or more entries. Each entry has a key and a +/// value. Each key and each value is denoted by an expression. +/// @description Checks that a map literal can't begin with an empty entry. +/// @author msyabro + + +main() { + var map = {, "key1": 1, "key2" : 2, "key3": 3}; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Maps/syntax_t07.dart b/Language/Expressions/Maps/syntax_t07.dart index 5632dbf91e..b3b61a67eb 100644 --- a/Language/Expressions/Maps/syntax_t07.dart +++ b/Language/Expressions/Maps/syntax_t07.dart @@ -1,28 +1,28 @@ -// 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 map literal denotes a map object. -/// mapLiteral: -/// const? typeArguments? '{' (mapLiteralEntry (',' mapLiteralEntry)* ','?)? -/// '}' -/// ; -/// mapLiteralEntry: -/// expression ':' expression -/// ; -/// A map literal consists of zero or more entries. Each entry has a key and a -/// value. Each key and each value is denoted by an expression. -/// @description Checks that it is a compile-time error if a map literal -/// does not begin with '{'. -/// @author msyabro - - -main() { - "key": 1 }; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} -//^ -// [analyzer] unspecified -// [cfe] unspecified +// 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 map literal denotes a map object. +/// mapLiteral: +/// const? typeArguments? '{' (mapLiteralEntry (',' mapLiteralEntry)* ','?)? +/// '}' +/// ; +/// mapLiteralEntry: +/// expression ':' expression +/// ; +/// A map literal consists of zero or more entries. Each entry has a key and a +/// value. Each key and each value is denoted by an expression. +/// @description Checks that it is a compile-time error if a map literal +/// does not begin with '{'. +/// @author msyabro + + +main() { + "key": 1 }; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} +//^ +// [analyzer] unspecified +// [cfe] unspecified diff --git a/Language/Expressions/Maps/syntax_t08.dart b/Language/Expressions/Maps/syntax_t08.dart index e0406f5a39..0796f0a880 100644 --- a/Language/Expressions/Maps/syntax_t08.dart +++ b/Language/Expressions/Maps/syntax_t08.dart @@ -1,32 +1,32 @@ -// 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 map literal denotes a map object. -/// mapLiteral: -/// const? typeArguments? '{' (mapLiteralEntry (',' mapLiteralEntry)* ','?)? -/// '}' -/// ; -/// mapLiteralEntry: -/// expression ':' expression -/// ; -/// A map literal consists of zero or more entries. Each entry has a key and a -/// value. Each key and each value is denoted by an expression. -/// @description Checks that it is a compile-time error if a map literal -/// does not end with '}'. -/// @author msyabro - - -main() { -// ^ -// [cfe] unspecified - var x = {"key1": true, "key2":false; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} -//^ -// [analyzer] unspecified -// [cfe] unspecified -// [error line 32, column 0] +// 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 map literal denotes a map object. +/// mapLiteral: +/// const? typeArguments? '{' (mapLiteralEntry (',' mapLiteralEntry)* ','?)? +/// '}' +/// ; +/// mapLiteralEntry: +/// expression ':' expression +/// ; +/// A map literal consists of zero or more entries. Each entry has a key and a +/// value. Each key and each value is denoted by an expression. +/// @description Checks that it is a compile-time error if a map literal +/// does not end with '}'. +/// @author msyabro + + +main() { +// ^ +// [cfe] unspecified + var x = {"key1": true, "key2":false; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} +//^ +// [analyzer] unspecified +// [cfe] unspecified +// [error line 32, column 0] // [analyzer] unspecified \ No newline at end of file diff --git a/Language/Expressions/Maps/syntax_t09.dart b/Language/Expressions/Maps/syntax_t09.dart index 455db3851b..454565867d 100644 --- a/Language/Expressions/Maps/syntax_t09.dart +++ b/Language/Expressions/Maps/syntax_t09.dart @@ -1,25 +1,25 @@ -// 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 map literal denotes a map object. -/// mapLiteral: -/// const? typeArguments? '{' (mapLiteralEntry (',' mapLiteralEntry)* ','?)? -/// '}' -/// ; -/// mapLiteralEntry: -/// expression ':' expression -/// ; -/// A map literal consists of zero or more entries. Each entry has a key and a -/// value. Each key and each value is denoted by an expression. -/// @description Checks that it is a compile-time error if a key in a map -/// literal is not a valid expression. -/// @author kaigorodov - - -main() { - var x = {1{}: 1}; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 map literal denotes a map object. +/// mapLiteral: +/// const? typeArguments? '{' (mapLiteralEntry (',' mapLiteralEntry)* ','?)? +/// '}' +/// ; +/// mapLiteralEntry: +/// expression ':' expression +/// ; +/// A map literal consists of zero or more entries. Each entry has a key and a +/// value. Each key and each value is denoted by an expression. +/// @description Checks that it is a compile-time error if a key in a map +/// literal is not a valid expression. +/// @author kaigorodov + + +main() { + var x = {1{}: 1}; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Maps/syntax_t10.dart b/Language/Expressions/Maps/syntax_t10.dart index 0b3f886c48..fe9b859dba 100644 --- a/Language/Expressions/Maps/syntax_t10.dart +++ b/Language/Expressions/Maps/syntax_t10.dart @@ -1,28 +1,28 @@ -// 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 map literal denotes a map object. -/// mapLiteral: -/// const? typeArguments? '{' (mapLiteralEntry (',' mapLiteralEntry)* ','?)? -/// '}' -/// ; -/// mapLiteralEntry: -/// expression ':' expression -/// ; -/// A map literal consists of zero or more entries. Each entry has a key and a -/// value. Each key and each value is denoted by an expression. -/// @description Checks that it is a compile-time error if a const map literal -/// does not begin with '{'. -/// @author kaigorodov - - -main() { - var x = const "key": 1 }; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} -//^ -// [analyzer] unspecified -// [cfe] unspecified +// 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 map literal denotes a map object. +/// mapLiteral: +/// const? typeArguments? '{' (mapLiteralEntry (',' mapLiteralEntry)* ','?)? +/// '}' +/// ; +/// mapLiteralEntry: +/// expression ':' expression +/// ; +/// A map literal consists of zero or more entries. Each entry has a key and a +/// value. Each key and each value is denoted by an expression. +/// @description Checks that it is a compile-time error if a const map literal +/// does not begin with '{'. +/// @author kaigorodov + + +main() { + var x = const "key": 1 }; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} +//^ +// [analyzer] unspecified +// [cfe] unspecified diff --git a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t02.dart b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t02.dart index 76601c3300..b5f95fc757 100644 --- a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t02.dart +++ b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t02.dart @@ -1,30 +1,30 @@ -// 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 cascaded method invocation has the form e..suffix where e is -/// an expression and suffix is a sequence of operator, method, getter or -/// setter invocations. -/// cascadeSection: -/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* -/// (assignmentOperator expressionWithoutCascade)? -/// ; -/// cascadeSelector: -/// '[' expression ']' | -/// identifier -/// ; -/// @description Checks that it is a compile-time error if '..' is not followed -/// by a suffix. -/// @author msyabro - - -class C {} - -main() { - var o = new C(); - o..; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// 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 cascaded method invocation has the form e..suffix where e is +/// an expression and suffix is a sequence of operator, method, getter or +/// setter invocations. +/// cascadeSection: +/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* +/// (assignmentOperator expressionWithoutCascade)? +/// ; +/// cascadeSelector: +/// '[' expression ']' | +/// identifier +/// ; +/// @description Checks that it is a compile-time error if '..' is not followed +/// by a suffix. +/// @author msyabro + + +class C {} + +main() { + var o = new C(); + o..; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t03.dart b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t03.dart index d3d6526c4d..a8294ad9d8 100644 --- a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t03.dart +++ b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t03.dart @@ -1,32 +1,32 @@ -// 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 cascaded method invocation has the form e..suffix where e is -/// an expression and suffix is a sequence of operator, method, getter or -/// setter invocations. -/// cascadeSection: -/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* -/// (assignmentOperator expressionWithoutCascade)? -/// ; -/// cascadeSelector: -/// '[' expression ']' | -/// identifier -/// ; -/// @description Checks that it is a compile-time error if '..' is not followed -/// by a suffix. -/// @author msyabro - - -class C { - m1() {} -} - -main() { - var o = new C(); - o..m1()..m1()..; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// 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 cascaded method invocation has the form e..suffix where e is +/// an expression and suffix is a sequence of operator, method, getter or +/// setter invocations. +/// cascadeSection: +/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* +/// (assignmentOperator expressionWithoutCascade)? +/// ; +/// cascadeSelector: +/// '[' expression ']' | +/// identifier +/// ; +/// @description Checks that it is a compile-time error if '..' is not followed +/// by a suffix. +/// @author msyabro + + +class C { + m1() {} +} + +main() { + var o = new C(); + o..m1()..m1()..; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t04.dart b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t04.dart index 406f4ecb44..fee305378b 100644 --- a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t04.dart +++ b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t04.dart @@ -1,32 +1,32 @@ -// 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 cascaded method invocation has the form e..suffix where e is -/// an expression and suffix is a sequence of operator, method, getter or -/// setter invocations. -/// cascadeSection: -/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* -/// (assignmentOperator expressionWithoutCascade)? -/// ; -/// cascadeSelector: -/// '[' expression ']' | -/// identifier -/// ; -/// @description Checks that it is a compile-time error if '..' is followed by -/// another '..'. -/// @author msyabro - - -class C { - m1() {} -} - -main() { - var o = new C(); - o.. ..m1(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// 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 cascaded method invocation has the form e..suffix where e is +/// an expression and suffix is a sequence of operator, method, getter or +/// setter invocations. +/// cascadeSection: +/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* +/// (assignmentOperator expressionWithoutCascade)? +/// ; +/// cascadeSelector: +/// '[' expression ']' | +/// identifier +/// ; +/// @description Checks that it is a compile-time error if '..' is followed by +/// another '..'. +/// @author msyabro + + +class C { + m1() {} +} + +main() { + var o = new C(); + o.. ..m1(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t05.dart b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t05.dart index 427ab60f56..2a86db3fd1 100644 --- a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t05.dart +++ b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t05.dart @@ -1,32 +1,32 @@ -// 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 cascaded method invocation has the form e..suffix where e is -/// an expression and suffix is a sequence of operator, method, getter or -/// setter invocations. -/// cascadeSection: -/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* -/// (assignmentOperator expressionWithoutCascade)? -/// ; -/// cascadeSelector: -/// '[' expression ']' | -/// identifier -/// ; -/// @description Checks that it is a compile-time error if method is invoked -/// via '...' in a cascaded invocation. -/// @author msyabro - - -class C { - m1() {} -} - -main() { - var o = new C(); - o...m1(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// 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 cascaded method invocation has the form e..suffix where e is +/// an expression and suffix is a sequence of operator, method, getter or +/// setter invocations. +/// cascadeSection: +/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* +/// (assignmentOperator expressionWithoutCascade)? +/// ; +/// cascadeSelector: +/// '[' expression ']' | +/// identifier +/// ; +/// @description Checks that it is a compile-time error if method is invoked +/// via '...' in a cascaded invocation. +/// @author msyabro + + +class C { + m1() {} +} + +main() { + var o = new C(); + o...m1(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t06.dart b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t06.dart index 142e2d260e..20c8d61bb1 100644 --- a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t06.dart +++ b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t06.dart @@ -1,32 +1,32 @@ -// 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 cascaded method invocation has the form e..suffix where e is -/// an expression and suffix is a sequence of operator, method, getter or -/// setter invocations. -/// cascadeSection: -/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* -/// (assignmentOperator expressionWithoutCascade)? -/// ; -/// cascadeSelector: -/// '[' expression ']' | -/// identifier -/// ; -/// @description Checks that it is a compile-time error if suffix is a number -/// literal. -/// @author msyabro - - -class C { - m1() {} -} - -main() { - var o = new C(); - o..1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// 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 cascaded method invocation has the form e..suffix where e is +/// an expression and suffix is a sequence of operator, method, getter or +/// setter invocations. +/// cascadeSection: +/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* +/// (assignmentOperator expressionWithoutCascade)? +/// ; +/// cascadeSelector: +/// '[' expression ']' | +/// identifier +/// ; +/// @description Checks that it is a compile-time error if suffix is a number +/// literal. +/// @author msyabro + + +class C { + m1() {} +} + +main() { + var o = new C(); + o..1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t07.dart b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t07.dart index 1a04a38737..e6274bd8e9 100644 --- a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t07.dart +++ b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t07.dart @@ -1,32 +1,32 @@ -// 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 cascaded method invocation has the form e..suffix where e is -/// an expression and suffix is a sequence of operator, method, getter or -/// setter invocations. -/// cascadeSection: -/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* -/// (assignmentOperator expressionWithoutCascade)? -/// ; -/// cascadeSelector: -/// '[' expression ']' | -/// identifier -/// ; -/// @description Checks that it is a compile-time error if suffix is a string -/// literal. -/// @author msyabro - - -class C { - m1() {} -} - -main() { - var o = new C(); - o..''; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// 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 cascaded method invocation has the form e..suffix where e is +/// an expression and suffix is a sequence of operator, method, getter or +/// setter invocations. +/// cascadeSection: +/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* +/// (assignmentOperator expressionWithoutCascade)? +/// ; +/// cascadeSelector: +/// '[' expression ']' | +/// identifier +/// ; +/// @description Checks that it is a compile-time error if suffix is a string +/// literal. +/// @author msyabro + + +class C { + m1() {} +} + +main() { + var o = new C(); + o..''; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t08.dart b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t08.dart index 7310b9ca54..f118f125dd 100644 --- a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t08.dart +++ b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t08.dart @@ -1,32 +1,32 @@ -// 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 cascaded method invocation has the form e..suffix where e is -/// an expression and suffix is a sequence of operator, method, getter or -/// setter invocations. -/// cascadeSection: -/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* -/// (assignmentOperator expressionWithoutCascade)? -/// ; -/// cascadeSelector: -/// '[' expression ']' | -/// identifier -/// ; -/// @description Checks that it is a compile-time error if suffix is a list -/// literal. -/// @author msyabro - - -class C { - m1() {} -} - -main() { - var o = new C(); - o..[1, 2, 3]; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// 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 cascaded method invocation has the form e..suffix where e is +/// an expression and suffix is a sequence of operator, method, getter or +/// setter invocations. +/// cascadeSection: +/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* +/// (assignmentOperator expressionWithoutCascade)? +/// ; +/// cascadeSelector: +/// '[' expression ']' | +/// identifier +/// ; +/// @description Checks that it is a compile-time error if suffix is a list +/// literal. +/// @author msyabro + + +class C { + m1() {} +} + +main() { + var o = new C(); + o..[1, 2, 3]; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t09.dart b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t09.dart index 2183f97a06..96fe2bac4e 100644 --- a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t09.dart +++ b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t09.dart @@ -1,32 +1,32 @@ -// 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 cascaded method invocation has the form e..suffix where e is -/// an expression and suffix is a sequence of operator, method, getter or -/// setter invocations. -/// cascadeSection: -/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* -/// (assignmentOperator expressionWithoutCascade)? -/// ; -/// cascadeSelector: -/// '[' expression ']' | -/// identifier -/// ; -/// @description Checks that it is a compile-time error if suffix is a map -/// literal. -/// @author msyabro - - -class C { - m1() {} -} - -main() { - var o = new C(); - o..{'k1': 1, 'k2': 2}; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// 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 cascaded method invocation has the form e..suffix where e is +/// an expression and suffix is a sequence of operator, method, getter or +/// setter invocations. +/// cascadeSection: +/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* +/// (assignmentOperator expressionWithoutCascade)? +/// ; +/// cascadeSelector: +/// '[' expression ']' | +/// identifier +/// ; +/// @description Checks that it is a compile-time error if suffix is a map +/// literal. +/// @author msyabro + + +class C { + m1() {} +} + +main() { + var o = new C(); + o..{'k1': 1, 'k2': 2}; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t10.dart b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t10.dart index 763ec0e0c8..efaecf0e5c 100644 --- a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t10.dart +++ b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t10.dart @@ -1,31 +1,31 @@ -// 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 cascaded method invocation has the form e..suffix where e is -/// an expression and suffix is a sequence of operator, method, getter or -/// setter invocations. -/// cascadeSection: -/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* -/// (assignmentOperator expressionWithoutCascade)? -/// ; -/// cascadeSelector: -/// '[' expression ']' | -/// identifier -/// ; -/// @description Checks that it is a compile-time error if suffix is null. -/// @author msyabro - - -class C { - m1() {} -} - -main() { - var o = new C(); - o..null; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// 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 cascaded method invocation has the form e..suffix where e is +/// an expression and suffix is a sequence of operator, method, getter or +/// setter invocations. +/// cascadeSection: +/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* +/// (assignmentOperator expressionWithoutCascade)? +/// ; +/// cascadeSelector: +/// '[' expression ']' | +/// identifier +/// ; +/// @description Checks that it is a compile-time error if suffix is null. +/// @author msyabro + + +class C { + m1() {} +} + +main() { + var o = new C(); + o..null; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t11.dart b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t11.dart index a03808f885..cbe43fca3c 100644 --- a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t11.dart +++ b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t11.dart @@ -1,32 +1,32 @@ -// 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 cascaded method invocation has the form e..suffix where e is -/// an expression and suffix is a sequence of operator, method, getter or -/// setter invocations. -/// cascadeSection: -/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* -/// (assignmentOperator expressionWithoutCascade)? -/// ; -/// cascadeSelector: -/// '[' expression ']' | -/// identifier -/// ; -/// @description Checks that it is a compile-time error if suffix is a boolean -/// literal. -/// @author msyabro - - -class C { - m1() {} -} - -main() { - var o = new C(); - o..false; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// 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 cascaded method invocation has the form e..suffix where e is +/// an expression and suffix is a sequence of operator, method, getter or +/// setter invocations. +/// cascadeSection: +/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* +/// (assignmentOperator expressionWithoutCascade)? +/// ; +/// cascadeSelector: +/// '[' expression ']' | +/// identifier +/// ; +/// @description Checks that it is a compile-time error if suffix is a boolean +/// literal. +/// @author msyabro + + +class C { + m1() {} +} + +main() { + var o = new C(); + o..false; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t12.dart b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t12.dart index 4aaf563462..2a929787e9 100644 --- a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t12.dart +++ b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t12.dart @@ -1,32 +1,32 @@ -// 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 cascaded method invocation has the form e..suffix where e is -/// an expression and suffix is a sequence of operator, method, getter or -/// setter invocations. -/// cascadeSection: -/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* -/// (assignmentOperator expressionWithoutCascade)? -/// ; -/// cascadeSelector: -/// '[' expression ']' | -/// identifier -/// ; -/// @description Checks that it is a compile-time error if suffix is another -/// cascaded invocation. -/// @author msyabro - - -class C { - m1() {} -} - -main() { - var c = new C(); - c..m1()..(c..m1())..m1(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// 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 cascaded method invocation has the form e..suffix where e is +/// an expression and suffix is a sequence of operator, method, getter or +/// setter invocations. +/// cascadeSection: +/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* +/// (assignmentOperator expressionWithoutCascade)? +/// ; +/// cascadeSelector: +/// '[' expression ']' | +/// identifier +/// ; +/// @description Checks that it is a compile-time error if suffix is another +/// cascaded invocation. +/// @author msyabro + + +class C { + m1() {} +} + +main() { + var c = new C(); + c..m1()..(c..m1())..m1(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t13.dart b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t13.dart index 142321ce81..6d5b5011a0 100644 --- a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t13.dart +++ b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t13.dart @@ -1,32 +1,32 @@ -// 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 cascaded method invocation has the form e..suffix where e is -/// an expression and suffix is a sequence of operator, method, getter or -/// setter invocations. -/// cascadeSection: -/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* -/// (assignmentOperator expressionWithoutCascade)? -/// ; -/// cascadeSelector: -/// '[' expression ']' | -/// identifier -/// ; -/// @description Checks that it is a compile-time error if suffix is an -/// instance creation expression. -/// @author msyabro - - -class C { - m1() {} -} - -main() { - var c = new C(); - c..new C(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// 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 cascaded method invocation has the form e..suffix where e is +/// an expression and suffix is a sequence of operator, method, getter or +/// setter invocations. +/// cascadeSection: +/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* +/// (assignmentOperator expressionWithoutCascade)? +/// ; +/// cascadeSelector: +/// '[' expression ']' | +/// identifier +/// ; +/// @description Checks that it is a compile-time error if suffix is an +/// instance creation expression. +/// @author msyabro + + +class C { + m1() {} +} + +main() { + var c = new C(); + c..new C(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t14.dart b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t14.dart index b6dbbac440..87a075c237 100644 --- a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t14.dart +++ b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t14.dart @@ -1,32 +1,32 @@ -// 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 cascaded method invocation has the form e..suffix where e is -/// an expression and suffix is a sequence of operator, method, getter or -/// setter invocations. -/// cascadeSection: -/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* -/// (assignmentOperator expressionWithoutCascade)? -/// ; -/// cascadeSelector: -/// '[' expression ']' | -/// identifier -/// ; -/// @description Checks that it is a compile-time error if suffix is this. -/// @author msyabro - - -class C { - test() { - this..this; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } -} - -main() { - C().test(); -} - +// 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 cascaded method invocation has the form e..suffix where e is +/// an expression and suffix is a sequence of operator, method, getter or +/// setter invocations. +/// cascadeSection: +/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* +/// (assignmentOperator expressionWithoutCascade)? +/// ; +/// cascadeSelector: +/// '[' expression ']' | +/// identifier +/// ; +/// @description Checks that it is a compile-time error if suffix is this. +/// @author msyabro + + +class C { + test() { + this..this; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + C().test(); +} + diff --git a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t15.dart b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t15.dart index acc5140934..92b9223c41 100644 --- a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t15.dart +++ b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t15.dart @@ -1,32 +1,32 @@ -// 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 cascaded method invocation has the form e..suffix where e is -/// an expression and suffix is a sequence of operator, method, getter or -/// setter invocations. -/// cascadeSection: -/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* -/// (assignmentOperator expressionWithoutCascade)? -/// ; -/// cascadeSelector: -/// '[' expression ']' | -/// identifier -/// ; -/// @description Checks that it is a compile-time error if suffix is super. -/// @author msyabro - - -class C { - test() { - this..super; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } -} - -main() { - new C().test(); -} - +// 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 cascaded method invocation has the form e..suffix where e is +/// an expression and suffix is a sequence of operator, method, getter or +/// setter invocations. +/// cascadeSection: +/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* +/// (assignmentOperator expressionWithoutCascade)? +/// ; +/// cascadeSelector: +/// '[' expression ']' | +/// identifier +/// ; +/// @description Checks that it is a compile-time error if suffix is super. +/// @author msyabro + + +class C { + test() { + this..super; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + new C().test(); +} + diff --git a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t17.dart b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t17.dart index 2b9098cc82..d2b4ff4307 100644 --- a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t17.dart +++ b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t17.dart @@ -1,31 +1,31 @@ -// 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 cascaded method invocation has the form e..suffix where e is -/// an expression and suffix is a sequence of operator, method, getter or -/// setter invocations. -/// cascadeSection: -/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* -/// (assignmentOperator expressionWithoutCascade)? -/// ; -/// cascadeSelector: -/// '[' expression ']' | -/// identifier -/// ; -/// @description Checks that it is a compile-time error if suffix is an -/// additive expression. -/// @author msyabro - - -class C {} - -main() { - var a = 1; - var b = 0; - new C().. a + b; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// 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 cascaded method invocation has the form e..suffix where e is +/// an expression and suffix is a sequence of operator, method, getter or +/// setter invocations. +/// cascadeSection: +/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* +/// (assignmentOperator expressionWithoutCascade)? +/// ; +/// cascadeSelector: +/// '[' expression ']' | +/// identifier +/// ; +/// @description Checks that it is a compile-time error if suffix is an +/// additive expression. +/// @author msyabro + + +class C {} + +main() { + var a = 1; + var b = 0; + new C().. a + b; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t18.dart b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t18.dart index 14b8cf4680..6f307022d0 100644 --- a/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t18.dart +++ b/Language/Expressions/Method_Invocation/Cascaded_Invocations/syntax_t18.dart @@ -1,29 +1,29 @@ -// 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 cascaded method invocation has the form e..suffix where e is -/// an expression and suffix is a sequence of operator, method, getter or -/// setter invocations. -/// cascadeSection: -/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* -/// (assignmentOperator expressionWithoutCascade)? -/// ; -/// cascadeSelector: -/// '[' expression ']' | -/// identifier -/// ; -/// @description Checks that it is a compile-time error if suffix is an unary -/// expression. -/// @author msyabro - - -class C {} - -main() { - var a = 1; - C()..a++; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 cascaded method invocation has the form e..suffix where e is +/// an expression and suffix is a sequence of operator, method, getter or +/// setter invocations. +/// cascadeSection: +/// '..' (cascadeSelector arguments*)(assignableSelector arguments*)* +/// (assignmentOperator expressionWithoutCascade)? +/// ; +/// cascadeSelector: +/// '[' expression ']' | +/// identifier +/// ; +/// @description Checks that it is a compile-time error if suffix is an unary +/// expression. +/// @author msyabro + + +class C {} + +main() { + var a = 1; + C()..a++; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t02.dart b/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t02.dart index 03997e1442..ae3fc96d33 100644 --- a/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t02.dart +++ b/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t02.dart @@ -1,19 +1,19 @@ -// 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 An unconditional ordinary method invocation i has the form -/// o.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). -/// @description Checks that it is a compile-time error if named arguments -/// precede positional arguments. -/// @author msyabro - -// @dart = 2.16 - -main() { - var o; - o.f(name: null, 1); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An unconditional ordinary method invocation i has the form +/// o.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). +/// @description Checks that it is a compile-time error if named arguments +/// precede positional arguments. +/// @author msyabro + +// @dart = 2.16 + +main() { + var o; + o.f(name: null, 1); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t03.dart b/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t03.dart index 790ab3ed99..991df57de8 100644 --- a/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t03.dart +++ b/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t03.dart @@ -1,19 +1,19 @@ -// 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 An unconditional ordinary method invocation i has the form -/// o.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). -/// @description Checks that it is a compile-time error if named arguments -/// placed in between positional arguments. -/// @author msyabro - -// @dart = 2.16 - -main() { - var o; - o.f(1, name: null, 1); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An unconditional ordinary method invocation i has the form +/// o.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). +/// @description Checks that it is a compile-time error if named arguments +/// placed in between positional arguments. +/// @author msyabro + +// @dart = 2.16 + +main() { + var o; + o.f(1, name: null, 1); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t04.dart b/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t04.dart index 70a85d9804..d223533df0 100644 --- a/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t04.dart +++ b/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t04.dart @@ -1,17 +1,17 @@ -// 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 An unconditional ordinary method invocation i has the form -/// o.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). -/// @description Checks that arguments must be separated with comma. -/// @author msyabro - - -main() { - var o; - o.f(1 2); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An unconditional ordinary method invocation i has the form +/// o.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). +/// @description Checks that arguments must be separated with comma. +/// @author msyabro + + +main() { + var o; + o.f(1 2); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t05.dart b/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t05.dart index f7ba4525ec..9aefddfe5c 100644 --- a/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t05.dart +++ b/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t05.dart @@ -1,17 +1,17 @@ -// 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 An unconditional ordinary method invocation i has the form -/// o.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). -/// @description Checks that argument list may have comma on the end. -/// @author msyabro - -import "../../../../Utils/expect.dart"; - -main() { - var o; - Expect.throws(() { - o.f(1, 2, 3, ); - }); -} +// 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 An unconditional ordinary method invocation i has the form +/// o.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). +/// @description Checks that argument list may have comma on the end. +/// @author msyabro + +import "../../../../Utils/expect.dart"; + +main() { + var o; + Expect.throws(() { + o.f(1, 2, 3, ); + }); +} diff --git a/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t07.dart b/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t07.dart index 7efa70dc40..74c059798d 100644 --- a/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t07.dart +++ b/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t07.dart @@ -1,22 +1,22 @@ -// 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 An unconditional ordinary method invocation i has the form -/// o.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). -/// @description Checks static invocations, when o denotes a class in the -/// current scope. It is a compile-time error if named arguments precede -/// positional arguments. -/// @author msyabro - - -class C { - static f(p1, [name]) {} -} - -main() { - C.f(name: null, 1); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An unconditional ordinary method invocation i has the form +/// o.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). +/// @description Checks static invocations, when o denotes a class in the +/// current scope. It is a compile-time error if named arguments precede +/// positional arguments. +/// @author msyabro + + +class C { + static f(p1, [name]) {} +} + +main() { + C.f(name: null, 1); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t08.dart b/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t08.dart index 41bb0b4c41..b385189ec4 100644 --- a/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t08.dart +++ b/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t08.dart @@ -1,22 +1,22 @@ -// 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 An unconditional ordinary method invocation i has the form -/// o.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). -/// @description Checks static invocations, when o denotes a class in the -/// current scope. It is a compile-time error if named arguments placed in -/// between positional arguments. -/// @author msyabro - - -class C { - static f(p1, p2, [name]) {} -} - -main() { - C.f(1, name: null, 1); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An unconditional ordinary method invocation i has the form +/// o.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). +/// @description Checks static invocations, when o denotes a class in the +/// current scope. It is a compile-time error if named arguments placed in +/// between positional arguments. +/// @author msyabro + + +class C { + static f(p1, p2, [name]) {} +} + +main() { + C.f(1, name: null, 1); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t09.dart b/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t09.dart index 3e0e25fc5f..4d7b04df3b 100644 --- a/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t09.dart +++ b/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t09.dart @@ -1,21 +1,21 @@ -// 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 An unconditional ordinary method invocation i has the form -/// o.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). -/// @description Checks static invocations, when o denotes a class in the -/// current scope. Arguments must be separated with a comma. -/// @author msyabro - - -class C { - static f(p1, p2) {} -} - -main() { - C.f(1 2); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An unconditional ordinary method invocation i has the form +/// o.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). +/// @description Checks static invocations, when o denotes a class in the +/// current scope. Arguments must be separated with a comma. +/// @author msyabro + + +class C { + static f(p1, p2) {} +} + +main() { + C.f(1 2); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t10.dart b/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t10.dart index 9f8049c124..0351be111f 100644 --- a/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t10.dart +++ b/Language/Expressions/Method_Invocation/Ordinary_Invocation/syntax_t10.dart @@ -1,18 +1,18 @@ -// 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 An unconditional ordinary method invocation i has the form -/// o.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). -/// @description Checks static invocations, when o denotes a class in the -/// current scope. Argument list may have comma on the end. -/// @author msyabro - - -class C { - static f(p1, p2, p3) {} -} - -main() { - C.f(1, 2, 3, ); -} +// 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 An unconditional ordinary method invocation i has the form +/// o.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). +/// @description Checks static invocations, when o denotes a class in the +/// current scope. Argument list may have comma on the end. +/// @author msyabro + + +class C { + static f(p1, p2, p3) {} +} + +main() { + C.f(1, 2, 3, ); +} diff --git a/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t01.dart b/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t01.dart index ffa8d81743..1ea30583f8 100644 --- a/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t01.dart +++ b/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t01.dart @@ -1,19 +1,19 @@ -// 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 It is a compile-time error if a super method invocation occurs in -/// a top-level function or variable initializer, in an instance variable -/// initializer or initializer list, in class Object, in a factory constructor -/// or in a static method or variable initializer. -/// @description Checks that it is a compile-time error if a super method -/// invocation occurs in a top-level function. -/// @author msyabro - - -main() { - super.f(); -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error if a super method invocation occurs in +/// a top-level function or variable initializer, in an instance variable +/// initializer or initializer list, in class Object, in a factory constructor +/// or in a static method or variable initializer. +/// @description Checks that it is a compile-time error if a super method +/// invocation occurs in a top-level function. +/// @author msyabro + + +main() { + super.f(); +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t02.dart b/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t02.dart index 9788bcface..31b6c573c5 100644 --- a/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t02.dart +++ b/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t02.dart @@ -1,28 +1,28 @@ -// 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 It is a compile-time error if a super method invocation occurs in -/// a top-level function or variable initializer, in an instance variable -/// initializer or initializer list, in class Object, in a factory constructor -/// or in a static method or variable initializer. -/// @description Checks that it is a compile-time error if a super method -/// invocation occurs in an instance variable initializer. -/// @author msyabro - - -class S { - f() {} -} - -class A extends S { - A(): super(), x = super.f(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - var x; -} - -main() { - new A(); -} +// 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 It is a compile-time error if a super method invocation occurs in +/// a top-level function or variable initializer, in an instance variable +/// initializer or initializer list, in class Object, in a factory constructor +/// or in a static method or variable initializer. +/// @description Checks that it is a compile-time error if a super method +/// invocation occurs in an instance variable initializer. +/// @author msyabro + + +class S { + f() {} +} + +class A extends S { + A(): super(), x = super.f(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + var x; +} + +main() { + new A(); +} diff --git a/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t03.dart b/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t03.dart index 2d06a3bf32..364dec73b8 100644 --- a/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t03.dart +++ b/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t03.dart @@ -1,28 +1,28 @@ -// 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 It is a compile-time error if a super method invocation occurs in -/// a top-level function or variable initializer, in an instance variable -/// initializer or initializer list, in class Object, in a factory constructor -/// or in a static method or variable initializer. -/// @description Checks that it is a compile-time error if a super method -/// invocation occurs in a constructor initializer. -/// @author msyabro - - -class S { - f() {} -} - -class A extends S { - A(): super(), super.f(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - var x; -} - -main() { - new A(); -} +// 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 It is a compile-time error if a super method invocation occurs in +/// a top-level function or variable initializer, in an instance variable +/// initializer or initializer list, in class Object, in a factory constructor +/// or in a static method or variable initializer. +/// @description Checks that it is a compile-time error if a super method +/// invocation occurs in a constructor initializer. +/// @author msyabro + + +class S { + f() {} +} + +class A extends S { + A(): super(), super.f(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + var x; +} + +main() { + new A(); +} diff --git a/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t04.dart b/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t04.dart index 94729b0c5a..b9a0538c81 100644 --- a/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t04.dart +++ b/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t04.dart @@ -1,29 +1,29 @@ -// 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 It is a compile-time error if a super method invocation occurs in -/// a top-level function or variable initializer, in an instance variable -/// initializer or initializer list, in class Object, in a factory constructor -/// or in a static method or variable initializer. -/// @description Checks that it is a compile-time error if a super method -/// invocation occurs in a static method. -/// @author msyabro - - -class S { - f() {} -} - -class A extends S { - static staticMethod() { - super.f(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } -} - -main() { - A.staticMethod(); -} +// 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 It is a compile-time error if a super method invocation occurs in +/// a top-level function or variable initializer, in an instance variable +/// initializer or initializer list, in class Object, in a factory constructor +/// or in a static method or variable initializer. +/// @description Checks that it is a compile-time error if a super method +/// invocation occurs in a static method. +/// @author msyabro + + +class S { + f() {} +} + +class A extends S { + static staticMethod() { + super.f(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + A.staticMethod(); +} diff --git a/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t05.dart b/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t05.dart index 94931aedf3..ba67dd59b0 100644 --- a/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t05.dart +++ b/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t05.dart @@ -1,27 +1,27 @@ -// 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 It is a compile-time error if a super method invocation occurs in -/// a top-level function or variable initializer, in an instance variable -/// initializer or initializer list, in class Object, in a factory constructor -/// or in a static method or variable initializer. -/// @description Checks that it is a compile-time error if a super method -/// invocation occurs in a static variable initializer. -/// @author msyabro - - -class S { - f() {} -} - -class A extends S { - static var v = super.f(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - A.v; -} +// 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 It is a compile-time error if a super method invocation occurs in +/// a top-level function or variable initializer, in an instance variable +/// initializer or initializer list, in class Object, in a factory constructor +/// or in a static method or variable initializer. +/// @description Checks that it is a compile-time error if a super method +/// invocation occurs in a static variable initializer. +/// @author msyabro + + +class S { + f() {} +} + +class A extends S { + static var v = super.f(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + A.v; +} diff --git a/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t06.dart b/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t06.dart index 5ab73a3cec..55df53fed8 100644 --- a/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t06.dart +++ b/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t06.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if a super method invocation occurs in -/// a top-level function or variable initializer, in an instance variable -/// initializer or initializer list, in class Object, in a factory constructor -/// or in a static method or variable initializer. -/// @description Checks that it is a compile-time error if a super method -/// invocation occurs in a top-level variable initializer. -/// @author msyabro - - -var xx = super.f(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - xx; -} +// 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 It is a compile-time error if a super method invocation occurs in +/// a top-level function or variable initializer, in an instance variable +/// initializer or initializer list, in class Object, in a factory constructor +/// or in a static method or variable initializer. +/// @description Checks that it is a compile-time error if a super method +/// invocation occurs in a top-level variable initializer. +/// @author msyabro + + +var xx = super.f(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + xx; +} diff --git a/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t07.dart b/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t07.dart index 482d5e2d7d..2d3c424601 100644 --- a/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t07.dart +++ b/Language/Expressions/Method_Invocation/Super_Invocation/invocation_t07.dart @@ -1,34 +1,34 @@ -// 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 It is a compile-time error if a super method invocation occurs in -/// a top-level function or variable initializer, in an instance variable -/// initializer or initializer list, in class Object, in a factory constructor -/// or in a static method or variable initializer. -/// @description Checks that it is a compile-time error if a super method -/// invocation occurs in a factory constructor. -/// @author kaigorodov - - -abstract class I extends A { - factory I.foo() { return super.make(); } -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -class A { - C make() { return new C(); } -} - -class C implements I { -// ^ -// [analyzer] unspecified -// [cfe] unspecified - C() {} -} - -main() { - new I.foo(); -} +// 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 It is a compile-time error if a super method invocation occurs in +/// a top-level function or variable initializer, in an instance variable +/// initializer or initializer list, in class Object, in a factory constructor +/// or in a static method or variable initializer. +/// @description Checks that it is a compile-time error if a super method +/// invocation occurs in a factory constructor. +/// @author kaigorodov + + +abstract class I extends A { + factory I.foo() { return super.make(); } +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +class A { + C make() { return new C(); } +} + +class C implements I { +// ^ +// [analyzer] unspecified +// [cfe] unspecified + C() {} +} + +main() { + new I.foo(); +} diff --git a/Language/Expressions/Method_Invocation/Super_Invocation/syntax_t02.dart b/Language/Expressions/Method_Invocation/Super_Invocation/syntax_t02.dart index 3ea70b3686..106ba45fa5 100644 --- a/Language/Expressions/Method_Invocation/Super_Invocation/syntax_t02.dart +++ b/Language/Expressions/Method_Invocation/Super_Invocation/syntax_t02.dart @@ -1,27 +1,27 @@ -// 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 super method invocation i has the form -/// super.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). -/// @description Checks that it is a compile-time error if named -/// arguments precede positional arguments. -/// @author msyabro - - -class S { - f(p1, [name]) {} -} - -class A extends S { - test() { - super.f(name: null, 1); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } -} - -main() { - new A().test(); -} +// 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 super method invocation i has the form +/// super.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). +/// @description Checks that it is a compile-time error if named +/// arguments precede positional arguments. +/// @author msyabro + + +class S { + f(p1, [name]) {} +} + +class A extends S { + test() { + super.f(name: null, 1); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + new A().test(); +} diff --git a/Language/Expressions/Method_Invocation/Super_Invocation/syntax_t03.dart b/Language/Expressions/Method_Invocation/Super_Invocation/syntax_t03.dart index 2fcd80a501..ed67ee79f8 100644 --- a/Language/Expressions/Method_Invocation/Super_Invocation/syntax_t03.dart +++ b/Language/Expressions/Method_Invocation/Super_Invocation/syntax_t03.dart @@ -1,27 +1,27 @@ -// 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 super method invocation i has the form -/// super.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). -/// @description Checks that it is a compile-time error if named -/// arguments placed in between positional arguments. -/// @author msyabro - - -class S { - f(p1, p2, [name]) {} -} - -class A extends S { - test() { - super.f(1, name: null, 1); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } -} - -main() { - new A().test(); -} +// 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 super method invocation i has the form +/// super.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). +/// @description Checks that it is a compile-time error if named +/// arguments placed in between positional arguments. +/// @author msyabro + + +class S { + f(p1, p2, [name]) {} +} + +class A extends S { + test() { + super.f(1, name: null, 1); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + new A().test(); +} diff --git a/Language/Expressions/Method_Invocation/Super_Invocation/syntax_t04.dart b/Language/Expressions/Method_Invocation/Super_Invocation/syntax_t04.dart index 827a7ab5dd..5244294bed 100644 --- a/Language/Expressions/Method_Invocation/Super_Invocation/syntax_t04.dart +++ b/Language/Expressions/Method_Invocation/Super_Invocation/syntax_t04.dart @@ -1,26 +1,26 @@ -// 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 super method invocation i has the form -/// super.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). -/// @description Checks that arguments must be separated with comma. -/// @author msyabro - - -class S { - f(p1, p2) {} -} - -class A extends S { - test() { - super.f(new Object() new Object()); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } -} - -main() { - new A().test(); -} +// 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 super method invocation i has the form +/// super.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). +/// @description Checks that arguments must be separated with comma. +/// @author msyabro + + +class S { + f(p1, p2) {} +} + +class A extends S { + test() { + super.f(new Object() new Object()); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + new A().test(); +} diff --git a/Language/Expressions/Method_Invocation/Super_Invocation/syntax_t05.dart b/Language/Expressions/Method_Invocation/Super_Invocation/syntax_t05.dart index 43a9f84176..cd6adb93d2 100644 --- a/Language/Expressions/Method_Invocation/Super_Invocation/syntax_t05.dart +++ b/Language/Expressions/Method_Invocation/Super_Invocation/syntax_t05.dart @@ -1,23 +1,23 @@ -// 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 super method invocation i has the form -/// super.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). -/// @description Checks that argument list may end with comma. -/// @author msyabro - - -class S { - f(p1, p2, p3) {} -} - -class A extends S { - test() { - super.f(1, 2, 3, ); - } -} - -main() { - new A().test(); -} +// 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 super method invocation i has the form +/// super.m(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k). +/// @description Checks that argument list may end with comma. +/// @author msyabro + + +class S { + f(p1, p2, p3) {} +} + +class A extends S { + test() { + super.f(1, 2, 3, ); + } +} + +main() { + new A().test(); +} diff --git a/Language/Expressions/Multiplicative_Expressions/syntax_t02.dart b/Language/Expressions/Multiplicative_Expressions/syntax_t02.dart index d945d1afdc..e6dc5eb9f3 100644 --- a/Language/Expressions/Multiplicative_Expressions/syntax_t02.dart +++ b/Language/Expressions/Multiplicative_Expressions/syntax_t02.dart @@ -1,30 +1,30 @@ -// 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 Multiplicative expressions invoke the multiplication operators on -/// objects. -/// multiplicativeExpression: -/// unaryExpression (multiplicativeOperator unaryExpression)* | -/// super (multiplicativeOperator unaryExpression)+ -/// ; -/// multiplicativeOperator: -/// '*' | -/// '/' | -/// '%' | -/// '~/' -/// ; -/// A multiplicative expression is either a unary expression, or an invocation -/// of a multiplicative operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that expression of the form -/// [unaryExpression ('*' unaryExpression)*] must have at least two operands -/// @author msyabro - - -main() { - 1 *; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Multiplicative expressions invoke the multiplication operators on +/// objects. +/// multiplicativeExpression: +/// unaryExpression (multiplicativeOperator unaryExpression)* | +/// super (multiplicativeOperator unaryExpression)+ +/// ; +/// multiplicativeOperator: +/// '*' | +/// '/' | +/// '%' | +/// '~/' +/// ; +/// A multiplicative expression is either a unary expression, or an invocation +/// of a multiplicative operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that expression of the form +/// [unaryExpression ('*' unaryExpression)*] must have at least two operands +/// @author msyabro + + +main() { + 1 *; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Multiplicative_Expressions/syntax_t03.dart b/Language/Expressions/Multiplicative_Expressions/syntax_t03.dart index 8a40a56803..bbbacd6868 100644 --- a/Language/Expressions/Multiplicative_Expressions/syntax_t03.dart +++ b/Language/Expressions/Multiplicative_Expressions/syntax_t03.dart @@ -1,30 +1,30 @@ -// 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 Multiplicative expressions invoke the multiplication operators on -/// objects. -/// multiplicativeExpression: -/// unaryExpression (multiplicativeOperator unaryExpression)* | -/// super (multiplicativeOperator unaryExpression)+ -/// ; -/// multiplicativeOperator: -/// '*' | -/// '/' | -/// '%' | -/// '~/' -/// ; -/// A multiplicative expression is either a unary expression, or an invocation -/// of a multiplicative operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that expression of the form -/// [unaryExpression ('/' unaryExpression)*] must have at least two operands -/// @author msyabro - - -main() { - "" /; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Multiplicative expressions invoke the multiplication operators on +/// objects. +/// multiplicativeExpression: +/// unaryExpression (multiplicativeOperator unaryExpression)* | +/// super (multiplicativeOperator unaryExpression)+ +/// ; +/// multiplicativeOperator: +/// '*' | +/// '/' | +/// '%' | +/// '~/' +/// ; +/// A multiplicative expression is either a unary expression, or an invocation +/// of a multiplicative operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that expression of the form +/// [unaryExpression ('/' unaryExpression)*] must have at least two operands +/// @author msyabro + + +main() { + "" /; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Multiplicative_Expressions/syntax_t04.dart b/Language/Expressions/Multiplicative_Expressions/syntax_t04.dart index e5bc01cf0d..0b5623c091 100644 --- a/Language/Expressions/Multiplicative_Expressions/syntax_t04.dart +++ b/Language/Expressions/Multiplicative_Expressions/syntax_t04.dart @@ -1,30 +1,30 @@ -// 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 Multiplicative expressions invoke the multiplication operators on -/// objects. -/// multiplicativeExpression: -/// unaryExpression (multiplicativeOperator unaryExpression)* | -/// super (multiplicativeOperator unaryExpression)+ -/// ; -/// multiplicativeOperator: -/// '*' | -/// '/' | -/// '%' | -/// '~/' -/// ; -/// A multiplicative expression is either a unary expression, or an invocation -/// of a multiplicative operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that expression of the form -/// [unaryExpression ('%' unaryExpression)*] must have at least two operands -/// @author msyabro - - -main() { - [] %; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Multiplicative expressions invoke the multiplication operators on +/// objects. +/// multiplicativeExpression: +/// unaryExpression (multiplicativeOperator unaryExpression)* | +/// super (multiplicativeOperator unaryExpression)+ +/// ; +/// multiplicativeOperator: +/// '*' | +/// '/' | +/// '%' | +/// '~/' +/// ; +/// A multiplicative expression is either a unary expression, or an invocation +/// of a multiplicative operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that expression of the form +/// [unaryExpression ('%' unaryExpression)*] must have at least two operands +/// @author msyabro + + +main() { + [] %; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Multiplicative_Expressions/syntax_t05.dart b/Language/Expressions/Multiplicative_Expressions/syntax_t05.dart index 03cfea9b61..c116d21adb 100644 --- a/Language/Expressions/Multiplicative_Expressions/syntax_t05.dart +++ b/Language/Expressions/Multiplicative_Expressions/syntax_t05.dart @@ -1,30 +1,30 @@ -// 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 Multiplicative expressions invoke the multiplication operators on -/// objects. -/// multiplicativeExpression: -/// unaryExpression (multiplicativeOperator unaryExpression)* | -/// super (multiplicativeOperator unaryExpression)+ -/// ; -/// multiplicativeOperator: -/// '*' | -/// '/' | -/// '%' | -/// '~/' -/// ; -/// A multiplicative expression is either a unary expression, or an invocation -/// of a multiplicative operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that expression of the form -/// [unaryExpression ('~/' unaryExpression)*] must have at least two operands -/// @author msyabro - - -main() { - 1 ~/; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Multiplicative expressions invoke the multiplication operators on +/// objects. +/// multiplicativeExpression: +/// unaryExpression (multiplicativeOperator unaryExpression)* | +/// super (multiplicativeOperator unaryExpression)+ +/// ; +/// multiplicativeOperator: +/// '*' | +/// '/' | +/// '%' | +/// '~/' +/// ; +/// A multiplicative expression is either a unary expression, or an invocation +/// of a multiplicative operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that expression of the form +/// [unaryExpression ('~/' unaryExpression)*] must have at least two operands +/// @author msyabro + + +main() { + 1 ~/; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Multiplicative_Expressions/syntax_t06.dart b/Language/Expressions/Multiplicative_Expressions/syntax_t06.dart index dbb111c622..342b5bc5e5 100644 --- a/Language/Expressions/Multiplicative_Expressions/syntax_t06.dart +++ b/Language/Expressions/Multiplicative_Expressions/syntax_t06.dart @@ -1,40 +1,40 @@ -// 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 Multiplicative expressions invoke the multiplication operators on -/// objects. -/// multiplicativeExpression: -/// unaryExpression (multiplicativeOperator unaryExpression)* | -/// super (multiplicativeOperator unaryExpression)+ -/// ; -/// multiplicativeOperator: -/// '*' | -/// '/' | -/// '%' | -/// '~/' -/// ; -/// A multiplicative expression is either a unary expression, or an invocation -/// of a multiplicative operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that expression of the form -/// [super ('*' unaryExpression)+] must have at least two operands -/// @author msyabro - - -class S { - operator *(var v) {} -} - -class A extends S{ - test() { - super *; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } -} - -main() { - A(); -} +// 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 Multiplicative expressions invoke the multiplication operators on +/// objects. +/// multiplicativeExpression: +/// unaryExpression (multiplicativeOperator unaryExpression)* | +/// super (multiplicativeOperator unaryExpression)+ +/// ; +/// multiplicativeOperator: +/// '*' | +/// '/' | +/// '%' | +/// '~/' +/// ; +/// A multiplicative expression is either a unary expression, or an invocation +/// of a multiplicative operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that expression of the form +/// [super ('*' unaryExpression)+] must have at least two operands +/// @author msyabro + + +class S { + operator *(var v) {} +} + +class A extends S{ + test() { + super *; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + A(); +} diff --git a/Language/Expressions/Multiplicative_Expressions/syntax_t07.dart b/Language/Expressions/Multiplicative_Expressions/syntax_t07.dart index ec54ff1eee..f39e8fd8f3 100644 --- a/Language/Expressions/Multiplicative_Expressions/syntax_t07.dart +++ b/Language/Expressions/Multiplicative_Expressions/syntax_t07.dart @@ -1,40 +1,40 @@ -// 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 Multiplicative expressions invoke the multiplication operators on -/// objects. -/// multiplicativeExpression: -/// unaryExpression (multiplicativeOperator unaryExpression)* | -/// super (multiplicativeOperator unaryExpression)+ -/// ; -/// multiplicativeOperator: -/// '*' | -/// '/' | -/// '%' | -/// '~/' -/// ; -/// A multiplicative expression is either a unary expression, or an invocation -/// of a multiplicative operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that expression of the form -/// [super ('/' unaryExpression)+] must have at least two operands -/// @author msyabro - - -class S { - operator /(var v) {} -} - -class A extends S{ - test() { - super /; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } -} - -main() { - A(); -} +// 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 Multiplicative expressions invoke the multiplication operators on +/// objects. +/// multiplicativeExpression: +/// unaryExpression (multiplicativeOperator unaryExpression)* | +/// super (multiplicativeOperator unaryExpression)+ +/// ; +/// multiplicativeOperator: +/// '*' | +/// '/' | +/// '%' | +/// '~/' +/// ; +/// A multiplicative expression is either a unary expression, or an invocation +/// of a multiplicative operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that expression of the form +/// [super ('/' unaryExpression)+] must have at least two operands +/// @author msyabro + + +class S { + operator /(var v) {} +} + +class A extends S{ + test() { + super /; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + A(); +} diff --git a/Language/Expressions/Multiplicative_Expressions/syntax_t08.dart b/Language/Expressions/Multiplicative_Expressions/syntax_t08.dart index d0e6982dd6..50a2855da0 100644 --- a/Language/Expressions/Multiplicative_Expressions/syntax_t08.dart +++ b/Language/Expressions/Multiplicative_Expressions/syntax_t08.dart @@ -1,40 +1,40 @@ -// 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 Multiplicative expressions invoke the multiplication operators on -/// objects. -/// multiplicativeExpression: -/// unaryExpression (multiplicativeOperator unaryExpression)* | -/// super (multiplicativeOperator unaryExpression)+ -/// ; -/// multiplicativeOperator: -/// '*' | -/// '/' | -/// '%' | -/// '~/' -/// ; -/// A multiplicative expression is either a unary expression, or an invocation -/// of a multiplicative operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that expression of the form -/// [super ('%' unaryExpression)+] must have at least two operands -/// @author msyabro - - -class S { - operator %(var v) {} -} - -class A extends S{ - test() { - super %; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } -} - -main() { - A(); -} +// 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 Multiplicative expressions invoke the multiplication operators on +/// objects. +/// multiplicativeExpression: +/// unaryExpression (multiplicativeOperator unaryExpression)* | +/// super (multiplicativeOperator unaryExpression)+ +/// ; +/// multiplicativeOperator: +/// '*' | +/// '/' | +/// '%' | +/// '~/' +/// ; +/// A multiplicative expression is either a unary expression, or an invocation +/// of a multiplicative operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that expression of the form +/// [super ('%' unaryExpression)+] must have at least two operands +/// @author msyabro + + +class S { + operator %(var v) {} +} + +class A extends S{ + test() { + super %; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + A(); +} diff --git a/Language/Expressions/Multiplicative_Expressions/syntax_t09.dart b/Language/Expressions/Multiplicative_Expressions/syntax_t09.dart index 77ea98a1bb..6126201a0b 100644 --- a/Language/Expressions/Multiplicative_Expressions/syntax_t09.dart +++ b/Language/Expressions/Multiplicative_Expressions/syntax_t09.dart @@ -1,40 +1,40 @@ -// 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 Multiplicative expressions invoke the multiplication operators on -/// objects. -/// multiplicativeExpression: -/// unaryExpression (multiplicativeOperator unaryExpression)* | -/// super (multiplicativeOperator unaryExpression)+ -/// ; -/// multiplicativeOperator: -/// '*' | -/// '/' | -/// '%' | -/// '~/' -/// ; -/// A multiplicative expression is either a unary expression, or an invocation -/// of a multiplicative operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that expression of the form -/// [super ('~/' unaryExpression)+] must have at least two operands -/// @author msyabro - - -class S { - operator ~/(var v) {} -} - -class A extends S{ - test() { - super ~/; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } -} - -main() { - A(); -} +// 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 Multiplicative expressions invoke the multiplication operators on +/// objects. +/// multiplicativeExpression: +/// unaryExpression (multiplicativeOperator unaryExpression)* | +/// super (multiplicativeOperator unaryExpression)+ +/// ; +/// multiplicativeOperator: +/// '*' | +/// '/' | +/// '%' | +/// '~/' +/// ; +/// A multiplicative expression is either a unary expression, or an invocation +/// of a multiplicative operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that expression of the form +/// [super ('~/' unaryExpression)+] must have at least two operands +/// @author msyabro + + +class S { + operator ~/(var v) {} +} + +class A extends S{ + test() { + super ~/; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + A(); +} diff --git a/Language/Expressions/Multiplicative_Expressions/syntax_t18.dart b/Language/Expressions/Multiplicative_Expressions/syntax_t18.dart index 5358a1e83e..82eb5c0a7a 100644 --- a/Language/Expressions/Multiplicative_Expressions/syntax_t18.dart +++ b/Language/Expressions/Multiplicative_Expressions/syntax_t18.dart @@ -1,30 +1,30 @@ -// 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 Multiplicative expressions invoke the multiplication operators on -/// objects. -/// multiplicativeExpression: -/// unaryExpression (multiplicativeOperator unaryExpression)* | -/// super (multiplicativeOperator unaryExpression)+ -/// ; -/// multiplicativeOperator: -/// '*' | -/// '/' | -/// '%' | -/// '~/' -/// ; -/// A multiplicative expression is either a unary expression, or an invocation -/// of a multiplicative operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that a multiplicative expression can't start -/// with the multiplicative operator *. -/// @author msyabro - - -main() { - * 1; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Multiplicative expressions invoke the multiplication operators on +/// objects. +/// multiplicativeExpression: +/// unaryExpression (multiplicativeOperator unaryExpression)* | +/// super (multiplicativeOperator unaryExpression)+ +/// ; +/// multiplicativeOperator: +/// '*' | +/// '/' | +/// '%' | +/// '~/' +/// ; +/// A multiplicative expression is either a unary expression, or an invocation +/// of a multiplicative operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that a multiplicative expression can't start +/// with the multiplicative operator *. +/// @author msyabro + + +main() { + * 1; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Multiplicative_Expressions/syntax_t19.dart b/Language/Expressions/Multiplicative_Expressions/syntax_t19.dart index 7b88489de8..9c94b0e8fb 100644 --- a/Language/Expressions/Multiplicative_Expressions/syntax_t19.dart +++ b/Language/Expressions/Multiplicative_Expressions/syntax_t19.dart @@ -1,30 +1,30 @@ -// 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 Multiplicative expressions invoke the multiplication operators on -/// objects. -/// multiplicativeExpression: -/// unaryExpression (multiplicativeOperator unaryExpression)* | -/// super (multiplicativeOperator unaryExpression)+ -/// ; -/// multiplicativeOperator: -/// '*' | -/// '/' | -/// '%' | -/// '~/' -/// ; -/// A multiplicative expression is either a unary expression, or an invocation -/// of a multiplicative operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that a multiplicative expression can't start -/// with the multiplicative operator /. -/// @author msyabro - - -main() { - / 1; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Multiplicative expressions invoke the multiplication operators on +/// objects. +/// multiplicativeExpression: +/// unaryExpression (multiplicativeOperator unaryExpression)* | +/// super (multiplicativeOperator unaryExpression)+ +/// ; +/// multiplicativeOperator: +/// '*' | +/// '/' | +/// '%' | +/// '~/' +/// ; +/// A multiplicative expression is either a unary expression, or an invocation +/// of a multiplicative operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that a multiplicative expression can't start +/// with the multiplicative operator /. +/// @author msyabro + + +main() { + / 1; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Multiplicative_Expressions/syntax_t20.dart b/Language/Expressions/Multiplicative_Expressions/syntax_t20.dart index bafb32a31c..eba0fa1d50 100644 --- a/Language/Expressions/Multiplicative_Expressions/syntax_t20.dart +++ b/Language/Expressions/Multiplicative_Expressions/syntax_t20.dart @@ -1,30 +1,30 @@ -// 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 Multiplicative expressions invoke the multiplication operators on -/// objects. -/// multiplicativeExpression: -/// unaryExpression (multiplicativeOperator unaryExpression)* | -/// super (multiplicativeOperator unaryExpression)+ -/// ; -/// multiplicativeOperator: -/// '*' | -/// '/' | -/// '%' | -/// '~/' -/// ; -/// A multiplicative expression is either a unary expression, or an invocation -/// of a multiplicative operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that a multiplicative expression can't start -/// with the multiplicative operator %. -/// @author msyabro - - -main() { - % 1 * 2; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Multiplicative expressions invoke the multiplication operators on +/// objects. +/// multiplicativeExpression: +/// unaryExpression (multiplicativeOperator unaryExpression)* | +/// super (multiplicativeOperator unaryExpression)+ +/// ; +/// multiplicativeOperator: +/// '*' | +/// '/' | +/// '%' | +/// '~/' +/// ; +/// A multiplicative expression is either a unary expression, or an invocation +/// of a multiplicative operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that a multiplicative expression can't start +/// with the multiplicative operator %. +/// @author msyabro + + +main() { + % 1 * 2; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Multiplicative_Expressions/syntax_t21.dart b/Language/Expressions/Multiplicative_Expressions/syntax_t21.dart index b5d3d08f68..ef75b979c7 100644 --- a/Language/Expressions/Multiplicative_Expressions/syntax_t21.dart +++ b/Language/Expressions/Multiplicative_Expressions/syntax_t21.dart @@ -1,30 +1,30 @@ -// 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 Multiplicative expressions invoke the multiplication operators on -/// objects. -/// multiplicativeExpression: -/// unaryExpression (multiplicativeOperator unaryExpression)* | -/// super (multiplicativeOperator unaryExpression)+ -/// ; -/// multiplicativeOperator: -/// '*' | -/// '/' | -/// '%' | -/// '~/' -/// ; -/// A multiplicative expression is either a unary expression, or an invocation -/// of a multiplicative operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that a multiplicative expression can't start -/// with the multiplicative operator ~/. -/// @author msyabro - - -main() { - ~/ 0.5 ~/ 0.6; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Multiplicative expressions invoke the multiplication operators on +/// objects. +/// multiplicativeExpression: +/// unaryExpression (multiplicativeOperator unaryExpression)* | +/// super (multiplicativeOperator unaryExpression)+ +/// ; +/// multiplicativeOperator: +/// '*' | +/// '/' | +/// '%' | +/// '~/' +/// ; +/// A multiplicative expression is either a unary expression, or an invocation +/// of a multiplicative operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that a multiplicative expression can't start +/// with the multiplicative operator ~/. +/// @author msyabro + + +main() { + ~/ 0.5 ~/ 0.6; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Multiplicative_Expressions/syntax_t22.dart b/Language/Expressions/Multiplicative_Expressions/syntax_t22.dart index 978adcdb64..48777d5b84 100644 --- a/Language/Expressions/Multiplicative_Expressions/syntax_t22.dart +++ b/Language/Expressions/Multiplicative_Expressions/syntax_t22.dart @@ -1,30 +1,30 @@ -// 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 Multiplicative expressions invoke the multiplication operators on -/// objects. -/// multiplicativeExpression: -/// unaryExpression (multiplicativeOperator unaryExpression)* | -/// super (multiplicativeOperator unaryExpression)+ -/// ; -/// multiplicativeOperator: -/// '*' | -/// '/' | -/// '%' | -/// '~/' -/// ; -/// A multiplicative expression is either a unary expression, or an invocation -/// of a multiplicative operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that two multiplicative operators * can't be placed -/// one after another in a multiplicative expression. -/// @author msyabro - - -main() { - 1 * * 2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Multiplicative expressions invoke the multiplication operators on +/// objects. +/// multiplicativeExpression: +/// unaryExpression (multiplicativeOperator unaryExpression)* | +/// super (multiplicativeOperator unaryExpression)+ +/// ; +/// multiplicativeOperator: +/// '*' | +/// '/' | +/// '%' | +/// '~/' +/// ; +/// A multiplicative expression is either a unary expression, or an invocation +/// of a multiplicative operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that two multiplicative operators * can't be placed +/// one after another in a multiplicative expression. +/// @author msyabro + + +main() { + 1 * * 2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Multiplicative_Expressions/syntax_t23.dart b/Language/Expressions/Multiplicative_Expressions/syntax_t23.dart index 519335a48c..fb647dbc9b 100644 --- a/Language/Expressions/Multiplicative_Expressions/syntax_t23.dart +++ b/Language/Expressions/Multiplicative_Expressions/syntax_t23.dart @@ -1,30 +1,30 @@ -// 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 Multiplicative expressions invoke the multiplication operators on -/// objects. -/// multiplicativeExpression: -/// unaryExpression (multiplicativeOperator unaryExpression)* | -/// super (multiplicativeOperator unaryExpression)+ -/// ; -/// multiplicativeOperator: -/// '*' | -/// '/' | -/// '%' | -/// '~/' -/// ; -/// A multiplicative expression is either a unary expression, or an invocation -/// of a multiplicative operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that two multiplicative operators / can't be placed -/// one after another in a multiplicative expression. -/// @author msyabro - - -main() { - 0 / / 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Multiplicative expressions invoke the multiplication operators on +/// objects. +/// multiplicativeExpression: +/// unaryExpression (multiplicativeOperator unaryExpression)* | +/// super (multiplicativeOperator unaryExpression)+ +/// ; +/// multiplicativeOperator: +/// '*' | +/// '/' | +/// '%' | +/// '~/' +/// ; +/// A multiplicative expression is either a unary expression, or an invocation +/// of a multiplicative operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that two multiplicative operators / can't be placed +/// one after another in a multiplicative expression. +/// @author msyabro + + +main() { + 0 / / 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Multiplicative_Expressions/syntax_t24.dart b/Language/Expressions/Multiplicative_Expressions/syntax_t24.dart index 10ac3992dd..6e37e61d68 100644 --- a/Language/Expressions/Multiplicative_Expressions/syntax_t24.dart +++ b/Language/Expressions/Multiplicative_Expressions/syntax_t24.dart @@ -1,30 +1,30 @@ -// 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 Multiplicative expressions invoke the multiplication operators on -/// objects. -/// multiplicativeExpression: -/// unaryExpression (multiplicativeOperator unaryExpression)* | -/// super (multiplicativeOperator unaryExpression)+ -/// ; -/// multiplicativeOperator: -/// '*' | -/// '/' | -/// '%' | -/// '~/' -/// ; -/// A multiplicative expression is either a unary expression, or an invocation -/// of a multiplicative operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that two multiplicative operators % can't be placed -/// one after another in a multiplicative expression. -/// @author msyabro - - -main() { - .0 % % 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Multiplicative expressions invoke the multiplication operators on +/// objects. +/// multiplicativeExpression: +/// unaryExpression (multiplicativeOperator unaryExpression)* | +/// super (multiplicativeOperator unaryExpression)+ +/// ; +/// multiplicativeOperator: +/// '*' | +/// '/' | +/// '%' | +/// '~/' +/// ; +/// A multiplicative expression is either a unary expression, or an invocation +/// of a multiplicative operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that two multiplicative operators % can't be placed +/// one after another in a multiplicative expression. +/// @author msyabro + + +main() { + .0 % % 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Multiplicative_Expressions/syntax_t25.dart b/Language/Expressions/Multiplicative_Expressions/syntax_t25.dart index 060ddda92c..781643bf75 100644 --- a/Language/Expressions/Multiplicative_Expressions/syntax_t25.dart +++ b/Language/Expressions/Multiplicative_Expressions/syntax_t25.dart @@ -1,30 +1,30 @@ -// 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 Multiplicative expressions invoke the multiplication operators on -/// objects. -/// multiplicativeExpression: -/// unaryExpression (multiplicativeOperator unaryExpression)* | -/// super (multiplicativeOperator unaryExpression)+ -/// ; -/// multiplicativeOperator: -/// '*' | -/// '/' | -/// '%' | -/// '~/' -/// ; -/// A multiplicative expression is either a unary expression, or an invocation -/// of a multiplicative operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that two multiplicative operators ~/ can't be placed -/// one after another in a multiplicative expression. -/// @author msyabro - - -main() { - 2 ~/ ~/ 2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Multiplicative expressions invoke the multiplication operators on +/// objects. +/// multiplicativeExpression: +/// unaryExpression (multiplicativeOperator unaryExpression)* | +/// super (multiplicativeOperator unaryExpression)+ +/// ; +/// multiplicativeOperator: +/// '*' | +/// '/' | +/// '%' | +/// '~/' +/// ; +/// A multiplicative expression is either a unary expression, or an invocation +/// of a multiplicative operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that two multiplicative operators ~/ can't be placed +/// one after another in a multiplicative expression. +/// @author msyabro + + +main() { + 2 ~/ ~/ 2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Multiplicative_Expressions/syntax_t26.dart b/Language/Expressions/Multiplicative_Expressions/syntax_t26.dart index efad70b9d5..71ca5c048c 100644 --- a/Language/Expressions/Multiplicative_Expressions/syntax_t26.dart +++ b/Language/Expressions/Multiplicative_Expressions/syntax_t26.dart @@ -1,32 +1,32 @@ -// 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 Multiplicative expressions invoke the multiplication operators on -/// objects. -/// multiplicativeExpression: -/// unaryExpression (multiplicativeOperator unaryExpression)* | -/// super (multiplicativeOperator unaryExpression)+ -/// ; -/// multiplicativeOperator: -/// '*' | -/// '/' | -/// '%' | -/// '~/' -/// ; -/// A multiplicative expression is either a unary expression, or an invocation -/// of a multiplicative operator on either super or an expression e1, with -/// argument e2. -/// @description Checks that assignment expression cannot be used as the second -/// operand of a multiplicative expression. -/// @author rodionov - - - -main() { - var foo = 4; - 1 * foo = 2; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Multiplicative expressions invoke the multiplication operators on +/// objects. +/// multiplicativeExpression: +/// unaryExpression (multiplicativeOperator unaryExpression)* | +/// super (multiplicativeOperator unaryExpression)+ +/// ; +/// multiplicativeOperator: +/// '*' | +/// '/' | +/// '%' | +/// '~/' +/// ; +/// A multiplicative expression is either a unary expression, or an invocation +/// of a multiplicative operator on either super or an expression e1, with +/// argument e2. +/// @description Checks that assignment expression cannot be used as the second +/// operand of a multiplicative expression. +/// @author rodionov + + + +main() { + var foo = 4; + 1 * foo = 2; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Null/extend_or_implement_t01.dart b/Language/Expressions/Null/extend_or_implement_t01.dart index 1118f3cb69..fc1ee5812e 100644 --- a/Language/Expressions/Null/extend_or_implement_t01.dart +++ b/Language/Expressions/Null/extend_or_implement_t01.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error for a class to -/// attempt to extend, mix in or implement Null. -/// @description Checks that Null cannot be extended by a class. -/// @author hlodvig - - -class A extends Null {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - A(); -} +// 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 It is a compile-time error for a class to +/// attempt to extend, mix in or implement Null. +/// @description Checks that Null cannot be extended by a class. +/// @author hlodvig + + +class A extends Null {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + A(); +} diff --git a/Language/Expressions/Null/extend_or_implement_t02.dart b/Language/Expressions/Null/extend_or_implement_t02.dart index 10359169a6..9a6069a882 100644 --- a/Language/Expressions/Null/extend_or_implement_t02.dart +++ b/Language/Expressions/Null/extend_or_implement_t02.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error for a class to -/// attempt to extend, mix in or implement Null. -/// @description Checks that Null cannot be implemented by a class. -/// @author ilya - - -class A implements Null {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - A(); -} +// 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 It is a compile-time error for a class to +/// attempt to extend, mix in or implement Null. +/// @description Checks that Null cannot be implemented by a class. +/// @author ilya + + +class A implements Null {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + A(); +} diff --git a/Language/Expressions/Null/extend_or_implement_t03.dart b/Language/Expressions/Null/extend_or_implement_t03.dart index 7e525a0d83..c7485f08bc 100644 --- a/Language/Expressions/Null/extend_or_implement_t03.dart +++ b/Language/Expressions/Null/extend_or_implement_t03.dart @@ -1,20 +1,20 @@ -// Copyright (c) 2015, 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 It is a compile-time error for a class to -/// attempt to extend, mix in or implement Null. -/// @description Checks that Null cannot be mixed in -/// @author sgrekhov@unipro.ru - - -class A {} - -class C extends A with Null {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - A(); -} +// Copyright (c) 2015, 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 It is a compile-time error for a class to +/// attempt to extend, mix in or implement Null. +/// @description Checks that Null cannot be mixed in +/// @author sgrekhov@unipro.ru + + +class A {} + +class C extends A with Null {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + A(); +} diff --git a/Language/Expressions/Null/extend_or_implement_t05.dart b/Language/Expressions/Null/extend_or_implement_t05.dart index 93fd77b4af..5ddb557229 100644 --- a/Language/Expressions/Null/extend_or_implement_t05.dart +++ b/Language/Expressions/Null/extend_or_implement_t05.dart @@ -1,20 +1,20 @@ -// Copyright (c) 2015, 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 It is a compile-time error for a class to -/// attempt to extend, mix in or implement Null. -/// @description Checks that Null cannot be mixed in. Test class C = M form -/// @author sgrekhov@unipro.ru - - -class A {} - -class C = A with Null; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - C(); -} +// Copyright (c) 2015, 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 It is a compile-time error for a class to +/// attempt to extend, mix in or implement Null. +/// @description Checks that Null cannot be mixed in. Test class C = M form +/// @author sgrekhov@unipro.ru + + +class A {} + +class C = A with Null; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + C(); +} diff --git a/Language/Expressions/Numbers/extend_or_implement_double_t01.dart b/Language/Expressions/Numbers/extend_or_implement_double_t01.dart index e50f737d4f..d3071911cf 100644 --- a/Language/Expressions/Numbers/extend_or_implement_double_t01.dart +++ b/Language/Expressions/Numbers/extend_or_implement_double_t01.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error for a class to attempt to extend, -/// mix in or implement double. -/// @description Checks that a user-defined class cannot extend double. -/// @author iefremov - - -class A extends double {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 It is a compile-time error for a class to attempt to extend, +/// mix in or implement double. +/// @description Checks that a user-defined class cannot extend double. +/// @author iefremov + + +class A extends double {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Expressions/Numbers/extend_or_implement_double_t02.dart b/Language/Expressions/Numbers/extend_or_implement_double_t02.dart index af8dbd0442..dbfdaeeacf 100644 --- a/Language/Expressions/Numbers/extend_or_implement_double_t02.dart +++ b/Language/Expressions/Numbers/extend_or_implement_double_t02.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error for a class to attempt to extend, -/// mix in or implement double. -/// @description Checks that a user-defined class cannot implement double. -/// @author iefremov - - -class A implements double {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 It is a compile-time error for a class to attempt to extend, +/// mix in or implement double. +/// @description Checks that a user-defined class cannot implement double. +/// @author iefremov + + +class A implements double {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Expressions/Numbers/extend_or_implement_double_t03.dart b/Language/Expressions/Numbers/extend_or_implement_double_t03.dart index a1ce9a6ba7..46d5c1f9a8 100644 --- a/Language/Expressions/Numbers/extend_or_implement_double_t03.dart +++ b/Language/Expressions/Numbers/extend_or_implement_double_t03.dart @@ -1,23 +1,23 @@ -// 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 It is a compile-time error for a class to attempt to extend, -/// mix in or implement double. -/// @description Checks that a user-defined interface cannot extend double. -/// @author iefremov - - -abstract class A extends double {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -class B implements A {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new B(); -} +// 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 It is a compile-time error for a class to attempt to extend, +/// mix in or implement double. +/// @description Checks that a user-defined interface cannot extend double. +/// @author iefremov + + +abstract class A extends double {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +class B implements A {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new B(); +} diff --git a/Language/Expressions/Numbers/extend_or_implement_double_t04.dart b/Language/Expressions/Numbers/extend_or_implement_double_t04.dart index cd50b7905b..930d4a74da 100644 --- a/Language/Expressions/Numbers/extend_or_implement_double_t04.dart +++ b/Language/Expressions/Numbers/extend_or_implement_double_t04.dart @@ -1,20 +1,20 @@ -// Copyright (c) 2015, 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 It is a compile-time error for a class to attempt to extend, -/// mix in or implement double. -/// @description Checks that double cannot be mixed in -/// @author sgrekhov@unipro.ru - - -class A {} - -class C extends A with double {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new C(); -} +// Copyright (c) 2015, 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 It is a compile-time error for a class to attempt to extend, +/// mix in or implement double. +/// @description Checks that double cannot be mixed in +/// @author sgrekhov@unipro.ru + + +class A {} + +class C extends A with double {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new C(); +} diff --git a/Language/Expressions/Numbers/extend_or_implement_double_t06.dart b/Language/Expressions/Numbers/extend_or_implement_double_t06.dart index e92dfa9ee7..66582bb81a 100644 --- a/Language/Expressions/Numbers/extend_or_implement_double_t06.dart +++ b/Language/Expressions/Numbers/extend_or_implement_double_t06.dart @@ -1,20 +1,20 @@ -// Copyright (c) 2015, 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 It is a compile-time error for a class to attempt to extend, -/// mix in or implement double. -/// @description Checks that double cannot be mixed in. Test class C = M form -/// @author sgrekhov@unipro.ru - - -class A {} - -class C = A with double; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - C(); -} +// Copyright (c) 2015, 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 It is a compile-time error for a class to attempt to extend, +/// mix in or implement double. +/// @description Checks that double cannot be mixed in. Test class C = M form +/// @author sgrekhov@unipro.ru + + +class A {} + +class C = A with double; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + C(); +} diff --git a/Language/Expressions/Numbers/extend_or_implement_int_t01.dart b/Language/Expressions/Numbers/extend_or_implement_int_t01.dart index b6181ce488..3aee686e8b 100644 --- a/Language/Expressions/Numbers/extend_or_implement_int_t01.dart +++ b/Language/Expressions/Numbers/extend_or_implement_int_t01.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error for a class to attempt to extend, -/// mix in or implement int -/// @description Checks that a user-defined class cannot extend int. -/// @author iefremov - - -class A extends int {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 It is a compile-time error for a class to attempt to extend, +/// mix in or implement int +/// @description Checks that a user-defined class cannot extend int. +/// @author iefremov + + +class A extends int {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Expressions/Numbers/extend_or_implement_int_t02.dart b/Language/Expressions/Numbers/extend_or_implement_int_t02.dart index e263c8bb56..b9cd217d9e 100644 --- a/Language/Expressions/Numbers/extend_or_implement_int_t02.dart +++ b/Language/Expressions/Numbers/extend_or_implement_int_t02.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error for a class to attempt to extend, -/// mix in or implement int -/// @description Checks that a user-defined class cannot implement int. -/// @author iefremov - - -class A implements int {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 It is a compile-time error for a class to attempt to extend, +/// mix in or implement int +/// @description Checks that a user-defined class cannot implement int. +/// @author iefremov + + +class A implements int {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Expressions/Numbers/extend_or_implement_int_t03.dart b/Language/Expressions/Numbers/extend_or_implement_int_t03.dart index 34a52a1320..0241f27475 100644 --- a/Language/Expressions/Numbers/extend_or_implement_int_t03.dart +++ b/Language/Expressions/Numbers/extend_or_implement_int_t03.dart @@ -1,23 +1,23 @@ -// 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 It is a compile-time error for a class to attempt to extend, -/// mix in or implement int -/// @description Checks that a user-defined interface cannot extend int. -/// @author iefremov - - -abstract class A extends int {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -class B implements A {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new B(); -} +// 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 It is a compile-time error for a class to attempt to extend, +/// mix in or implement int +/// @description Checks that a user-defined interface cannot extend int. +/// @author iefremov + + +abstract class A extends int {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +class B implements A {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new B(); +} diff --git a/Language/Expressions/Numbers/extend_or_implement_int_t04.dart b/Language/Expressions/Numbers/extend_or_implement_int_t04.dart index 3300729225..51e11d6b89 100644 --- a/Language/Expressions/Numbers/extend_or_implement_int_t04.dart +++ b/Language/Expressions/Numbers/extend_or_implement_int_t04.dart @@ -1,20 +1,20 @@ -// Copyright (c) 2015, 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 It is a compile-time error for a class to attempt to extend, -/// mix in or implement int. -/// @description Checks that int cannot be mixed in -/// @author sgrekhov@unipro.ru - - -class A {} - -class C extends A with int {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new C(); -} +// Copyright (c) 2015, 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 It is a compile-time error for a class to attempt to extend, +/// mix in or implement int. +/// @description Checks that int cannot be mixed in +/// @author sgrekhov@unipro.ru + + +class A {} + +class C extends A with int {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new C(); +} diff --git a/Language/Expressions/Numbers/extend_or_implement_int_t06.dart b/Language/Expressions/Numbers/extend_or_implement_int_t06.dart index 523e93283a..0d0b01cd49 100644 --- a/Language/Expressions/Numbers/extend_or_implement_int_t06.dart +++ b/Language/Expressions/Numbers/extend_or_implement_int_t06.dart @@ -1,20 +1,20 @@ -// Copyright (c) 2015, 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 It is a compile-time error for a class to attempt to extend, -/// mix in or implement int. -/// @description Checks that int cannot be mixed in. Test class C = M form -/// @author sgrekhov@unipro.ru - - -class A {} - -class C = A with int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new C(); -} +// Copyright (c) 2015, 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 It is a compile-time error for a class to attempt to extend, +/// mix in or implement int. +/// @description Checks that int cannot be mixed in. Test class C = M form +/// @author sgrekhov@unipro.ru + + +class A {} + +class C = A with int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new C(); +} diff --git a/Language/Expressions/Numbers/implement_num_t01.dart b/Language/Expressions/Numbers/implement_num_t01.dart index 956b1a173c..7b08e87352 100644 --- a/Language/Expressions/Numbers/implement_num_t01.dart +++ b/Language/Expressions/Numbers/implement_num_t01.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error for any type other than the types -/// int and double to attempt to extend, mix in or implement num. -/// @description Checks that a user-defined class can not extend num. -/// @author iefremov - - -class A extends num {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 It is a compile-time error for any type other than the types +/// int and double to attempt to extend, mix in or implement num. +/// @description Checks that a user-defined class can not extend num. +/// @author iefremov + + +class A extends num {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Expressions/Numbers/implement_num_t02.dart b/Language/Expressions/Numbers/implement_num_t02.dart index 6681c5a963..f4db6c51d9 100644 --- a/Language/Expressions/Numbers/implement_num_t02.dart +++ b/Language/Expressions/Numbers/implement_num_t02.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error for any type other than the types -/// int and double to attempt to extend, mix in or implement num. -/// @description Checks that a user-defined class can not implement num. -/// @author iefremov - - -class A implements num {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 It is a compile-time error for any type other than the types +/// int and double to attempt to extend, mix in or implement num. +/// @description Checks that a user-defined class can not implement num. +/// @author iefremov + + +class A implements num {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Expressions/Numbers/implement_num_t03.dart b/Language/Expressions/Numbers/implement_num_t03.dart index add3c147ef..4667ac7ae9 100644 --- a/Language/Expressions/Numbers/implement_num_t03.dart +++ b/Language/Expressions/Numbers/implement_num_t03.dart @@ -1,23 +1,23 @@ -// 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 It is a compile-time error for any type other than the types -/// int and double to attempt to extend, mix in or implement num. -/// @description Checks that a user-defined interface can not extend num. -/// @author iefremov - - -abstract class A extends num {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -class B implements A {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new B(); -} +// 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 It is a compile-time error for any type other than the types +/// int and double to attempt to extend, mix in or implement num. +/// @description Checks that a user-defined interface can not extend num. +/// @author iefremov + + +abstract class A extends num {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +class B implements A {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new B(); +} diff --git a/Language/Expressions/Numbers/implement_num_t04.dart b/Language/Expressions/Numbers/implement_num_t04.dart index 3d823080e9..66a6b8aa0b 100644 --- a/Language/Expressions/Numbers/implement_num_t04.dart +++ b/Language/Expressions/Numbers/implement_num_t04.dart @@ -1,20 +1,20 @@ -// Copyright (c) 2015, 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 It is a compile-time error for any type other than the types -/// int and double to attempt to extend, mix in or implement num. -/// @description Checks that num cannot be mixed in -/// @author sgrekhov@unipro.ru - - -class A {} - -class C extends A with num {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new C(); -} +// Copyright (c) 2015, 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 It is a compile-time error for any type other than the types +/// int and double to attempt to extend, mix in or implement num. +/// @description Checks that num cannot be mixed in +/// @author sgrekhov@unipro.ru + + +class A {} + +class C extends A with num {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new C(); +} diff --git a/Language/Expressions/Numbers/implement_num_t06.dart b/Language/Expressions/Numbers/implement_num_t06.dart index 84a5596fee..5b9c74995a 100644 --- a/Language/Expressions/Numbers/implement_num_t06.dart +++ b/Language/Expressions/Numbers/implement_num_t06.dart @@ -1,20 +1,20 @@ -// Copyright (c) 2015, 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 It is a compile-time error for any type other than the types -/// int and double to attempt to extend, mix in or implement num. -/// @description Checks that num cannot be mixed in. Test class C = M form -/// @author sgrekhov@unipro.ru - - -class A {} - -class C = A with num; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new C(); -} +// Copyright (c) 2015, 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 It is a compile-time error for any type other than the types +/// int and double to attempt to extend, mix in or implement num. +/// @description Checks that num cannot be mixed in. Test class C = M form +/// @author sgrekhov@unipro.ru + + +class A {} + +class C = A with num; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new C(); +} diff --git a/Language/Expressions/Numbers/syntax_t16.dart b/Language/Expressions/Numbers/syntax_t16.dart index 21fa8b4079..63d33fdb73 100644 --- a/Language/Expressions/Numbers/syntax_t16.dart +++ b/Language/Expressions/Numbers/syntax_t16.dart @@ -1,39 +1,39 @@ -// 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 numeric literal is either a decimal or hexadecimal integer of -/// arbitrary size, or a decimal double. -/// -/// numericLiteral: -/// NUMBER| -/// HEX_NUMBER -///; -/// NUMBER: -/// DIGIT+ ('.' DIGIT+)? EXPONENT? | -/// '.' DIGIT+ EXPONENT? -/// ; -/// EXPONENT: -/// ('e' | 'E') ('+' | '-')? DIGIT+ -/// ; -/// HEX NUMBER: -/// '0x' HEX DIGIT+ | -/// '0X' HEX DIGIT+ -/// ; -/// HEX DIGIT: -/// 'a'..'f' | -/// 'A'..'F' | -/// DIGIT -/// ; -/// @description Checks that it is a compile-time error if a numeric literal -/// does not have any digits after the decimal point. -/// @author hlodvig -/// - - -main() { - var i = 0.; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 numeric literal is either a decimal or hexadecimal integer of +/// arbitrary size, or a decimal double. +/// +/// numericLiteral: +/// NUMBER| +/// HEX_NUMBER +///; +/// NUMBER: +/// DIGIT+ ('.' DIGIT+)? EXPONENT? | +/// '.' DIGIT+ EXPONENT? +/// ; +/// EXPONENT: +/// ('e' | 'E') ('+' | '-')? DIGIT+ +/// ; +/// HEX NUMBER: +/// '0x' HEX DIGIT+ | +/// '0X' HEX DIGIT+ +/// ; +/// HEX DIGIT: +/// 'a'..'f' | +/// 'A'..'F' | +/// DIGIT +/// ; +/// @description Checks that it is a compile-time error if a numeric literal +/// does not have any digits after the decimal point. +/// @author hlodvig +/// + + +main() { + var i = 0.; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Numbers/syntax_t17.dart b/Language/Expressions/Numbers/syntax_t17.dart index 76698a6bf9..0a333039a0 100644 --- a/Language/Expressions/Numbers/syntax_t17.dart +++ b/Language/Expressions/Numbers/syntax_t17.dart @@ -1,38 +1,38 @@ -// 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 numeric literal is either a decimal or hexadecimal integer of -/// arbitrary size, or a decimal double. -/// -/// numericLiteral: -/// NUMBER| -/// HEX_NUMBER -///; -/// NUMBER: -/// DIGIT+ ('.' DIGIT+)? EXPONENT? | -/// '.' DIGIT+ EXPONENT? -/// ; -/// EXPONENT: -/// ('e' | 'E') ('+' | '-')? DIGIT+ -/// ; -/// HEX NUMBER: -/// '0x' HEX DIGIT+ | -/// '0X' HEX DIGIT+ -/// ; -/// HEX DIGIT: -/// 'a'..'f' | -/// 'A'..'F' | -/// DIGIT -/// ; -/// @description Checks that it is a compile-time error if the exponent part of -/// a numeric literal contains a decimal point. -/// @author hlodvig - - -main() { - var i = 0e1.0; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 numeric literal is either a decimal or hexadecimal integer of +/// arbitrary size, or a decimal double. +/// +/// numericLiteral: +/// NUMBER| +/// HEX_NUMBER +///; +/// NUMBER: +/// DIGIT+ ('.' DIGIT+)? EXPONENT? | +/// '.' DIGIT+ EXPONENT? +/// ; +/// EXPONENT: +/// ('e' | 'E') ('+' | '-')? DIGIT+ +/// ; +/// HEX NUMBER: +/// '0x' HEX DIGIT+ | +/// '0X' HEX DIGIT+ +/// ; +/// HEX DIGIT: +/// 'a'..'f' | +/// 'A'..'F' | +/// DIGIT +/// ; +/// @description Checks that it is a compile-time error if the exponent part of +/// a numeric literal contains a decimal point. +/// @author hlodvig + + +main() { + var i = 0e1.0; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Numbers/syntax_t18.dart b/Language/Expressions/Numbers/syntax_t18.dart index 052e4b20d5..8c468ac156 100644 --- a/Language/Expressions/Numbers/syntax_t18.dart +++ b/Language/Expressions/Numbers/syntax_t18.dart @@ -1,38 +1,38 @@ -// 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 numeric literal is either a decimal or hexadecimal integer of -/// arbitrary size, or a decimal double. -/// -/// numericLiteral: -/// NUMBER| -/// HEX_NUMBER -///; -/// NUMBER: -/// DIGIT+ ('.' DIGIT+)? EXPONENT? | -/// '.' DIGIT+ EXPONENT? -/// ; -/// EXPONENT: -/// ('e' | 'E') ('+' | '-')? DIGIT+ -/// ; -/// HEX NUMBER: -/// '0x' HEX DIGIT+ | -/// '0X' HEX DIGIT+ -/// ; -/// HEX DIGIT: -/// 'a'..'f' | -/// 'A'..'F' | -/// DIGIT -/// ; -/// @description Checks that it is a compile-time error if a numeric literal -/// does not contain a mantissa. -/// @author hlodvig - - -main() { - var i = +e1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 numeric literal is either a decimal or hexadecimal integer of +/// arbitrary size, or a decimal double. +/// +/// numericLiteral: +/// NUMBER| +/// HEX_NUMBER +///; +/// NUMBER: +/// DIGIT+ ('.' DIGIT+)? EXPONENT? | +/// '.' DIGIT+ EXPONENT? +/// ; +/// EXPONENT: +/// ('e' | 'E') ('+' | '-')? DIGIT+ +/// ; +/// HEX NUMBER: +/// '0x' HEX DIGIT+ | +/// '0X' HEX DIGIT+ +/// ; +/// HEX DIGIT: +/// 'a'..'f' | +/// 'A'..'F' | +/// DIGIT +/// ; +/// @description Checks that it is a compile-time error if a numeric literal +/// does not contain a mantissa. +/// @author hlodvig + + +main() { + var i = +e1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Numbers/syntax_t21.dart b/Language/Expressions/Numbers/syntax_t21.dart index 1d1595f7b1..cc24f50b94 100644 --- a/Language/Expressions/Numbers/syntax_t21.dart +++ b/Language/Expressions/Numbers/syntax_t21.dart @@ -1,38 +1,38 @@ -// 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 numeric literal is either a decimal or hexadecimal integer of -/// arbitrary size, or a decimal double. -/// -/// numericLiteral: -/// NUMBER| -/// HEX_NUMBER -///; -/// NUMBER: -/// DIGIT+ ('.' DIGIT+)? EXPONENT? | -/// '.' DIGIT+ EXPONENT? -/// ; -/// EXPONENT: -/// ('e' | 'E') ('+' | '-')? DIGIT+ -/// ; -/// HEX NUMBER: -/// '0x' HEX DIGIT+ | -/// '0X' HEX DIGIT+ -/// ; -/// HEX DIGIT: -/// 'a'..'f' | -/// 'A'..'F' | -/// DIGIT -/// ; -/// @description Checks that exponent part without digits is not accepted as -/// numeric literal. -/// @author hlodvig - - -main() { - var i = 1e; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 numeric literal is either a decimal or hexadecimal integer of +/// arbitrary size, or a decimal double. +/// +/// numericLiteral: +/// NUMBER| +/// HEX_NUMBER +///; +/// NUMBER: +/// DIGIT+ ('.' DIGIT+)? EXPONENT? | +/// '.' DIGIT+ EXPONENT? +/// ; +/// EXPONENT: +/// ('e' | 'E') ('+' | '-')? DIGIT+ +/// ; +/// HEX NUMBER: +/// '0x' HEX DIGIT+ | +/// '0X' HEX DIGIT+ +/// ; +/// HEX DIGIT: +/// 'a'..'f' | +/// 'A'..'F' | +/// DIGIT +/// ; +/// @description Checks that exponent part without digits is not accepted as +/// numeric literal. +/// @author hlodvig + + +main() { + var i = 1e; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Numbers/syntax_t22.dart b/Language/Expressions/Numbers/syntax_t22.dart index 53b4e03264..bc76f5a3fd 100644 --- a/Language/Expressions/Numbers/syntax_t22.dart +++ b/Language/Expressions/Numbers/syntax_t22.dart @@ -1,38 +1,38 @@ -// 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 numeric literal is either a decimal or hexadecimal integer of -/// arbitrary size, or a decimal double. -/// -/// numericLiteral: -/// NUMBER| -/// HEX_NUMBER -///; -/// NUMBER: -/// DIGIT+ ('.' DIGIT+)? EXPONENT? | -/// '.' DIGIT+ EXPONENT? -/// ; -/// EXPONENT: -/// ('e' | 'E') ('+' | '-')? DIGIT+ -/// ; -/// HEX NUMBER: -/// '0x' HEX DIGIT+ | -/// '0X' HEX DIGIT+ -/// ; -/// HEX DIGIT: -/// 'a'..'f' | -/// 'A'..'F' | -/// DIGIT -/// ; -/// @description Checks that a plus sign without digits does not make a numeric -/// literal. -/// @author iefremov - - -main() { - var i = +; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 numeric literal is either a decimal or hexadecimal integer of +/// arbitrary size, or a decimal double. +/// +/// numericLiteral: +/// NUMBER| +/// HEX_NUMBER +///; +/// NUMBER: +/// DIGIT+ ('.' DIGIT+)? EXPONENT? | +/// '.' DIGIT+ EXPONENT? +/// ; +/// EXPONENT: +/// ('e' | 'E') ('+' | '-')? DIGIT+ +/// ; +/// HEX NUMBER: +/// '0x' HEX DIGIT+ | +/// '0X' HEX DIGIT+ +/// ; +/// HEX DIGIT: +/// 'a'..'f' | +/// 'A'..'F' | +/// DIGIT +/// ; +/// @description Checks that a plus sign without digits does not make a numeric +/// literal. +/// @author iefremov + + +main() { + var i = +; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Numbers/syntax_t23.dart b/Language/Expressions/Numbers/syntax_t23.dart index c78e710b13..4f454ff4d7 100644 --- a/Language/Expressions/Numbers/syntax_t23.dart +++ b/Language/Expressions/Numbers/syntax_t23.dart @@ -1,38 +1,38 @@ -// 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 numeric literal is either a decimal or hexadecimal integer of -/// arbitrary size, or a decimal double. -/// -/// numericLiteral: -/// NUMBER| -/// HEX_NUMBER -///; -/// NUMBER: -/// DIGIT+ ('.' DIGIT+)? EXPONENT? | -/// '.' DIGIT+ EXPONENT? -/// ; -/// EXPONENT: -/// ('e' | 'E') ('+' | '-')? DIGIT+ -/// ; -/// HEX NUMBER: -/// '0x' HEX DIGIT+ | -/// '0X' HEX DIGIT+ -/// ; -/// HEX DIGIT: -/// 'a'..'f' | -/// 'A'..'F' | -/// DIGIT -/// ; -/// @description Checks that a dot without digits does not make a numeric -/// literal. -/// @author iefremov - - -main() { - var i = .; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 numeric literal is either a decimal or hexadecimal integer of +/// arbitrary size, or a decimal double. +/// +/// numericLiteral: +/// NUMBER| +/// HEX_NUMBER +///; +/// NUMBER: +/// DIGIT+ ('.' DIGIT+)? EXPONENT? | +/// '.' DIGIT+ EXPONENT? +/// ; +/// EXPONENT: +/// ('e' | 'E') ('+' | '-')? DIGIT+ +/// ; +/// HEX NUMBER: +/// '0x' HEX DIGIT+ | +/// '0X' HEX DIGIT+ +/// ; +/// HEX DIGIT: +/// 'a'..'f' | +/// 'A'..'F' | +/// DIGIT +/// ; +/// @description Checks that a dot without digits does not make a numeric +/// literal. +/// @author iefremov + + +main() { + var i = .; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Numbers/syntax_t24.dart b/Language/Expressions/Numbers/syntax_t24.dart index 220f5c4c64..a3a449e177 100644 --- a/Language/Expressions/Numbers/syntax_t24.dart +++ b/Language/Expressions/Numbers/syntax_t24.dart @@ -1,38 +1,38 @@ -// 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 numeric literal is either a decimal or hexadecimal integer of -/// arbitrary size, or a decimal double. -/// -/// numericLiteral: -/// NUMBER| -/// HEX_NUMBER -///; -/// NUMBER: -/// DIGIT+ ('.' DIGIT+)? EXPONENT? | -/// '.' DIGIT+ EXPONENT? -/// ; -/// EXPONENT: -/// ('e' | 'E') ('+' | '-')? DIGIT+ -/// ; -/// HEX NUMBER: -/// '0x' HEX DIGIT+ | -/// '0X' HEX DIGIT+ -/// ; -/// HEX DIGIT: -/// 'a'..'f' | -/// 'A'..'F' | -/// DIGIT -/// ; -/// @description Checks that it is a compile-time error when there're -/// whitespace characters between an unary plus and the following digits. -/// @author iefremov - - -main() { - var i = + 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 numeric literal is either a decimal or hexadecimal integer of +/// arbitrary size, or a decimal double. +/// +/// numericLiteral: +/// NUMBER| +/// HEX_NUMBER +///; +/// NUMBER: +/// DIGIT+ ('.' DIGIT+)? EXPONENT? | +/// '.' DIGIT+ EXPONENT? +/// ; +/// EXPONENT: +/// ('e' | 'E') ('+' | '-')? DIGIT+ +/// ; +/// HEX NUMBER: +/// '0x' HEX DIGIT+ | +/// '0X' HEX DIGIT+ +/// ; +/// HEX DIGIT: +/// 'a'..'f' | +/// 'A'..'F' | +/// DIGIT +/// ; +/// @description Checks that it is a compile-time error when there're +/// whitespace characters between an unary plus and the following digits. +/// @author iefremov + + +main() { + var i = + 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Numbers/syntax_t25.dart b/Language/Expressions/Numbers/syntax_t25.dart index 74c4e04ada..310596c28f 100644 --- a/Language/Expressions/Numbers/syntax_t25.dart +++ b/Language/Expressions/Numbers/syntax_t25.dart @@ -1,38 +1,38 @@ -// 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 numeric literal is either a decimal or hexadecimal integer of -/// arbitrary size, or a decimal double. -/// -/// numericLiteral: -/// NUMBER| -/// HEX_NUMBER -///; -/// NUMBER: -/// DIGIT+ ('.' DIGIT+)? EXPONENT? | -/// '.' DIGIT+ EXPONENT? -/// ; -/// EXPONENT: -/// ('e' | 'E') ('+' | '-')? DIGIT+ -/// ; -/// HEX NUMBER: -/// '0x' HEX DIGIT+ | -/// '0X' HEX DIGIT+ -/// ; -/// HEX DIGIT: -/// 'a'..'f' | -/// 'A'..'F' | -/// DIGIT -/// ; -/// @description Checks that it is a compile-time error if the exponent part of -/// a numeric literal contains both '+' and '-' signs. -/// @author iefremov - - -main() { - var i = 1e+-1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 numeric literal is either a decimal or hexadecimal integer of +/// arbitrary size, or a decimal double. +/// +/// numericLiteral: +/// NUMBER| +/// HEX_NUMBER +///; +/// NUMBER: +/// DIGIT+ ('.' DIGIT+)? EXPONENT? | +/// '.' DIGIT+ EXPONENT? +/// ; +/// EXPONENT: +/// ('e' | 'E') ('+' | '-')? DIGIT+ +/// ; +/// HEX NUMBER: +/// '0x' HEX DIGIT+ | +/// '0X' HEX DIGIT+ +/// ; +/// HEX DIGIT: +/// 'a'..'f' | +/// 'A'..'F' | +/// DIGIT +/// ; +/// @description Checks that it is a compile-time error if the exponent part of +/// a numeric literal contains both '+' and '-' signs. +/// @author iefremov + + +main() { + var i = 1e+-1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Numbers/syntax_t26.dart b/Language/Expressions/Numbers/syntax_t26.dart index 21186549dc..5254e4f3ae 100644 --- a/Language/Expressions/Numbers/syntax_t26.dart +++ b/Language/Expressions/Numbers/syntax_t26.dart @@ -1,38 +1,38 @@ -// 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 numeric literal is either a decimal or hexadecimal integer of -/// arbitrary size, or a decimal double. -/// -/// numericLiteral: -/// NUMBER| -/// HEX_NUMBER -///; -/// NUMBER: -/// DIGIT+ ('.' DIGIT+)? EXPONENT? | -/// '.' DIGIT+ EXPONENT? -/// ; -/// EXPONENT: -/// ('e' | 'E') ('+' | '-')? DIGIT+ -/// ; -/// HEX NUMBER: -/// '0x' HEX DIGIT+ | -/// '0X' HEX DIGIT+ -/// ; -/// HEX DIGIT: -/// 'a'..'f' | -/// 'A'..'F' | -/// DIGIT -/// ; -/// @description Checks that the exponent part of a literal must contain at -/// least one digit. -/// @author iefremov - - -main() { - var i = 1e; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 numeric literal is either a decimal or hexadecimal integer of +/// arbitrary size, or a decimal double. +/// +/// numericLiteral: +/// NUMBER| +/// HEX_NUMBER +///; +/// NUMBER: +/// DIGIT+ ('.' DIGIT+)? EXPONENT? | +/// '.' DIGIT+ EXPONENT? +/// ; +/// EXPONENT: +/// ('e' | 'E') ('+' | '-')? DIGIT+ +/// ; +/// HEX NUMBER: +/// '0x' HEX DIGIT+ | +/// '0X' HEX DIGIT+ +/// ; +/// HEX DIGIT: +/// 'a'..'f' | +/// 'A'..'F' | +/// DIGIT +/// ; +/// @description Checks that the exponent part of a literal must contain at +/// least one digit. +/// @author iefremov + + +main() { + var i = 1e; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Numbers/syntax_t27.dart b/Language/Expressions/Numbers/syntax_t27.dart index 525c04c678..c06968a308 100644 --- a/Language/Expressions/Numbers/syntax_t27.dart +++ b/Language/Expressions/Numbers/syntax_t27.dart @@ -1,38 +1,38 @@ -// 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 numeric literal is either a decimal or hexadecimal integer of -/// arbitrary size, or a decimal double. -/// -/// numericLiteral: -/// NUMBER| -/// HEX_NUMBER -///; -/// NUMBER: -/// DIGIT+ ('.' DIGIT+)? EXPONENT? | -/// '.' DIGIT+ EXPONENT? -/// ; -/// EXPONENT: -/// ('e' | 'E') ('+' | '-')? DIGIT+ -/// ; -/// HEX NUMBER: -/// '0x' HEX DIGIT+ | -/// '0X' HEX DIGIT+ -/// ; -/// HEX DIGIT: -/// 'a'..'f' | -/// 'A'..'F' | -/// DIGIT -/// ; -/// @description Checks that the exponent part of a literal must contain at -/// least one digit. -/// @author iefremov - - -main() { - var i = 1e+; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 numeric literal is either a decimal or hexadecimal integer of +/// arbitrary size, or a decimal double. +/// +/// numericLiteral: +/// NUMBER| +/// HEX_NUMBER +///; +/// NUMBER: +/// DIGIT+ ('.' DIGIT+)? EXPONENT? | +/// '.' DIGIT+ EXPONENT? +/// ; +/// EXPONENT: +/// ('e' | 'E') ('+' | '-')? DIGIT+ +/// ; +/// HEX NUMBER: +/// '0x' HEX DIGIT+ | +/// '0X' HEX DIGIT+ +/// ; +/// HEX DIGIT: +/// 'a'..'f' | +/// 'A'..'F' | +/// DIGIT +/// ; +/// @description Checks that the exponent part of a literal must contain at +/// least one digit. +/// @author iefremov + + +main() { + var i = 1e+; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Numbers/syntax_t29.dart b/Language/Expressions/Numbers/syntax_t29.dart index eca1109b04..c0345a0a35 100644 --- a/Language/Expressions/Numbers/syntax_t29.dart +++ b/Language/Expressions/Numbers/syntax_t29.dart @@ -1,38 +1,38 @@ -// 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 numeric literal is either a decimal or hexadecimal integer of -/// arbitrary size, or a decimal double. -/// -/// numericLiteral: -/// NUMBER| -/// HEX_NUMBER -///; -/// NUMBER: -/// DIGIT+ ('.' DIGIT+)? EXPONENT? | -/// '.' DIGIT+ EXPONENT? -/// ; -/// EXPONENT: -/// ('e' | 'E') ('+' | '-')? DIGIT+ -/// ; -/// HEX NUMBER: -/// '0x' HEX DIGIT+ | -/// '0X' HEX DIGIT+ -/// ; -/// HEX DIGIT: -/// 'a'..'f' | -/// 'A'..'F' | -/// DIGIT -/// ; -/// @description Checks that a hex numeric literal must contain at least one -/// digit. -/// @author iefremov - - -main() { - var i = 0x; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 numeric literal is either a decimal or hexadecimal integer of +/// arbitrary size, or a decimal double. +/// +/// numericLiteral: +/// NUMBER| +/// HEX_NUMBER +///; +/// NUMBER: +/// DIGIT+ ('.' DIGIT+)? EXPONENT? | +/// '.' DIGIT+ EXPONENT? +/// ; +/// EXPONENT: +/// ('e' | 'E') ('+' | '-')? DIGIT+ +/// ; +/// HEX NUMBER: +/// '0x' HEX DIGIT+ | +/// '0X' HEX DIGIT+ +/// ; +/// HEX DIGIT: +/// 'a'..'f' | +/// 'A'..'F' | +/// DIGIT +/// ; +/// @description Checks that a hex numeric literal must contain at least one +/// digit. +/// @author iefremov + + +main() { + var i = 0x; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Numbers/syntax_t30.dart b/Language/Expressions/Numbers/syntax_t30.dart index 772c48d2ca..cf44e4f5b0 100644 --- a/Language/Expressions/Numbers/syntax_t30.dart +++ b/Language/Expressions/Numbers/syntax_t30.dart @@ -1,37 +1,37 @@ -// 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 numeric literal is either a decimal or hexadecimal integer of -/// arbitrary size, or a decimal double. -/// -/// numericLiteral: -/// NUMBER| -/// HEX_NUMBER -///; -/// NUMBER: -/// DIGIT+ ('.' DIGIT+)? EXPONENT? | -/// '.' DIGIT+ EXPONENT? -/// ; -/// EXPONENT: -/// ('e' | 'E') ('+' | '-')? DIGIT+ -/// ; -/// HEX NUMBER: -/// '0x' HEX DIGIT+ | -/// '0X' HEX DIGIT+ -/// ; -/// HEX DIGIT: -/// 'a'..'f' | -/// 'A'..'F' | -/// DIGIT -/// ; -/// @description Checks that a hex numeric literal cannot contain -/// non-hexadecimal digits. -/// @author iefremov - -main() { - var i = 0xg; -// ^^^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 numeric literal is either a decimal or hexadecimal integer of +/// arbitrary size, or a decimal double. +/// +/// numericLiteral: +/// NUMBER| +/// HEX_NUMBER +///; +/// NUMBER: +/// DIGIT+ ('.' DIGIT+)? EXPONENT? | +/// '.' DIGIT+ EXPONENT? +/// ; +/// EXPONENT: +/// ('e' | 'E') ('+' | '-')? DIGIT+ +/// ; +/// HEX NUMBER: +/// '0x' HEX DIGIT+ | +/// '0X' HEX DIGIT+ +/// ; +/// HEX DIGIT: +/// 'a'..'f' | +/// 'A'..'F' | +/// DIGIT +/// ; +/// @description Checks that a hex numeric literal cannot contain +/// non-hexadecimal digits. +/// @author iefremov + +main() { + var i = 0xg; +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Numbers/syntax_t31.dart b/Language/Expressions/Numbers/syntax_t31.dart index e7783a61cf..f1afe2ea47 100644 --- a/Language/Expressions/Numbers/syntax_t31.dart +++ b/Language/Expressions/Numbers/syntax_t31.dart @@ -1,38 +1,38 @@ -// 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 numeric literal is either a decimal or hexadecimal integer of -/// arbitrary size, or a decimal double. -/// -/// numericLiteral: -/// NUMBER| -/// HEX_NUMBER -///; -/// NUMBER: -/// DIGIT+ ('.' DIGIT+)? EXPONENT? | -/// '.' DIGIT+ EXPONENT? -/// ; -/// EXPONENT: -/// ('e' | 'E') ('+' | '-')? DIGIT+ -/// ; -/// HEX NUMBER: -/// '0x' HEX DIGIT+ | -/// '0X' HEX DIGIT+ -/// ; -/// HEX DIGIT: -/// 'a'..'f' | -/// 'A'..'F' | -/// DIGIT -/// ; -/// @description Checks that a decimal numeric literal cannot contain -/// non-decimal digits. -/// @author iefremov - - -main() { - var i = 1f; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 numeric literal is either a decimal or hexadecimal integer of +/// arbitrary size, or a decimal double. +/// +/// numericLiteral: +/// NUMBER| +/// HEX_NUMBER +///; +/// NUMBER: +/// DIGIT+ ('.' DIGIT+)? EXPONENT? | +/// '.' DIGIT+ EXPONENT? +/// ; +/// EXPONENT: +/// ('e' | 'E') ('+' | '-')? DIGIT+ +/// ; +/// HEX NUMBER: +/// '0x' HEX DIGIT+ | +/// '0X' HEX DIGIT+ +/// ; +/// HEX DIGIT: +/// 'a'..'f' | +/// 'A'..'F' | +/// DIGIT +/// ; +/// @description Checks that a decimal numeric literal cannot contain +/// non-decimal digits. +/// @author iefremov + + +main() { + var i = 1f; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Numbers/syntax_t32.dart b/Language/Expressions/Numbers/syntax_t32.dart index 1c97d4a05f..c9fec2d66e 100644 --- a/Language/Expressions/Numbers/syntax_t32.dart +++ b/Language/Expressions/Numbers/syntax_t32.dart @@ -1,38 +1,38 @@ -// 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 numeric literal is either a decimal or hexadecimal integer of -/// arbitrary size, or a decimal double. -/// -/// numericLiteral: -/// NUMBER| -/// HEX_NUMBER -///; -/// NUMBER: -/// DIGIT+ ('.' DIGIT+)? EXPONENT? | -/// '.' DIGIT+ EXPONENT? -/// ; -/// EXPONENT: -/// ('e' | 'E') ('+' | '-')? DIGIT+ -/// ; -/// HEX NUMBER: -/// '0x' HEX DIGIT+ | -/// '0X' HEX DIGIT+ -/// ; -/// HEX DIGIT: -/// 'a'..'f' | -/// 'A'..'F' | -/// DIGIT -/// ; -/// @description Checks that a hex numeric literal cannot contain -/// non-hexadecimal digits. -/// @author kaigorodov - - -main() { - var i = 0x1g; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 numeric literal is either a decimal or hexadecimal integer of +/// arbitrary size, or a decimal double. +/// +/// numericLiteral: +/// NUMBER| +/// HEX_NUMBER +///; +/// NUMBER: +/// DIGIT+ ('.' DIGIT+)? EXPONENT? | +/// '.' DIGIT+ EXPONENT? +/// ; +/// EXPONENT: +/// ('e' | 'E') ('+' | '-')? DIGIT+ +/// ; +/// HEX NUMBER: +/// '0x' HEX DIGIT+ | +/// '0X' HEX DIGIT+ +/// ; +/// HEX DIGIT: +/// 'a'..'f' | +/// 'A'..'F' | +/// DIGIT +/// ; +/// @description Checks that a hex numeric literal cannot contain +/// non-hexadecimal digits. +/// @author kaigorodov + + +main() { + var i = 0x1g; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Numbers/syntax_t33.dart b/Language/Expressions/Numbers/syntax_t33.dart index 2ecbb28f1b..4567ff11c0 100644 --- a/Language/Expressions/Numbers/syntax_t33.dart +++ b/Language/Expressions/Numbers/syntax_t33.dart @@ -1,37 +1,37 @@ -// 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 numeric literal is either a decimal or hexadecimal integer of -/// arbitrary size, or a decimal double. -/// -/// numericLiteral: -/// NUMBER| -/// HEX_NUMBER -///; -/// NUMBER: -/// DIGIT+ ('.' DIGIT+)? EXPONENT? | -/// '.' DIGIT+ EXPONENT? -/// ; -/// EXPONENT: -/// ('e' | 'E') ('+' | '-')? DIGIT+ -/// ; -/// HEX NUMBER: -/// '0x' HEX DIGIT+ | -/// '0X' HEX DIGIT+ -/// ; -/// HEX DIGIT: -/// 'a'..'f' | -/// 'A'..'F' | -/// DIGIT -/// ; -/// @description Checks that expression in form +(+num) can't be compiled. -/// @author hlodvig - - -main() { - var x = +(+1); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 numeric literal is either a decimal or hexadecimal integer of +/// arbitrary size, or a decimal double. +/// +/// numericLiteral: +/// NUMBER| +/// HEX_NUMBER +///; +/// NUMBER: +/// DIGIT+ ('.' DIGIT+)? EXPONENT? | +/// '.' DIGIT+ EXPONENT? +/// ; +/// EXPONENT: +/// ('e' | 'E') ('+' | '-')? DIGIT+ +/// ; +/// HEX NUMBER: +/// '0x' HEX DIGIT+ | +/// '0X' HEX DIGIT+ +/// ; +/// HEX DIGIT: +/// 'a'..'f' | +/// 'A'..'F' | +/// DIGIT +/// ; +/// @description Checks that expression in form +(+num) can't be compiled. +/// @author hlodvig + + +main() { + var x = +(+1); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Postfix_Expressions/syntax_t06.dart b/Language/Expressions/Postfix_Expressions/syntax_t06.dart index 9e26f4ef8c..750e55b78f 100644 --- a/Language/Expressions/Postfix_Expressions/syntax_t06.dart +++ b/Language/Expressions/Postfix_Expressions/syntax_t06.dart @@ -1,33 +1,33 @@ -// 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 Postfix expressions invoke the postfix operators on objects. -/// postfixExpression: -/// assignableExpression postfixOperator | -/// primary (selector* | (‘#’ ( (identifier ‘=’?) | operator))) -/// ; -/// postfixOperator: -/// incrementOperator -/// ; -/// selector: -/// assignableSelector | -/// arguments -/// ; -/// incrementOperator: -/// '++' | -/// '--' -/// ; -/// A postfix expression is either a primary expression, a function, method or -/// getter invocation, or an invocation of a postfix operator on an expression e. -/// @description Checks that an expression that is not assignable (e.g. numeric -/// literal) can't be used with postfixOperator. -/// @author msyabro - - -main() { - 1++; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Postfix expressions invoke the postfix operators on objects. +/// postfixExpression: +/// assignableExpression postfixOperator | +/// primary (selector* | (‘#’ ( (identifier ‘=’?) | operator))) +/// ; +/// postfixOperator: +/// incrementOperator +/// ; +/// selector: +/// assignableSelector | +/// arguments +/// ; +/// incrementOperator: +/// '++' | +/// '--' +/// ; +/// A postfix expression is either a primary expression, a function, method or +/// getter invocation, or an invocation of a postfix operator on an expression e. +/// @description Checks that an expression that is not assignable (e.g. numeric +/// literal) can't be used with postfixOperator. +/// @author msyabro + + +main() { + 1++; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Postfix_Expressions/syntax_t07.dart b/Language/Expressions/Postfix_Expressions/syntax_t07.dart index bb095d350b..fe30741a1a 100644 --- a/Language/Expressions/Postfix_Expressions/syntax_t07.dart +++ b/Language/Expressions/Postfix_Expressions/syntax_t07.dart @@ -1,34 +1,34 @@ -// 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 Postfix expressions invoke the postfix operators on objects. -/// postfixExpression: -/// assignableExpression postfixOperator | -/// primary (selector* | (‘#’ ( (identifier ‘=’?) | operator))) -/// ; -/// postfixOperator: -/// incrementOperator -/// ; -/// selector: -/// assignableSelector | -/// arguments -/// ; -/// incrementOperator: -/// '++' | -/// '--' -/// ; -/// A postfix expression is either a primary expression, a function, method or -/// getter invocation, or an invocation of a postfix operator on an expression e. -/// @description Checks that a postfixExpression can't be used with -/// postfixOperator. -/// @author msyabro - - -main() { - var x = 1; - x++++; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Postfix expressions invoke the postfix operators on objects. +/// postfixExpression: +/// assignableExpression postfixOperator | +/// primary (selector* | (‘#’ ( (identifier ‘=’?) | operator))) +/// ; +/// postfixOperator: +/// incrementOperator +/// ; +/// selector: +/// assignableSelector | +/// arguments +/// ; +/// incrementOperator: +/// '++' | +/// '--' +/// ; +/// A postfix expression is either a primary expression, a function, method or +/// getter invocation, or an invocation of a postfix operator on an expression e. +/// @description Checks that a postfixExpression can't be used with +/// postfixOperator. +/// @author msyabro + + +main() { + var x = 1; + x++++; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Postfix_Expressions/syntax_t08.dart b/Language/Expressions/Postfix_Expressions/syntax_t08.dart index e02125799d..27ca4c0fe3 100644 --- a/Language/Expressions/Postfix_Expressions/syntax_t08.dart +++ b/Language/Expressions/Postfix_Expressions/syntax_t08.dart @@ -1,40 +1,40 @@ -// 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 Postfix expressions invoke the postfix operators on objects. -/// postfixExpression: -/// assignableExpression postfixOperator | -/// primary (selector* | (‘#’ ( (identifier ‘=’?) | operator))) -/// ; -/// postfixOperator: -/// incrementOperator -/// ; -/// selector: -/// assignableSelector | -/// arguments -/// ; -/// incrementOperator: -/// '++' | -/// '--' -/// ; -/// A postfix expression is either a primary expression, a function, method or -/// getter invocation, or an invocation of a postfix operator on an expression e. -/// @description Checks that alone super can't be used with postfixOperator. -/// @author msyabro - - -class S {} -class A extends S { - test() { - super--; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } -} - -main() { - A a = new A(); - a.test(); -} +// 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 Postfix expressions invoke the postfix operators on objects. +/// postfixExpression: +/// assignableExpression postfixOperator | +/// primary (selector* | (‘#’ ( (identifier ‘=’?) | operator))) +/// ; +/// postfixOperator: +/// incrementOperator +/// ; +/// selector: +/// assignableSelector | +/// arguments +/// ; +/// incrementOperator: +/// '++' | +/// '--' +/// ; +/// A postfix expression is either a primary expression, a function, method or +/// getter invocation, or an invocation of a postfix operator on an expression e. +/// @description Checks that alone super can't be used with postfixOperator. +/// @author msyabro + + +class S {} +class A extends S { + test() { + super--; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + A a = new A(); + a.test(); +} diff --git a/Language/Expressions/Postfix_Expressions/syntax_t09.dart b/Language/Expressions/Postfix_Expressions/syntax_t09.dart index ba9f4129e8..a0cb7cff6e 100644 --- a/Language/Expressions/Postfix_Expressions/syntax_t09.dart +++ b/Language/Expressions/Postfix_Expressions/syntax_t09.dart @@ -1,33 +1,33 @@ -// 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 Postfix expressions invoke the postfix operators on objects. -/// postfixExpression: -/// assignableExpression postfixOperator | -/// primary (selector* | (‘#’ ( (identifier ‘=’?) | operator))) -/// ; -/// postfixOperator: -/// incrementOperator -/// ; -/// selector: -/// assignableSelector | -/// arguments -/// ; -/// incrementOperator: -/// '++' | -/// '--' -/// ; -/// A postfix expression is either a primary expression, a function, method or -/// getter invocation, or an invocation of a postfix operator on an expression e. -/// @description Checks that a statement can't be used with postfixOperator. -/// This test is using a variable declaration statement. -/// @author msyabro - - -main() { - var x;++; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Postfix expressions invoke the postfix operators on objects. +/// postfixExpression: +/// assignableExpression postfixOperator | +/// primary (selector* | (‘#’ ( (identifier ‘=’?) | operator))) +/// ; +/// postfixOperator: +/// incrementOperator +/// ; +/// selector: +/// assignableSelector | +/// arguments +/// ; +/// incrementOperator: +/// '++' | +/// '--' +/// ; +/// A postfix expression is either a primary expression, a function, method or +/// getter invocation, or an invocation of a postfix operator on an expression e. +/// @description Checks that a statement can't be used with postfixOperator. +/// This test is using a variable declaration statement. +/// @author msyabro + + +main() { + var x;++; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Postfix_Expressions/syntax_t10.dart b/Language/Expressions/Postfix_Expressions/syntax_t10.dart index a1d6d167cd..eebd80d5cb 100644 --- a/Language/Expressions/Postfix_Expressions/syntax_t10.dart +++ b/Language/Expressions/Postfix_Expressions/syntax_t10.dart @@ -1,34 +1,34 @@ -// 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 Postfix expressions invoke the postfix operators on objects. -/// postfixExpression: -/// assignableExpression postfixOperator | -/// primary (selector* | (‘#’ ( (identifier ‘=’?) | operator))) -/// ; -/// postfixOperator: -/// incrementOperator -/// ; -/// selector: -/// assignableSelector | -/// arguments -/// ; -/// incrementOperator: -/// '++' | -/// '--' -/// ; -/// A postfix expression is either a primary expression, a function, method or -/// getter invocation, or an invocation of a postfix operator on an expression e. -/// @description Checks that a statement can't be used with postfixOperator. -/// This test is using a block statement. -/// @author msyabro - - -main() { - var x = 1; - {x;}--; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Postfix expressions invoke the postfix operators on objects. +/// postfixExpression: +/// assignableExpression postfixOperator | +/// primary (selector* | (‘#’ ( (identifier ‘=’?) | operator))) +/// ; +/// postfixOperator: +/// incrementOperator +/// ; +/// selector: +/// assignableSelector | +/// arguments +/// ; +/// incrementOperator: +/// '++' | +/// '--' +/// ; +/// A postfix expression is either a primary expression, a function, method or +/// getter invocation, or an invocation of a postfix operator on an expression e. +/// @description Checks that a statement can't be used with postfixOperator. +/// This test is using a block statement. +/// @author msyabro + + +main() { + var x = 1; + {x;}--; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Postfix_Expressions/syntax_t11.dart b/Language/Expressions/Postfix_Expressions/syntax_t11.dart index 0baa7d9b28..25270fb93a 100644 --- a/Language/Expressions/Postfix_Expressions/syntax_t11.dart +++ b/Language/Expressions/Postfix_Expressions/syntax_t11.dart @@ -1,33 +1,33 @@ -// 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 Postfix expressions invoke the postfix operators on objects. -/// postfixExpression: -/// assignableExpression postfixOperator | -/// primary (selector* | (‘#’ ( (identifier ‘=’?) | operator))) -/// ; -/// postfixOperator: -/// incrementOperator -/// ; -/// selector: -/// assignableSelector | -/// arguments -/// ; -/// incrementOperator: -/// '++' | -/// '--' -/// ; -/// A postfix expression is either a primary expression, a function, method or -/// getter invocation, or an invocation of a postfix operator on an expression e. -/// @description Checks that a statement can't be used with postfixOperator. -/// This test is using a labeled for statement. -/// @author msyabro - - -main() { - label: for (var i in []) {};++; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Postfix expressions invoke the postfix operators on objects. +/// postfixExpression: +/// assignableExpression postfixOperator | +/// primary (selector* | (‘#’ ( (identifier ‘=’?) | operator))) +/// ; +/// postfixOperator: +/// incrementOperator +/// ; +/// selector: +/// assignableSelector | +/// arguments +/// ; +/// incrementOperator: +/// '++' | +/// '--' +/// ; +/// A postfix expression is either a primary expression, a function, method or +/// getter invocation, or an invocation of a postfix operator on an expression e. +/// @description Checks that a statement can't be used with postfixOperator. +/// This test is using a labeled for statement. +/// @author msyabro + + +main() { + label: for (var i in []) {};++; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Relational_Expressions/syntax_t02.dart b/Language/Expressions/Relational_Expressions/syntax_t02.dart index 2562dc1123..88474ceed2 100644 --- a/Language/Expressions/Relational_Expressions/syntax_t02.dart +++ b/Language/Expressions/Relational_Expressions/syntax_t02.dart @@ -1,28 +1,28 @@ -// 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 Relational expressions invoke the relational operators on objects. -/// relationalExpression: -/// bitwiseOrExpression (typeTest | typeCast | relationalOperator -/// bitwiseOrExpression)? | -/// super relationalOperator bitwiseOrExpression -/// ; -/// relationalOperator: -/// '>=' | -/// '>' | -/// '<=' | -/// '<' -/// ; -/// A relational expression is either a bitwise expression, or an invocation of -/// a relational operator on either super or an expression e1, with argument e2. -/// @description Checks that a relational expression can't start with operator <. -/// @author msyabro - - -main() { - < 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Relational expressions invoke the relational operators on objects. +/// relationalExpression: +/// bitwiseOrExpression (typeTest | typeCast | relationalOperator +/// bitwiseOrExpression)? | +/// super relationalOperator bitwiseOrExpression +/// ; +/// relationalOperator: +/// '>=' | +/// '>' | +/// '<=' | +/// '<' +/// ; +/// A relational expression is either a bitwise expression, or an invocation of +/// a relational operator on either super or an expression e1, with argument e2. +/// @description Checks that a relational expression can't start with operator <. +/// @author msyabro + + +main() { + < 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Relational_Expressions/syntax_t03.dart b/Language/Expressions/Relational_Expressions/syntax_t03.dart index d7be9c98ab..fbe1aaed1d 100644 --- a/Language/Expressions/Relational_Expressions/syntax_t03.dart +++ b/Language/Expressions/Relational_Expressions/syntax_t03.dart @@ -1,28 +1,28 @@ -// 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 Relational expressions invoke the relational operators on objects. -/// relationalExpression: -/// bitwiseOrExpression (typeTest | typeCast | relationalOperator -/// bitwiseOrExpression)? | -/// super relationalOperator bitwiseOrExpression -/// ; -/// relationalOperator: -/// '>=' | -/// '>' | -/// '<=' | -/// '<' -/// ; -/// A relational expression is either a bitwise expression, or an invocation of -/// a relational operator on either super or an expression e1, with argument e2. -/// @description Checks that a relational expression can't start with operator >. -/// @author msyabro - - -main() { - > (1 + 1); -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Relational expressions invoke the relational operators on objects. +/// relationalExpression: +/// bitwiseOrExpression (typeTest | typeCast | relationalOperator +/// bitwiseOrExpression)? | +/// super relationalOperator bitwiseOrExpression +/// ; +/// relationalOperator: +/// '>=' | +/// '>' | +/// '<=' | +/// '<' +/// ; +/// A relational expression is either a bitwise expression, or an invocation of +/// a relational operator on either super or an expression e1, with argument e2. +/// @description Checks that a relational expression can't start with operator >. +/// @author msyabro + + +main() { + > (1 + 1); +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Relational_Expressions/syntax_t04.dart b/Language/Expressions/Relational_Expressions/syntax_t04.dart index d5eee73f7f..74b2a945da 100644 --- a/Language/Expressions/Relational_Expressions/syntax_t04.dart +++ b/Language/Expressions/Relational_Expressions/syntax_t04.dart @@ -1,28 +1,28 @@ -// 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 Relational expressions invoke the relational operators on objects. -/// relationalExpression: -/// bitwiseOrExpression (typeTest | typeCast | relationalOperator -/// bitwiseOrExpression)? | -/// super relationalOperator bitwiseOrExpression -/// ; -/// relationalOperator: -/// '>=' | -/// '>' | -/// '<=' | -/// '<' -/// ; -/// A relational expression is either a bitwise expression, or an invocation of -/// a relational operator on either super or an expression e1, with argument e2. -/// @description Checks that a relational expression can't start with operator >=. -/// @author msyabro - - -main() { - >= (1 < 2); -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Relational expressions invoke the relational operators on objects. +/// relationalExpression: +/// bitwiseOrExpression (typeTest | typeCast | relationalOperator +/// bitwiseOrExpression)? | +/// super relationalOperator bitwiseOrExpression +/// ; +/// relationalOperator: +/// '>=' | +/// '>' | +/// '<=' | +/// '<' +/// ; +/// A relational expression is either a bitwise expression, or an invocation of +/// a relational operator on either super or an expression e1, with argument e2. +/// @description Checks that a relational expression can't start with operator >=. +/// @author msyabro + + +main() { + >= (1 < 2); +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Relational_Expressions/syntax_t05.dart b/Language/Expressions/Relational_Expressions/syntax_t05.dart index 8dbe777f9f..48ba1a3da9 100644 --- a/Language/Expressions/Relational_Expressions/syntax_t05.dart +++ b/Language/Expressions/Relational_Expressions/syntax_t05.dart @@ -1,28 +1,28 @@ -// 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 Relational expressions invoke the relational operators on objects. -/// relationalExpression: -/// bitwiseOrExpression (typeTest | typeCast | relationalOperator -/// bitwiseOrExpression)? | -/// super relationalOperator bitwiseOrExpression -/// ; -/// relationalOperator: -/// '>=' | -/// '>' | -/// '<=' | -/// '<' -/// ; -/// A relational expression is either a bitwise expression, or an invocation of -/// a relational operator on either super or an expression e1, with argument e2. -/// @description Checks that a relational expression can't start with operator <=. -/// @author msyabro - - -main() { - <= true; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Relational expressions invoke the relational operators on objects. +/// relationalExpression: +/// bitwiseOrExpression (typeTest | typeCast | relationalOperator +/// bitwiseOrExpression)? | +/// super relationalOperator bitwiseOrExpression +/// ; +/// relationalOperator: +/// '>=' | +/// '>' | +/// '<=' | +/// '<' +/// ; +/// A relational expression is either a bitwise expression, or an invocation of +/// a relational operator on either super or an expression e1, with argument e2. +/// @description Checks that a relational expression can't start with operator <=. +/// @author msyabro + + +main() { + <= true; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Relational_Expressions/syntax_t06.dart b/Language/Expressions/Relational_Expressions/syntax_t06.dart index b9460c3ba7..94a25b0374 100644 --- a/Language/Expressions/Relational_Expressions/syntax_t06.dart +++ b/Language/Expressions/Relational_Expressions/syntax_t06.dart @@ -1,29 +1,29 @@ -// 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 Relational expressions invoke the relational operators on objects. -/// relationalExpression: -/// bitwiseOrExpression (typeTest | typeCast | relationalOperator -/// bitwiseOrExpression)? | -/// super relationalOperator bitwiseOrExpression -/// ; -/// relationalOperator: -/// '>=' | -/// '>' | -/// '<=' | -/// '<' -/// ; -/// A relational expression is either a bitwise expression, or an invocation of -/// a relational operator on either super or an expression e1, with argument e2. -/// @description Checks that a relational expression can't terminate with -/// operator <. -/// @author msyabro - - -main() { - 2 <; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Relational expressions invoke the relational operators on objects. +/// relationalExpression: +/// bitwiseOrExpression (typeTest | typeCast | relationalOperator +/// bitwiseOrExpression)? | +/// super relationalOperator bitwiseOrExpression +/// ; +/// relationalOperator: +/// '>=' | +/// '>' | +/// '<=' | +/// '<' +/// ; +/// A relational expression is either a bitwise expression, or an invocation of +/// a relational operator on either super or an expression e1, with argument e2. +/// @description Checks that a relational expression can't terminate with +/// operator <. +/// @author msyabro + + +main() { + 2 <; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Relational_Expressions/syntax_t07.dart b/Language/Expressions/Relational_Expressions/syntax_t07.dart index 6c107bf260..cfa2223b72 100644 --- a/Language/Expressions/Relational_Expressions/syntax_t07.dart +++ b/Language/Expressions/Relational_Expressions/syntax_t07.dart @@ -1,29 +1,29 @@ -// 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 Relational expressions invoke the relational operators on objects. -/// relationalExpression: -/// bitwiseOrExpression (typeTest | typeCast | relationalOperator -/// bitwiseOrExpression)? | -/// super relationalOperator bitwiseOrExpression -/// ; -/// relationalOperator: -/// '>=' | -/// '>' | -/// '<=' | -/// '<' -/// ; -/// A relational expression is either a bitwise expression, or an invocation of -/// a relational operator on either super or an expression e1, with argument e2. -/// @description Checks that a relational expression can't terminate with -/// operator >. -/// @author msyabro - - -main() { - 1 >; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Relational expressions invoke the relational operators on objects. +/// relationalExpression: +/// bitwiseOrExpression (typeTest | typeCast | relationalOperator +/// bitwiseOrExpression)? | +/// super relationalOperator bitwiseOrExpression +/// ; +/// relationalOperator: +/// '>=' | +/// '>' | +/// '<=' | +/// '<' +/// ; +/// A relational expression is either a bitwise expression, or an invocation of +/// a relational operator on either super or an expression e1, with argument e2. +/// @description Checks that a relational expression can't terminate with +/// operator >. +/// @author msyabro + + +main() { + 1 >; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Relational_Expressions/syntax_t08.dart b/Language/Expressions/Relational_Expressions/syntax_t08.dart index b4f285640e..598a796e4e 100644 --- a/Language/Expressions/Relational_Expressions/syntax_t08.dart +++ b/Language/Expressions/Relational_Expressions/syntax_t08.dart @@ -1,29 +1,29 @@ -// 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 Relational expressions invoke the relational operators on objects. -/// relationalExpression: -/// bitwiseOrExpression (typeTest | typeCast | relationalOperator -/// bitwiseOrExpression)? | -/// super relationalOperator bitwiseOrExpression -/// ; -/// relationalOperator: -/// '>=' | -/// '>' | -/// '<=' | -/// '<' -/// ; -/// A relational expression is either a bitwise expression, or an invocation of -/// a relational operator on either super or an expression e1, with argument e2. -/// @description Checks that a relational expression can't terminate with -/// operator >=. -/// @author msyabro - - -main() { - 1 / 1 >=; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Relational expressions invoke the relational operators on objects. +/// relationalExpression: +/// bitwiseOrExpression (typeTest | typeCast | relationalOperator +/// bitwiseOrExpression)? | +/// super relationalOperator bitwiseOrExpression +/// ; +/// relationalOperator: +/// '>=' | +/// '>' | +/// '<=' | +/// '<' +/// ; +/// A relational expression is either a bitwise expression, or an invocation of +/// a relational operator on either super or an expression e1, with argument e2. +/// @description Checks that a relational expression can't terminate with +/// operator >=. +/// @author msyabro + + +main() { + 1 / 1 >=; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Relational_Expressions/syntax_t09.dart b/Language/Expressions/Relational_Expressions/syntax_t09.dart index 47f67a05c7..6a4174e26d 100644 --- a/Language/Expressions/Relational_Expressions/syntax_t09.dart +++ b/Language/Expressions/Relational_Expressions/syntax_t09.dart @@ -1,29 +1,29 @@ -// 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 Relational expressions invoke the relational operators on objects. -/// relationalExpression: -/// bitwiseOrExpression (typeTest | typeCast | relationalOperator -/// bitwiseOrExpression)? | -/// super relationalOperator bitwiseOrExpression -/// ; -/// relationalOperator: -/// '>=' | -/// '>' | -/// '<=' | -/// '<' -/// ; -/// A relational expression is either a bitwise expression, or an invocation of -/// a relational operator on either super or an expression e1, with argument e2. -/// @description Checks that a relational expression can't terminate with -/// operator <=. -/// @author msyabro - - -main() { - 0 <=; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Relational expressions invoke the relational operators on objects. +/// relationalExpression: +/// bitwiseOrExpression (typeTest | typeCast | relationalOperator +/// bitwiseOrExpression)? | +/// super relationalOperator bitwiseOrExpression +/// ; +/// relationalOperator: +/// '>=' | +/// '>' | +/// '<=' | +/// '<' +/// ; +/// A relational expression is either a bitwise expression, or an invocation of +/// a relational operator on either super or an expression e1, with argument e2. +/// @description Checks that a relational expression can't terminate with +/// operator <=. +/// @author msyabro + + +main() { + 0 <=; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Relational_Expressions/syntax_t10.dart b/Language/Expressions/Relational_Expressions/syntax_t10.dart index 78d58a9260..d0fc548886 100644 --- a/Language/Expressions/Relational_Expressions/syntax_t10.dart +++ b/Language/Expressions/Relational_Expressions/syntax_t10.dart @@ -1,29 +1,29 @@ -// 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 Relational expressions invoke the relational operators on objects. -/// relationalExpression: -/// bitwiseOrExpression (typeTest | typeCast | relationalOperator -/// bitwiseOrExpression)? | -/// super relationalOperator bitwiseOrExpression -/// ; -/// relationalOperator: -/// '>=' | -/// '>' | -/// '<=' | -/// '<' -/// ; -/// A relational expression is either a bitwise expression, or an invocation of -/// a relational operator on either super or an expression e1, with argument e2. -/// @description Checks that a relational expression cannot be the operand of -/// another relational expression. -/// @author msyabro - - -main() { - 1 < 2 < 3; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Relational expressions invoke the relational operators on objects. +/// relationalExpression: +/// bitwiseOrExpression (typeTest | typeCast | relationalOperator +/// bitwiseOrExpression)? | +/// super relationalOperator bitwiseOrExpression +/// ; +/// relationalOperator: +/// '>=' | +/// '>' | +/// '<=' | +/// '<' +/// ; +/// A relational expression is either a bitwise expression, or an invocation of +/// a relational operator on either super or an expression e1, with argument e2. +/// @description Checks that a relational expression cannot be the operand of +/// another relational expression. +/// @author msyabro + + +main() { + 1 < 2 < 3; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Relational_Expressions/syntax_t11.dart b/Language/Expressions/Relational_Expressions/syntax_t11.dart index 00be1558e3..028e40ec19 100644 --- a/Language/Expressions/Relational_Expressions/syntax_t11.dart +++ b/Language/Expressions/Relational_Expressions/syntax_t11.dart @@ -1,29 +1,29 @@ -// 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 Relational expressions invoke the relational operators on objects. -/// relationalExpression: -/// bitwiseOrExpression (typeTest | typeCast | relationalOperator -/// bitwiseOrExpression)? | -/// super relationalOperator bitwiseOrExpression -/// ; -/// relationalOperator: -/// '>=' | -/// '>' | -/// '<=' | -/// '<' -/// ; -/// A relational expression is either a bitwise expression, or an invocation of -/// a relational operator on either super or an expression e1, with argument e2. -/// @description Checks that a relational expression cannot be the operand of -/// another relational expression. -/// @author msyabro - - -main() { - 1 > 2 > 3; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Relational expressions invoke the relational operators on objects. +/// relationalExpression: +/// bitwiseOrExpression (typeTest | typeCast | relationalOperator +/// bitwiseOrExpression)? | +/// super relationalOperator bitwiseOrExpression +/// ; +/// relationalOperator: +/// '>=' | +/// '>' | +/// '<=' | +/// '<' +/// ; +/// A relational expression is either a bitwise expression, or an invocation of +/// a relational operator on either super or an expression e1, with argument e2. +/// @description Checks that a relational expression cannot be the operand of +/// another relational expression. +/// @author msyabro + + +main() { + 1 > 2 > 3; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Relational_Expressions/syntax_t12.dart b/Language/Expressions/Relational_Expressions/syntax_t12.dart index f6a659b06f..83ac501a34 100644 --- a/Language/Expressions/Relational_Expressions/syntax_t12.dart +++ b/Language/Expressions/Relational_Expressions/syntax_t12.dart @@ -1,29 +1,29 @@ -// 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 Relational expressions invoke the relational operators on objects. -/// relationalExpression: -/// bitwiseOrExpression (typeTest | typeCast | relationalOperator -/// bitwiseOrExpression)? | -/// super relationalOperator bitwiseOrExpression -/// ; -/// relationalOperator: -/// '>=' | -/// '>' | -/// '<=' | -/// '<' -/// ; -/// A relational expression is either a bitwise expression, or an invocation of -/// a relational operator on either super or an expression e1, with argument e2. -/// @description Checks that a relational expression cannot be the operand of -/// another relational expression. -/// @author msyabro - - -main() { - 1 >= 2 >= 3; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Relational expressions invoke the relational operators on objects. +/// relationalExpression: +/// bitwiseOrExpression (typeTest | typeCast | relationalOperator +/// bitwiseOrExpression)? | +/// super relationalOperator bitwiseOrExpression +/// ; +/// relationalOperator: +/// '>=' | +/// '>' | +/// '<=' | +/// '<' +/// ; +/// A relational expression is either a bitwise expression, or an invocation of +/// a relational operator on either super or an expression e1, with argument e2. +/// @description Checks that a relational expression cannot be the operand of +/// another relational expression. +/// @author msyabro + + +main() { + 1 >= 2 >= 3; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Relational_Expressions/syntax_t13.dart b/Language/Expressions/Relational_Expressions/syntax_t13.dart index 797fc1f7ef..bb8be137bf 100644 --- a/Language/Expressions/Relational_Expressions/syntax_t13.dart +++ b/Language/Expressions/Relational_Expressions/syntax_t13.dart @@ -1,29 +1,29 @@ -// 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 Relational expressions invoke the relational operators on objects. -/// relationalExpression: -/// bitwiseOrExpression (typeTest | typeCast | relationalOperator -/// bitwiseOrExpression)? | -/// super relationalOperator bitwiseOrExpression -/// ; -/// relationalOperator: -/// '>=' | -/// '>' | -/// '<=' | -/// '<' -/// ; -/// A relational expression is either a bitwise expression, or an invocation of -/// a relational operator on either super or an expression e1, with argument e2. -/// @description Checks that a relational expression cannot be the operand of -/// another relational expression. -/// @author msyabro - - -main() { - 1 <= 2 <= 3; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Relational expressions invoke the relational operators on objects. +/// relationalExpression: +/// bitwiseOrExpression (typeTest | typeCast | relationalOperator +/// bitwiseOrExpression)? | +/// super relationalOperator bitwiseOrExpression +/// ; +/// relationalOperator: +/// '>=' | +/// '>' | +/// '<=' | +/// '<' +/// ; +/// A relational expression is either a bitwise expression, or an invocation of +/// a relational operator on either super or an expression e1, with argument e2. +/// @description Checks that a relational expression cannot be the operand of +/// another relational expression. +/// @author msyabro + + +main() { + 1 <= 2 <= 3; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Relational_Expressions/syntax_t14.dart b/Language/Expressions/Relational_Expressions/syntax_t14.dart index 045b974469..6875f51236 100644 --- a/Language/Expressions/Relational_Expressions/syntax_t14.dart +++ b/Language/Expressions/Relational_Expressions/syntax_t14.dart @@ -1,28 +1,28 @@ -// 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 Relational expressions invoke the relational operators on objects. -/// relationalExpression: -/// bitwiseOrExpression (typeTest | typeCast | relationalOperator -/// bitwiseOrExpression)? | -/// super relationalOperator bitwiseOrExpression -/// ; -/// relationalOperator: -/// '>=' | -/// '>' | -/// '<=' | -/// '<' -/// ; -/// A relational expression is either a bitwise expression, or an invocation of -/// a relational operator on either super or an expression e1, with argument e2. -/// @description Checks that two < operators can't be placed one after another. -/// @author msyabro - - -main() { - 1 < < 2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Relational expressions invoke the relational operators on objects. +/// relationalExpression: +/// bitwiseOrExpression (typeTest | typeCast | relationalOperator +/// bitwiseOrExpression)? | +/// super relationalOperator bitwiseOrExpression +/// ; +/// relationalOperator: +/// '>=' | +/// '>' | +/// '<=' | +/// '<' +/// ; +/// A relational expression is either a bitwise expression, or an invocation of +/// a relational operator on either super or an expression e1, with argument e2. +/// @description Checks that two < operators can't be placed one after another. +/// @author msyabro + + +main() { + 1 < < 2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Relational_Expressions/syntax_t15.dart b/Language/Expressions/Relational_Expressions/syntax_t15.dart index fdaa03788e..30e555f78b 100644 --- a/Language/Expressions/Relational_Expressions/syntax_t15.dart +++ b/Language/Expressions/Relational_Expressions/syntax_t15.dart @@ -1,28 +1,28 @@ -// 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 Relational expressions invoke the relational operators on objects. -/// relationalExpression: -/// bitwiseOrExpression (typeTest | typeCast | relationalOperator -/// bitwiseOrExpression)? | -/// super relationalOperator bitwiseOrExpression -/// ; -/// relationalOperator: -/// '>=' | -/// '>' | -/// '<=' | -/// '<' -/// ; -/// A relational expression is either a bitwise expression, or an invocation of -/// a relational operator on either super or an expression e1, with argument e2. -/// @description Checks that two > operators can't be placed one after another. -/// @author msyabro - - -main() { - 1 > > 2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Relational expressions invoke the relational operators on objects. +/// relationalExpression: +/// bitwiseOrExpression (typeTest | typeCast | relationalOperator +/// bitwiseOrExpression)? | +/// super relationalOperator bitwiseOrExpression +/// ; +/// relationalOperator: +/// '>=' | +/// '>' | +/// '<=' | +/// '<' +/// ; +/// A relational expression is either a bitwise expression, or an invocation of +/// a relational operator on either super or an expression e1, with argument e2. +/// @description Checks that two > operators can't be placed one after another. +/// @author msyabro + + +main() { + 1 > > 2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Relational_Expressions/syntax_t16.dart b/Language/Expressions/Relational_Expressions/syntax_t16.dart index b69263309e..4bbda470aa 100644 --- a/Language/Expressions/Relational_Expressions/syntax_t16.dart +++ b/Language/Expressions/Relational_Expressions/syntax_t16.dart @@ -1,28 +1,28 @@ -// 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 Relational expressions invoke the relational operators on objects. -/// relationalExpression: -/// bitwiseOrExpression (typeTest | typeCast | relationalOperator -/// bitwiseOrExpression)? | -/// super relationalOperator bitwiseOrExpression -/// ; -/// relationalOperator: -/// '>=' | -/// '>' | -/// '<=' | -/// '<' -/// ; -/// A relational expression is either a bitwise expression, or an invocation of -/// a relational operator on either super or an expression e1, with argument e2. -/// @description Checks that two >= operators can't be placed one after another. -/// @author msyabro - - -main() { - 1 >= >= 2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Relational expressions invoke the relational operators on objects. +/// relationalExpression: +/// bitwiseOrExpression (typeTest | typeCast | relationalOperator +/// bitwiseOrExpression)? | +/// super relationalOperator bitwiseOrExpression +/// ; +/// relationalOperator: +/// '>=' | +/// '>' | +/// '<=' | +/// '<' +/// ; +/// A relational expression is either a bitwise expression, or an invocation of +/// a relational operator on either super or an expression e1, with argument e2. +/// @description Checks that two >= operators can't be placed one after another. +/// @author msyabro + + +main() { + 1 >= >= 2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Relational_Expressions/syntax_t17.dart b/Language/Expressions/Relational_Expressions/syntax_t17.dart index 57be9cc6c2..1a68b6030e 100644 --- a/Language/Expressions/Relational_Expressions/syntax_t17.dart +++ b/Language/Expressions/Relational_Expressions/syntax_t17.dart @@ -1,28 +1,28 @@ -// 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 Relational expressions invoke the relational operators on objects. -/// relationalExpression: -/// bitwiseOrExpression (typeTest | typeCast | relationalOperator -/// bitwiseOrExpression)? | -/// super relationalOperator bitwiseOrExpression -/// ; -/// relationalOperator: -/// '>=' | -/// '>' | -/// '<=' | -/// '<' -/// ; -/// A relational expression is either a bitwise expression, or an invocation of -/// a relational operator on either super or an expression e1, with argument e2. -/// @description Checks that two <= operators can't be placed one after another. -/// @author msyabro - - -main() { - 1 <= <= 2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Relational expressions invoke the relational operators on objects. +/// relationalExpression: +/// bitwiseOrExpression (typeTest | typeCast | relationalOperator +/// bitwiseOrExpression)? | +/// super relationalOperator bitwiseOrExpression +/// ; +/// relationalOperator: +/// '>=' | +/// '>' | +/// '<=' | +/// '<' +/// ; +/// A relational expression is either a bitwise expression, or an invocation of +/// a relational operator on either super or an expression e1, with argument e2. +/// @description Checks that two <= operators can't be placed one after another. +/// @author msyabro + + +main() { + 1 <= <= 2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Relational_Expressions/syntax_t24.dart b/Language/Expressions/Relational_Expressions/syntax_t24.dart index c263da0697..7db39e32c1 100644 --- a/Language/Expressions/Relational_Expressions/syntax_t24.dart +++ b/Language/Expressions/Relational_Expressions/syntax_t24.dart @@ -1,40 +1,40 @@ -// 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 Relational expressions invoke the relational operators on objects. -/// relationalExpression: -/// bitwiseOrExpression (typeTest | typeCast | relationalOperator -/// bitwiseOrExpression)? | -/// super relationalOperator bitwiseOrExpression -/// ; -/// relationalOperator: -/// '>=' | -/// '>' | -/// '<=' | -/// '<' -/// ; -/// A relational expression is either a bitwise expression, or an invocation of -/// a relational operator on either super or an expression e1, with argument e2. -/// @description Checks that super can't be used as the second operand in a -/// relational expression without a compile error. -/// @author msyabro - - -class S {} - -class A extends S { - test() { - try { - 1 >= super; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} - } -} - -main() { - A a = new A(); - a.test(); -} +// 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 Relational expressions invoke the relational operators on objects. +/// relationalExpression: +/// bitwiseOrExpression (typeTest | typeCast | relationalOperator +/// bitwiseOrExpression)? | +/// super relationalOperator bitwiseOrExpression +/// ; +/// relationalOperator: +/// '>=' | +/// '>' | +/// '<=' | +/// '<' +/// ; +/// A relational expression is either a bitwise expression, or an invocation of +/// a relational operator on either super or an expression e1, with argument e2. +/// @description Checks that super can't be used as the second operand in a +/// relational expression without a compile error. +/// @author msyabro + + +class S {} + +class A extends S { + test() { + try { + 1 >= super; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} + } +} + +main() { + A a = new A(); + a.test(); +} diff --git a/Language/Expressions/Shift/syntax_t02.dart b/Language/Expressions/Shift/syntax_t02.dart index b74c642fc0..aea4e08d21 100644 --- a/Language/Expressions/Shift/syntax_t02.dart +++ b/Language/Expressions/Shift/syntax_t02.dart @@ -1,27 +1,27 @@ -// 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 Shift expressions invoke the shift operators on objects. -/// shiftExpression: -/// additiveExpression (shiftOperator additiveExpression)* | -/// super (shiftOperator additiveExpression)+ -/// ; -/// shiftOperator: -/// '<<' | -/// '>>' | -/// '>>>' -/// ; -/// A shift expression is either an additive expression, or an invocation -/// of a shift operator on either super or an expression e1, with argument e2. -/// @description Checks that a shift expression of the form e1 op e2 -/// can't terminate with the shift operator <<. -/// @author msyabro - - -main() { - 1 <<; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Shift expressions invoke the shift operators on objects. +/// shiftExpression: +/// additiveExpression (shiftOperator additiveExpression)* | +/// super (shiftOperator additiveExpression)+ +/// ; +/// shiftOperator: +/// '<<' | +/// '>>' | +/// '>>>' +/// ; +/// A shift expression is either an additive expression, or an invocation +/// of a shift operator on either super or an expression e1, with argument e2. +/// @description Checks that a shift expression of the form e1 op e2 +/// can't terminate with the shift operator <<. +/// @author msyabro + + +main() { + 1 <<; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Shift/syntax_t03.dart b/Language/Expressions/Shift/syntax_t03.dart index cc786876b5..e5c8732d27 100644 --- a/Language/Expressions/Shift/syntax_t03.dart +++ b/Language/Expressions/Shift/syntax_t03.dart @@ -1,27 +1,27 @@ -// 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 Shift expressions invoke the shift operators on objects. -/// shiftExpression: -/// additiveExpression (shiftOperator additiveExpression)* | -/// super (shiftOperator additiveExpression)+ -/// ; -/// shiftOperator: -/// '<<' | -/// '>>' | -/// '>>>' -/// ; -/// A shift expression is either an additive expression, or an invocation -/// of a shift operator on either super or an expression e1, with argument e2. -/// @description Checks that a shift expression of the form e1 op e2 -/// can't terminate with the shift operator >>. -/// @author msyabro - - -main() { - 1 << 2 >> 1 >>; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Shift expressions invoke the shift operators on objects. +/// shiftExpression: +/// additiveExpression (shiftOperator additiveExpression)* | +/// super (shiftOperator additiveExpression)+ +/// ; +/// shiftOperator: +/// '<<' | +/// '>>' | +/// '>>>' +/// ; +/// A shift expression is either an additive expression, or an invocation +/// of a shift operator on either super or an expression e1, with argument e2. +/// @description Checks that a shift expression of the form e1 op e2 +/// can't terminate with the shift operator >>. +/// @author msyabro + + +main() { + 1 << 2 >> 1 >>; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Shift/syntax_t04.dart b/Language/Expressions/Shift/syntax_t04.dart index 52ff6ba631..68d449193b 100644 --- a/Language/Expressions/Shift/syntax_t04.dart +++ b/Language/Expressions/Shift/syntax_t04.dart @@ -1,27 +1,27 @@ -// 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 Shift expressions invoke the shift operators on objects. -/// shiftExpression: -/// additiveExpression (shiftOperator additiveExpression)* | -/// super (shiftOperator additiveExpression)+ -/// ; -/// shiftOperator: -/// '<<' | -/// '>>' | -/// '>>>' -/// ; -/// A shift expression is either an additive expression, or an invocation -/// of a shift operator on either super or an expression e1, with argument e2. -/// @description Checks that a shift expression can't start with -/// the shift operator <<. -/// @author msyabro - - -main() { - << 1; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Shift expressions invoke the shift operators on objects. +/// shiftExpression: +/// additiveExpression (shiftOperator additiveExpression)* | +/// super (shiftOperator additiveExpression)+ +/// ; +/// shiftOperator: +/// '<<' | +/// '>>' | +/// '>>>' +/// ; +/// A shift expression is either an additive expression, or an invocation +/// of a shift operator on either super or an expression e1, with argument e2. +/// @description Checks that a shift expression can't start with +/// the shift operator <<. +/// @author msyabro + + +main() { + << 1; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Shift/syntax_t05.dart b/Language/Expressions/Shift/syntax_t05.dart index 82eb8417fc..915649302a 100644 --- a/Language/Expressions/Shift/syntax_t05.dart +++ b/Language/Expressions/Shift/syntax_t05.dart @@ -1,27 +1,27 @@ -// 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 Shift expressions invoke the shift operators on objects. -/// shiftExpression: -/// additiveExpression (shiftOperator additiveExpression)* | -/// super (shiftOperator additiveExpression)+ -/// ; -/// shiftOperator: -/// '<<' | -/// '>>' | -/// '>>>' -/// ; -/// A shift expression is either an additive expression, or an invocation -/// of a shift operator on either super or an expression e1, with argument e2. -/// @description Checks that a shift expression can't start with -/// the shift operator >>. -/// @author msyabro - - -main() { - >> 2; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Shift expressions invoke the shift operators on objects. +/// shiftExpression: +/// additiveExpression (shiftOperator additiveExpression)* | +/// super (shiftOperator additiveExpression)+ +/// ; +/// shiftOperator: +/// '<<' | +/// '>>' | +/// '>>>' +/// ; +/// A shift expression is either an additive expression, or an invocation +/// of a shift operator on either super or an expression e1, with argument e2. +/// @description Checks that a shift expression can't start with +/// the shift operator >>. +/// @author msyabro + + +main() { + >> 2; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Shift/syntax_t06.dart b/Language/Expressions/Shift/syntax_t06.dart index 68396a8e8c..9e556efcad 100644 --- a/Language/Expressions/Shift/syntax_t06.dart +++ b/Language/Expressions/Shift/syntax_t06.dart @@ -1,27 +1,27 @@ -// 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 Shift expressions invoke the shift operators on objects. -/// shiftExpression: -/// additiveExpression (shiftOperator additiveExpression)* | -/// super (shiftOperator additiveExpression)+ -/// ; -/// shiftOperator: -/// '<<' | -/// '>>' | -/// '>>>' -/// ; -/// A shift expression is either an additive expression, or an invocation -/// of a shift operator on either super or an expression e1, with argument e2. -/// @description Checks that two shift operators << can't be placed -/// one after another in a shift expression. -/// @author msyabro - - -main() { - 1 << << 2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Shift expressions invoke the shift operators on objects. +/// shiftExpression: +/// additiveExpression (shiftOperator additiveExpression)* | +/// super (shiftOperator additiveExpression)+ +/// ; +/// shiftOperator: +/// '<<' | +/// '>>' | +/// '>>>' +/// ; +/// A shift expression is either an additive expression, or an invocation +/// of a shift operator on either super or an expression e1, with argument e2. +/// @description Checks that two shift operators << can't be placed +/// one after another in a shift expression. +/// @author msyabro + + +main() { + 1 << << 2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Shift/syntax_t07.dart b/Language/Expressions/Shift/syntax_t07.dart index 8e9ec75ad8..1b48271a27 100644 --- a/Language/Expressions/Shift/syntax_t07.dart +++ b/Language/Expressions/Shift/syntax_t07.dart @@ -1,27 +1,27 @@ -// 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 Shift expressions invoke the shift operators on objects. -/// shiftExpression: -/// additiveExpression (shiftOperator additiveExpression)* | -/// super (shiftOperator additiveExpression)+ -/// ; -/// shiftOperator: -/// '<<' | -/// '>>' | -/// '>>>' -/// ; -/// A shift expression is either an additive expression, or an invocation -/// of a shift operator on either super or an expression e1, with argument e2. -/// @description Checks that two shift operators >> can't be placed -/// one after another in a shift expression. -/// @author msyabro - - -main() { - 2 >> >> 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Shift expressions invoke the shift operators on objects. +/// shiftExpression: +/// additiveExpression (shiftOperator additiveExpression)* | +/// super (shiftOperator additiveExpression)+ +/// ; +/// shiftOperator: +/// '<<' | +/// '>>' | +/// '>>>' +/// ; +/// A shift expression is either an additive expression, or an invocation +/// of a shift operator on either super or an expression e1, with argument e2. +/// @description Checks that two shift operators >> can't be placed +/// one after another in a shift expression. +/// @author msyabro + + +main() { + 2 >> >> 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Shift/syntax_t08.dart b/Language/Expressions/Shift/syntax_t08.dart index 676f90a240..0ec0788d1f 100644 --- a/Language/Expressions/Shift/syntax_t08.dart +++ b/Language/Expressions/Shift/syntax_t08.dart @@ -1,36 +1,36 @@ -// 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 Shift expressions invoke the shift operators on objects. -/// shiftExpression: -/// additiveExpression (shiftOperator additiveExpression)* | -/// super (shiftOperator additiveExpression)+ -/// ; -/// shiftOperator: -/// '<<' | -/// '>>' | -/// '>>>' -/// ; -/// A shift expression is either an additive expression, or an invocation -/// of a shift operator on either super or an expression e1, with argument e2. -/// @description Checks that [super] can be used only as the first operand in -/// a shift expression. -/// @author msyabro - - -class S {} - -class A extends S { - test() { - 1 << super; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } -} - -main() { - A a = new A(); - a.test(); -} +// 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 Shift expressions invoke the shift operators on objects. +/// shiftExpression: +/// additiveExpression (shiftOperator additiveExpression)* | +/// super (shiftOperator additiveExpression)+ +/// ; +/// shiftOperator: +/// '<<' | +/// '>>' | +/// '>>>' +/// ; +/// A shift expression is either an additive expression, or an invocation +/// of a shift operator on either super or an expression e1, with argument e2. +/// @description Checks that [super] can be used only as the first operand in +/// a shift expression. +/// @author msyabro + + +class S {} + +class A extends S { + test() { + 1 << super; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + A a = new A(); + a.test(); +} diff --git a/Language/Expressions/Strings/String_Interpolation/syntax_t02.dart b/Language/Expressions/Strings/String_Interpolation/syntax_t02.dart index 2dad59ac9f..aef8c83443 100644 --- a/Language/Expressions/Strings/String_Interpolation/syntax_t02.dart +++ b/Language/Expressions/Strings/String_Interpolation/syntax_t02.dart @@ -1,24 +1,24 @@ -// 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 It is possible to embed expressions within non-raw string -/// literals, such that these expressions are evaluated, and the resulting -/// values are converted into strings and concatenated with the enclosing -/// string. This process is known as string interpolation. -/// stringInterpolation: -/// '$' IDENTIFIER_NO_DOLLAR | -/// '$' '{' expression '}' -/// ; -/// @description Checks that it is a compile-time error when the expression in -/// string interpolation construct is invalid (an anonymous function expression -/// missing the semicolon at the end of its body). -/// @author msyabro - - -main() { - '${() {return 1}}'; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is possible to embed expressions within non-raw string +/// literals, such that these expressions are evaluated, and the resulting +/// values are converted into strings and concatenated with the enclosing +/// string. This process is known as string interpolation. +/// stringInterpolation: +/// '$' IDENTIFIER_NO_DOLLAR | +/// '$' '{' expression '}' +/// ; +/// @description Checks that it is a compile-time error when the expression in +/// string interpolation construct is invalid (an anonymous function expression +/// missing the semicolon at the end of its body). +/// @author msyabro + + +main() { + '${() {return 1}}'; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/String_Interpolation/syntax_t03.dart b/Language/Expressions/Strings/String_Interpolation/syntax_t03.dart index a8749f161a..39cef6bf38 100644 --- a/Language/Expressions/Strings/String_Interpolation/syntax_t03.dart +++ b/Language/Expressions/Strings/String_Interpolation/syntax_t03.dart @@ -1,26 +1,26 @@ -// 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 It is possible to embed expressions within non-raw string -/// literals, such that these expressions are evaluated, and the resulting -/// values are converted into strings and concatenated with the enclosing -/// string. This process is known as string interpolation. -/// stringInterpolation: -/// '$' IDENTIFIER_NO_DOLLAR | -/// '$' '{' expression '}' -/// ; -/// @description Checks that it is a compile-time error when the identifier in -/// string interpolation construct of the form '$' IDENTIFIER_NO_DOLLAR contains -/// the dollar character that is not a beginning of another string interpolation -/// construct. -/// @author msyabro - - -main() { - var x$ = "dollar"; - '$x$'; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is possible to embed expressions within non-raw string +/// literals, such that these expressions are evaluated, and the resulting +/// values are converted into strings and concatenated with the enclosing +/// string. This process is known as string interpolation. +/// stringInterpolation: +/// '$' IDENTIFIER_NO_DOLLAR | +/// '$' '{' expression '}' +/// ; +/// @description Checks that it is a compile-time error when the identifier in +/// string interpolation construct of the form '$' IDENTIFIER_NO_DOLLAR contains +/// the dollar character that is not a beginning of another string interpolation +/// construct. +/// @author msyabro + + +main() { + var x$ = "dollar"; + '$x$'; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/String_Interpolation/syntax_t05.dart b/Language/Expressions/Strings/String_Interpolation/syntax_t05.dart index daa5f3f566..97710f55f8 100644 --- a/Language/Expressions/Strings/String_Interpolation/syntax_t05.dart +++ b/Language/Expressions/Strings/String_Interpolation/syntax_t05.dart @@ -1,23 +1,23 @@ -// 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 It is possible to embed expressions within non-raw string -/// literals, such that these expressions are evaluated, and the resulting -/// values are converted into strings and concatenated with the enclosing -/// string. This process is known as string interpolation. -/// stringInterpolation: -/// '$' IDENTIFIER_NO_DOLLAR | -/// '$' '{' expression '}' -/// ; -/// @description Checks that there is no compile-time error if the identifier in -/// a string interpolation construct is the name of a type alias (see Identifier -/// Reference). -/// @author kaigorodov - - -typedef int fun(); - -main() { - '$fun'; -} +// 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 It is possible to embed expressions within non-raw string +/// literals, such that these expressions are evaluated, and the resulting +/// values are converted into strings and concatenated with the enclosing +/// string. This process is known as string interpolation. +/// stringInterpolation: +/// '$' IDENTIFIER_NO_DOLLAR | +/// '$' '{' expression '}' +/// ; +/// @description Checks that there is no compile-time error if the identifier in +/// a string interpolation construct is the name of a type alias (see Identifier +/// Reference). +/// @author kaigorodov + + +typedef int fun(); + +main() { + '$fun'; +} diff --git a/Language/Expressions/Strings/String_Interpolation/syntax_t08.dart b/Language/Expressions/Strings/String_Interpolation/syntax_t08.dart index 1116fba066..788841dd69 100644 --- a/Language/Expressions/Strings/String_Interpolation/syntax_t08.dart +++ b/Language/Expressions/Strings/String_Interpolation/syntax_t08.dart @@ -1,30 +1,30 @@ -// 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 It is possible to embed expressions within non-raw string -/// literals, such that these expressions are evaluated, and the resulting -/// values are converted into strings and concatenated with the enclosing -/// string. This process is known as string interpolation. -/// stringInterpolation: -/// '$' IDENTIFIER_NO_DOLLAR | -/// '$' '{' expression '}' -/// ; -/// @description Checks that it is a compile-time error if a string -/// interpolation construct does not have the closing brace. -/// @author msyabro - - -main() { -// ^ -// [cfe] unspecified - "${1"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} -//^ -// [analyzer] unspecified -// [error line 30, column 0] -// [analyzer] unspecified +// 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 It is possible to embed expressions within non-raw string +/// literals, such that these expressions are evaluated, and the resulting +/// values are converted into strings and concatenated with the enclosing +/// string. This process is known as string interpolation. +/// stringInterpolation: +/// '$' IDENTIFIER_NO_DOLLAR | +/// '$' '{' expression '}' +/// ; +/// @description Checks that it is a compile-time error if a string +/// interpolation construct does not have the closing brace. +/// @author msyabro + + +main() { +// ^ +// [cfe] unspecified + "${1"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} +//^ +// [analyzer] unspecified +// [error line 30, column 0] +// [analyzer] unspecified // [cfe] unspecified \ No newline at end of file diff --git a/Language/Expressions/Strings/String_Interpolation/syntax_t09.dart b/Language/Expressions/Strings/String_Interpolation/syntax_t09.dart index 0ce36c4013..d79bde843e 100644 --- a/Language/Expressions/Strings/String_Interpolation/syntax_t09.dart +++ b/Language/Expressions/Strings/String_Interpolation/syntax_t09.dart @@ -1,24 +1,24 @@ -// 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 It is possible to embed expressions within non-raw string -/// literals, such that these expressions are evaluated, and the resulting -/// values are converted into strings and concatenated with the enclosing -/// string. This process is known as string interpolation. -/// stringInterpolation: -/// '$' IDENTIFIER_NO_DOLLAR | -/// '$' '{' expression '}' -/// ; -/// @description Checks that it is a compile-time error if a string -/// interpolation construct does not start with IDENTIFIER_NO_DOLLAR or opening -/// brace. -/// @author msyabro - - -main() { - "$1}"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is possible to embed expressions within non-raw string +/// literals, such that these expressions are evaluated, and the resulting +/// values are converted into strings and concatenated with the enclosing +/// string. This process is known as string interpolation. +/// stringInterpolation: +/// '$' IDENTIFIER_NO_DOLLAR | +/// '$' '{' expression '}' +/// ; +/// @description Checks that it is a compile-time error if a string +/// interpolation construct does not start with IDENTIFIER_NO_DOLLAR or opening +/// brace. +/// @author msyabro + + +main() { + "$1}"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/String_Interpolation/syntax_t10.dart b/Language/Expressions/Strings/String_Interpolation/syntax_t10.dart index 65aaf6030d..e665b85aa3 100644 --- a/Language/Expressions/Strings/String_Interpolation/syntax_t10.dart +++ b/Language/Expressions/Strings/String_Interpolation/syntax_t10.dart @@ -1,24 +1,24 @@ -// 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 It is possible to embed expressions within non-raw string -/// literals, such that these expressions are evaluated, and the resulting -/// values are converted into strings and concatenated with the enclosing -/// string. This process is known as string interpolation. -/// stringInterpolation: -/// '$' IDENTIFIER_NO_DOLLAR | -/// '$' '{' expression '}' -/// ; -/// @description Checks that it is a compile-time error if a string -/// interpolation construct contains a statement (variable declaration) instead -/// of an expression. -/// @author msyabro - - -main() { - "${var x = 1}"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is possible to embed expressions within non-raw string +/// literals, such that these expressions are evaluated, and the resulting +/// values are converted into strings and concatenated with the enclosing +/// string. This process is known as string interpolation. +/// stringInterpolation: +/// '$' IDENTIFIER_NO_DOLLAR | +/// '$' '{' expression '}' +/// ; +/// @description Checks that it is a compile-time error if a string +/// interpolation construct contains a statement (variable declaration) instead +/// of an expression. +/// @author msyabro + + +main() { + "${var x = 1}"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/String_Interpolation/syntax_t11.dart b/Language/Expressions/Strings/String_Interpolation/syntax_t11.dart index bf1d7208a7..e4888f1500 100644 --- a/Language/Expressions/Strings/String_Interpolation/syntax_t11.dart +++ b/Language/Expressions/Strings/String_Interpolation/syntax_t11.dart @@ -1,24 +1,24 @@ -// 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 It is possible to embed expressions within non-raw string -/// literals, such that these expressions are evaluated, and the resulting -/// values are converted into strings and concatenated with the enclosing -/// string. This process is known as string interpolation. -/// stringInterpolation: -/// '$' IDENTIFIER_NO_DOLLAR | -/// '$' '{' expression '}' -/// ; -/// @description Checks that it is a compile-time error if the identifier in a -/// string interpolation construct (without the curly braces) is invalid -/// (contains prohibited characters). -/// @author msyabro - - -main() { - "$#x"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is possible to embed expressions within non-raw string +/// literals, such that these expressions are evaluated, and the resulting +/// values are converted into strings and concatenated with the enclosing +/// string. This process is known as string interpolation. +/// stringInterpolation: +/// '$' IDENTIFIER_NO_DOLLAR | +/// '$' '{' expression '}' +/// ; +/// @description Checks that it is a compile-time error if the identifier in a +/// string interpolation construct (without the curly braces) is invalid +/// (contains prohibited characters). +/// @author msyabro + + +main() { + "$#x"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/String_Interpolation/syntax_t14.dart b/Language/Expressions/Strings/String_Interpolation/syntax_t14.dart index 2308e81610..d20d113c5d 100644 --- a/Language/Expressions/Strings/String_Interpolation/syntax_t14.dart +++ b/Language/Expressions/Strings/String_Interpolation/syntax_t14.dart @@ -1,26 +1,26 @@ -// 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 It is possible to embed expressions within non-raw string -/// literals, such that these expressions are evaluated, and the resulting -/// values are converted into strings and concatenated with the enclosing -/// string. This process is known as string interpolation. -/// stringInterpolation: -/// '$' IDENTIFIER_NO_DOLLAR | -/// '$' '{' expression '}' -/// ; -/// @description Checks that it is a compile-time error when the identifier in -/// string interpolation construct of the form '$' IDENTIFIER_NO_DOLLAR starts -/// with the dollar character. -/// @author kaigorodov - - -main() { - var $x = "dollar"; - var x = "dollar"; - '$$x'; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is possible to embed expressions within non-raw string +/// literals, such that these expressions are evaluated, and the resulting +/// values are converted into strings and concatenated with the enclosing +/// string. This process is known as string interpolation. +/// stringInterpolation: +/// '$' IDENTIFIER_NO_DOLLAR | +/// '$' '{' expression '}' +/// ; +/// @description Checks that it is a compile-time error when the identifier in +/// string interpolation construct of the form '$' IDENTIFIER_NO_DOLLAR starts +/// with the dollar character. +/// @author kaigorodov + + +main() { + var $x = "dollar"; + var x = "dollar"; + '$$x'; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/String_Interpolation/syntax_t15.dart b/Language/Expressions/Strings/String_Interpolation/syntax_t15.dart index b0ed728bdc..f2dadb7a82 100644 --- a/Language/Expressions/Strings/String_Interpolation/syntax_t15.dart +++ b/Language/Expressions/Strings/String_Interpolation/syntax_t15.dart @@ -1,24 +1,24 @@ -// 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 It is possible to embed expressions within non-raw string -/// literals, such that these expressions are evaluated, and the resulting -/// values are converted into strings and concatenated with the enclosing -/// string. This process is known as string interpolation. -/// stringInterpolation: -/// '$' IDENTIFIER_NO_DOLLAR | -/// '$' '{' expression '}' -/// ; -/// @description Checks that it is a compile-time error when an interpolation -/// construct is split between two adjacent string literals. -/// @author msyabro - - -main() { - var x = "dollar"; - '$' 'x'; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is possible to embed expressions within non-raw string +/// literals, such that these expressions are evaluated, and the resulting +/// values are converted into strings and concatenated with the enclosing +/// string. This process is known as string interpolation. +/// stringInterpolation: +/// '$' IDENTIFIER_NO_DOLLAR | +/// '$' '{' expression '}' +/// ; +/// @description Checks that it is a compile-time error when an interpolation +/// construct is split between two adjacent string literals. +/// @author msyabro + + +main() { + var x = "dollar"; + '$' 'x'; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/String_Interpolation/syntax_t16.dart b/Language/Expressions/Strings/String_Interpolation/syntax_t16.dart index 3eb9ac55cd..1d3a0c38ae 100644 --- a/Language/Expressions/Strings/String_Interpolation/syntax_t16.dart +++ b/Language/Expressions/Strings/String_Interpolation/syntax_t16.dart @@ -1,23 +1,23 @@ -// 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 It is possible to embed expressions within non-raw string -/// literals, such that these expressions are evaluated, and the resulting -/// values are converted into strings and concatenated with the enclosing -/// string. This process is known as string interpolation. -/// stringInterpolation: -/// '$' IDENTIFIER_NO_DOLLAR | -/// '$' '{' expression '}' -/// ; -/// @description Checks that it is a compile-time error when an interpolation is -/// separated between three adjacent string literals. -/// @author msyabro - - -main() { - '${1' '+' '1}'; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is possible to embed expressions within non-raw string +/// literals, such that these expressions are evaluated, and the resulting +/// values are converted into strings and concatenated with the enclosing +/// string. This process is known as string interpolation. +/// stringInterpolation: +/// '$' IDENTIFIER_NO_DOLLAR | +/// '$' '{' expression '}' +/// ; +/// @description Checks that it is a compile-time error when an interpolation is +/// separated between three adjacent string literals. +/// @author msyabro + + +main() { + '${1' '+' '1}'; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/escape_hexadecimal_digits_t01.dart b/Language/Expressions/Strings/escape_hexadecimal_digits_t01.dart index d8f7435f11..9cfd1575c0 100644 --- a/Language/Expressions/Strings/escape_hexadecimal_digits_t01.dart +++ b/Language/Expressions/Strings/escape_hexadecimal_digits_t01.dart @@ -1,19 +1,19 @@ -// 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 It is a compile-time error when a non-raw string literal contains -/// a character sequence of the form \x that is not followed by a sequence of -/// two hexadecimal digits. -/// @description Checks that it is a compile-time error if a string literal -/// contains a character sequence of the form \x that is followed only by one -/// hexadecimal digit. -/// @author msyabro - - -main() { - "\x1"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error when a non-raw string literal contains +/// a character sequence of the form \x that is not followed by a sequence of +/// two hexadecimal digits. +/// @description Checks that it is a compile-time error if a string literal +/// contains a character sequence of the form \x that is followed only by one +/// hexadecimal digit. +/// @author msyabro + + +main() { + "\x1"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/escape_hexadecimal_digits_t02.dart b/Language/Expressions/Strings/escape_hexadecimal_digits_t02.dart index 929ecc80af..43e0f67e83 100644 --- a/Language/Expressions/Strings/escape_hexadecimal_digits_t02.dart +++ b/Language/Expressions/Strings/escape_hexadecimal_digits_t02.dart @@ -1,19 +1,19 @@ -// 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 It is a compile-time error when a non-raw string literal contains -/// a character sequence of the form \x that is not followed by a sequence of -/// two hexadecimal digits. -/// @description Checks that it is a compile-time error if a string literal -/// contains a character sequence of the form \x that is followed by characters -/// that are not hexadecimal digits. -/// @author msyabro - - -main() { - "\xx"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error when a non-raw string literal contains +/// a character sequence of the form \x that is not followed by a sequence of +/// two hexadecimal digits. +/// @description Checks that it is a compile-time error if a string literal +/// contains a character sequence of the form \x that is followed by characters +/// that are not hexadecimal digits. +/// @author msyabro + + +main() { + "\xx"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/escape_hexadecimal_digits_t03.dart b/Language/Expressions/Strings/escape_hexadecimal_digits_t03.dart index 5dd758f354..e601031cb0 100644 --- a/Language/Expressions/Strings/escape_hexadecimal_digits_t03.dart +++ b/Language/Expressions/Strings/escape_hexadecimal_digits_t03.dart @@ -1,19 +1,19 @@ -// 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 It is a compile-time error when a non-raw string literal contains -/// a character sequence of the form \x that is not followed by a sequence of -/// two hexadecimal digits. -/// @description Checks that it is a compile-time error when a string literal -/// contains a character sequence of the form \x that is not followed by -/// anything. -/// @author msyabro - - -main() { - '\x'; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error when a non-raw string literal contains +/// a character sequence of the form \x that is not followed by a sequence of +/// two hexadecimal digits. +/// @description Checks that it is a compile-time error when a string literal +/// contains a character sequence of the form \x that is not followed by +/// anything. +/// @author msyabro + + +main() { + '\x'; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/escape_unicode_scalar_value_t02.dart b/Language/Expressions/Strings/escape_unicode_scalar_value_t02.dart index 5cb71f6d98..60b78d7d95 100644 --- a/Language/Expressions/Strings/escape_unicode_scalar_value_t02.dart +++ b/Language/Expressions/Strings/escape_unicode_scalar_value_t02.dart @@ -1,24 +1,24 @@ -// 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 Strings support escape sequences for special characters. The -/// escapes are: -/// . . . -/// • \u{HEX_DIGIT_SEQUENCE} is the unicode scalar value represented by the -/// HEX_DIGIT_SEQUENCE. It is a compile-time error when the value of the -/// HEX_DIGIT_SEQUENCE is not a valid unicode scalar value. -/// HEX_DIGIT_SEQUENCE: -/// HEX_DIGIT HEX_DIGIT? HEX_DIGIT? HEX_DIGIT? HEX_DIGIT? HEX_DIGIT? -/// ; -/// @description Checks that it is a compile-time error when the value -/// of the HEX_DIGIT_SEQUENCE is too long. -/// @author msyabro - - -main() { - '\u{121341}'; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Strings support escape sequences for special characters. The +/// escapes are: +/// . . . +/// • \u{HEX_DIGIT_SEQUENCE} is the unicode scalar value represented by the +/// HEX_DIGIT_SEQUENCE. It is a compile-time error when the value of the +/// HEX_DIGIT_SEQUENCE is not a valid unicode scalar value. +/// HEX_DIGIT_SEQUENCE: +/// HEX_DIGIT HEX_DIGIT? HEX_DIGIT? HEX_DIGIT? HEX_DIGIT? HEX_DIGIT? +/// ; +/// @description Checks that it is a compile-time error when the value +/// of the HEX_DIGIT_SEQUENCE is too long. +/// @author msyabro + + +main() { + '\u{121341}'; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/escape_unicode_scalar_value_t03.dart b/Language/Expressions/Strings/escape_unicode_scalar_value_t03.dart index 0c9717a23a..3a3f34e925 100644 --- a/Language/Expressions/Strings/escape_unicode_scalar_value_t03.dart +++ b/Language/Expressions/Strings/escape_unicode_scalar_value_t03.dart @@ -1,24 +1,24 @@ -// 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 Strings support escape sequences for special characters. The -/// escapes are: -/// . . . -/// • \u{HEX_DIGIT_SEQUENCE} is the unicode scalar value represented by the -/// HEX_DIGIT_SEQUENCE. It is a compile-time error when the value of the -/// HEX_DIGIT_SEQUENCE is not a valid unicode scalar value. -/// HEX_DIGIT_SEQUENCE: -/// HEX_DIGIT HEX_DIGIT? HEX_DIGIT? HEX_DIGIT? HEX_DIGIT? HEX_DIGIT? -/// ; -/// @description Checks that it is a compile-time error when the value -/// of the HEX_DIGIT_SEQUENCE contains other symbols than HEX_DIGIT. -/// @author msyabro - - -main() { - '\u{ffg}'; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Strings support escape sequences for special characters. The +/// escapes are: +/// . . . +/// • \u{HEX_DIGIT_SEQUENCE} is the unicode scalar value represented by the +/// HEX_DIGIT_SEQUENCE. It is a compile-time error when the value of the +/// HEX_DIGIT_SEQUENCE is not a valid unicode scalar value. +/// HEX_DIGIT_SEQUENCE: +/// HEX_DIGIT HEX_DIGIT? HEX_DIGIT? HEX_DIGIT? HEX_DIGIT? HEX_DIGIT? +/// ; +/// @description Checks that it is a compile-time error when the value +/// of the HEX_DIGIT_SEQUENCE contains other symbols than HEX_DIGIT. +/// @author msyabro + + +main() { + '\u{ffg}'; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/extend_or_implement_t01.dart b/Language/Expressions/Strings/extend_or_implement_t01.dart index c69d7381b8..dc41911050 100644 --- a/Language/Expressions/Strings/extend_or_implement_t01.dart +++ b/Language/Expressions/Strings/extend_or_implement_t01.dart @@ -1,19 +1,19 @@ -// 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 It is a compile-time error for a class to attempt to extend, -/// mix in or implement String. -/// @description Checks that it is a compile-time error for a class to attempt -/// to implement String. -/// @author msyabro - - -class C implements String {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - C(); -} +// 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 It is a compile-time error for a class to attempt to extend, +/// mix in or implement String. +/// @description Checks that it is a compile-time error for a class to attempt +/// to implement String. +/// @author msyabro + + +class C implements String {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + C(); +} diff --git a/Language/Expressions/Strings/extend_or_implement_t02.dart b/Language/Expressions/Strings/extend_or_implement_t02.dart index 70abc3026f..87985527dc 100644 --- a/Language/Expressions/Strings/extend_or_implement_t02.dart +++ b/Language/Expressions/Strings/extend_or_implement_t02.dart @@ -1,23 +1,23 @@ -// 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 It is a compile-time error for a class to attempt to extend, -/// mix in or implement String. -/// @description Checks that it is a compile-time error for an interface to -/// attempt to extend String. -/// @author msyabro - - -abstract class I extends String {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -class C implements I {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new C(); -} +// 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 It is a compile-time error for a class to attempt to extend, +/// mix in or implement String. +/// @description Checks that it is a compile-time error for an interface to +/// attempt to extend String. +/// @author msyabro + + +abstract class I extends String {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +class C implements I {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new C(); +} diff --git a/Language/Expressions/Strings/extend_or_implement_t03.dart b/Language/Expressions/Strings/extend_or_implement_t03.dart index 21232e1a31..46cda35577 100644 --- a/Language/Expressions/Strings/extend_or_implement_t03.dart +++ b/Language/Expressions/Strings/extend_or_implement_t03.dart @@ -1,19 +1,19 @@ -// Copyright (c) 2015, 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 It is a compile-time error for a class to attempt to extend, -/// mix in or implement String. -/// @description Checks that String cannot be mixed in -/// @author sgrekhov@unipro.ru - -class A {} - -class C extends A with String {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new C(); -} +// Copyright (c) 2015, 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 It is a compile-time error for a class to attempt to extend, +/// mix in or implement String. +/// @description Checks that String cannot be mixed in +/// @author sgrekhov@unipro.ru + +class A {} + +class C extends A with String {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new C(); +} diff --git a/Language/Expressions/Strings/extend_or_implement_t05.dart b/Language/Expressions/Strings/extend_or_implement_t05.dart index 2ce5103c12..4dbe01608e 100644 --- a/Language/Expressions/Strings/extend_or_implement_t05.dart +++ b/Language/Expressions/Strings/extend_or_implement_t05.dart @@ -1,19 +1,19 @@ -// Copyright (c) 2015, 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 It is a compile-time error for a class to attempt to extend, -/// mix in or implement String. -/// @description Checks that String cannot be mixed in. Test class C = M form -/// @author sgrekhov@unipro.ru - -class A {} - -class C = A with String; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new C(); -} +// Copyright (c) 2015, 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 It is a compile-time error for a class to attempt to extend, +/// mix in or implement String. +/// @description Checks that String cannot be mixed in. Test class C = M form +/// @author sgrekhov@unipro.ru + +class A {} + +class C = A with String; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new C(); +} diff --git a/Language/Expressions/Strings/multi_line_t11.dart b/Language/Expressions/Strings/multi_line_t11.dart index fb6cd7157f..bde5778f50 100644 --- a/Language/Expressions/Strings/multi_line_t11.dart +++ b/Language/Expressions/Strings/multi_line_t11.dart @@ -1,37 +1,37 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error when a multi-line -/// double-quotes string literal does not have the opening triplet. -/// @author msyabro - - -main() { -// ^ -// [cfe] unspecified -// [error line 36, column 0] -// [analyzer] unspecified -// [cfe] unspecified -// [error line 37, column 0] -// [analyzer] unspecified - incorrect string"""; +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error when a multi-line +/// double-quotes string literal does not have the opening triplet. +/// @author msyabro + + +main() { +// ^ +// [cfe] unspecified +// [error line 36, column 0] +// [analyzer] unspecified +// [cfe] unspecified +// [error line 37, column 0] +// [analyzer] unspecified + incorrect string"""; } \ No newline at end of file diff --git a/Language/Expressions/Strings/multi_line_t12.dart b/Language/Expressions/Strings/multi_line_t12.dart index 68c4f095a4..832812d0f4 100644 --- a/Language/Expressions/Strings/multi_line_t12.dart +++ b/Language/Expressions/Strings/multi_line_t12.dart @@ -1,37 +1,37 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error when a multi-line -/// single-quotes string literal does not have the opening triplet. -/// @author msyabro - - -main() { -// ^ -// [cfe] unspecified -// [error line 36, column 0] -// [analyzer] unspecified -// [cfe] unspecified -// [error line 37, column 0] -// [analyzer] unspecified - incorrect string'''; +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error when a multi-line +/// single-quotes string literal does not have the opening triplet. +/// @author msyabro + + +main() { +// ^ +// [cfe] unspecified +// [error line 36, column 0] +// [analyzer] unspecified +// [cfe] unspecified +// [error line 37, column 0] +// [analyzer] unspecified + incorrect string'''; } \ No newline at end of file diff --git a/Language/Expressions/Strings/multi_line_t13.dart b/Language/Expressions/Strings/multi_line_t13.dart index 64a5139bb0..013016e392 100644 --- a/Language/Expressions/Strings/multi_line_t13.dart +++ b/Language/Expressions/Strings/multi_line_t13.dart @@ -1,37 +1,37 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error when a multi-line -/// single-quotes string literal does not have the closing triplet. -/// @author msyabro - - -main() { -// ^ -// [cfe] unspecified -// [error line 36, column 0] -// [analyzer] unspecified -// [cfe] unspecified -// [error line 37, column 0] -// [analyzer] unspecified - '''incorrect string; +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error when a multi-line +/// single-quotes string literal does not have the closing triplet. +/// @author msyabro + + +main() { +// ^ +// [cfe] unspecified +// [error line 36, column 0] +// [analyzer] unspecified +// [cfe] unspecified +// [error line 37, column 0] +// [analyzer] unspecified + '''incorrect string; } \ No newline at end of file diff --git a/Language/Expressions/Strings/multi_line_t15.dart b/Language/Expressions/Strings/multi_line_t15.dart index 57bddad03b..143908bb9c 100644 --- a/Language/Expressions/Strings/multi_line_t15.dart +++ b/Language/Expressions/Strings/multi_line_t15.dart @@ -1,37 +1,37 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error when a raw multi-line -/// double-quotes string literal does not have the opening triplet. -/// @author msyabro - - -main() { -// ^ -// [cfe] unspecified -// [error line 36, column 0] -// [analyzer] unspecified -// [cfe] unspecified -// [error line 37, column 0] -// [analyzer] unspecified - r incorrect string"""; +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error when a raw multi-line +/// double-quotes string literal does not have the opening triplet. +/// @author msyabro + + +main() { +// ^ +// [cfe] unspecified +// [error line 36, column 0] +// [analyzer] unspecified +// [cfe] unspecified +// [error line 37, column 0] +// [analyzer] unspecified + r incorrect string"""; } \ No newline at end of file diff --git a/Language/Expressions/Strings/multi_line_t16.dart b/Language/Expressions/Strings/multi_line_t16.dart index 748eb582ca..55b8b841b3 100644 --- a/Language/Expressions/Strings/multi_line_t16.dart +++ b/Language/Expressions/Strings/multi_line_t16.dart @@ -1,37 +1,37 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error when a raw multi-line -/// single-quotes string literal does not have the opening triplet. -/// @author msyabro - - -main() { -// ^ -// [cfe] unspecified -// [error line 36, column 0] -// [analyzer] unspecified -// [cfe] unspecified -// [error line 37, column 0] -// [analyzer] unspecified - r incorrect string'''; +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error when a raw multi-line +/// single-quotes string literal does not have the opening triplet. +/// @author msyabro + + +main() { +// ^ +// [cfe] unspecified +// [error line 36, column 0] +// [analyzer] unspecified +// [cfe] unspecified +// [error line 37, column 0] +// [analyzer] unspecified + r incorrect string'''; } \ No newline at end of file diff --git a/Language/Expressions/Strings/multi_line_t17.dart b/Language/Expressions/Strings/multi_line_t17.dart index c185900bd6..055ccfa425 100644 --- a/Language/Expressions/Strings/multi_line_t17.dart +++ b/Language/Expressions/Strings/multi_line_t17.dart @@ -1,37 +1,37 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error when a raw multi-line -/// single-quotes string literal does not have the closing triplet. -/// @author msyabro - - -main() { -// ^ -// [cfe] unspecified -// [error line 36, column 0] -// [analyzer] unspecified -// [cfe] unspecified -// [error line 37, column 0] -// [analyzer] unspecified - r'''incorrect string; +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error when a raw multi-line +/// single-quotes string literal does not have the closing triplet. +/// @author msyabro + + +main() { +// ^ +// [cfe] unspecified +// [error line 36, column 0] +// [analyzer] unspecified +// [cfe] unspecified +// [error line 37, column 0] +// [analyzer] unspecified + r'''incorrect string; } \ No newline at end of file diff --git a/Language/Expressions/Strings/multi_line_t18.dart b/Language/Expressions/Strings/multi_line_t18.dart index 29b4a79bb7..6769add3eb 100644 --- a/Language/Expressions/Strings/multi_line_t18.dart +++ b/Language/Expressions/Strings/multi_line_t18.dart @@ -1,37 +1,37 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error when a multi-line -/// single-quotes string literal has fewer than 3 closing quotes. -/// @author rodionov - - -main() { -// ^ -// [cfe] unspecified -// [error line 36, column 0] -// [analyzer] unspecified -// [cfe] unspecified -// [error line 37, column 0] -// [analyzer] unspecified - '''foo''; +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error when a multi-line +/// single-quotes string literal has fewer than 3 closing quotes. +/// @author rodionov + + +main() { +// ^ +// [cfe] unspecified +// [error line 36, column 0] +// [analyzer] unspecified +// [cfe] unspecified +// [error line 37, column 0] +// [analyzer] unspecified + '''foo''; } \ No newline at end of file diff --git a/Language/Expressions/Strings/multi_line_t19.dart b/Language/Expressions/Strings/multi_line_t19.dart index fdcc4b9f16..13d207139b 100644 --- a/Language/Expressions/Strings/multi_line_t19.dart +++ b/Language/Expressions/Strings/multi_line_t19.dart @@ -1,37 +1,37 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error when a raw multi-line -/// single-quotes string literal has fewer than 3 closing quotes. -/// @author rodionov - - -main() { -// ^ -// [cfe] unspecified -// [error line 36, column 0] -// [analyzer] unspecified -// [cfe] unspecified -// [error line 37, column 0] -// [analyzer] unspecified - r'''foo''; +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error when a raw multi-line +/// single-quotes string literal has fewer than 3 closing quotes. +/// @author rodionov + + +main() { +// ^ +// [cfe] unspecified +// [error line 36, column 0] +// [analyzer] unspecified +// [cfe] unspecified +// [error line 37, column 0] +// [analyzer] unspecified + r'''foo''; } \ No newline at end of file diff --git a/Language/Expressions/Strings/multi_line_t20.dart b/Language/Expressions/Strings/multi_line_t20.dart index b7f01fcea0..2b790fa9d2 100644 --- a/Language/Expressions/Strings/multi_line_t20.dart +++ b/Language/Expressions/Strings/multi_line_t20.dart @@ -1,37 +1,37 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error when a multi-line -/// single-quotes string literal has fewer than 3 opening quotes. -/// @author rodionov - - -main() { -// ^ -// [cfe] unspecified -// [error line 36, column 0] -// [analyzer] unspecified -// [cfe] unspecified -// [error line 37, column 0] -// [analyzer] unspecified - ''foo'''; +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error when a multi-line +/// single-quotes string literal has fewer than 3 opening quotes. +/// @author rodionov + + +main() { +// ^ +// [cfe] unspecified +// [error line 36, column 0] +// [analyzer] unspecified +// [cfe] unspecified +// [error line 37, column 0] +// [analyzer] unspecified + ''foo'''; } \ No newline at end of file diff --git a/Language/Expressions/Strings/multi_line_t21.dart b/Language/Expressions/Strings/multi_line_t21.dart index 1228b8a83b..44e3f0261d 100644 --- a/Language/Expressions/Strings/multi_line_t21.dart +++ b/Language/Expressions/Strings/multi_line_t21.dart @@ -1,37 +1,37 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error when a raw multi-line -/// single-quotes string literal has fewer than 3 opening quotes. -/// @author rodionov - - -main() { -// ^ -// [cfe] unspecified -// [error line 36, column 0] -// [analyzer] unspecified -// [cfe] unspecified -// [error line 37, column 0] -// [analyzer] unspecified - r''foo'''; +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error when a raw multi-line +/// single-quotes string literal has fewer than 3 opening quotes. +/// @author rodionov + + +main() { +// ^ +// [cfe] unspecified +// [error line 36, column 0] +// [analyzer] unspecified +// [cfe] unspecified +// [error line 37, column 0] +// [analyzer] unspecified + r''foo'''; } \ No newline at end of file diff --git a/Language/Expressions/Strings/multi_line_t22.dart b/Language/Expressions/Strings/multi_line_t22.dart index 49ddb2e622..b22cc51585 100644 --- a/Language/Expressions/Strings/multi_line_t22.dart +++ b/Language/Expressions/Strings/multi_line_t22.dart @@ -1,37 +1,37 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error when a multi-line -/// double-quotes string literal has fewer than 3 closing quotes. -/// @author rodionov - - -main() { -// ^ -// [cfe] unspecified -// [error line 36, column 0] -// [analyzer] unspecified -// [cfe] unspecified -// [error line 37, column 0] -// [analyzer] unspecified - """foo""; +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error when a multi-line +/// double-quotes string literal has fewer than 3 closing quotes. +/// @author rodionov + + +main() { +// ^ +// [cfe] unspecified +// [error line 36, column 0] +// [analyzer] unspecified +// [cfe] unspecified +// [error line 37, column 0] +// [analyzer] unspecified + """foo""; } \ No newline at end of file diff --git a/Language/Expressions/Strings/multi_line_t23.dart b/Language/Expressions/Strings/multi_line_t23.dart index ad09c55f02..2a0f6fbab6 100644 --- a/Language/Expressions/Strings/multi_line_t23.dart +++ b/Language/Expressions/Strings/multi_line_t23.dart @@ -1,37 +1,37 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error when a raw multi-line -/// double-quotes string literal has fewer than 3 closing quotes. -/// @author rodionov - - -main() { -// ^ -// [cfe] unspecified -// [error line 36, column 0] -// [analyzer] unspecified -// [cfe] unspecified -// [error line 37, column 0] -// [analyzer] unspecified - r"""foo""; +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error when a raw multi-line +/// double-quotes string literal has fewer than 3 closing quotes. +/// @author rodionov + + +main() { +// ^ +// [cfe] unspecified +// [error line 36, column 0] +// [analyzer] unspecified +// [cfe] unspecified +// [error line 37, column 0] +// [analyzer] unspecified + r"""foo""; } \ No newline at end of file diff --git a/Language/Expressions/Strings/multi_line_t24.dart b/Language/Expressions/Strings/multi_line_t24.dart index 2680d9ef1b..6bd9266848 100644 --- a/Language/Expressions/Strings/multi_line_t24.dart +++ b/Language/Expressions/Strings/multi_line_t24.dart @@ -1,37 +1,37 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error when a multi-line -/// double-quotes string literal has fewer than 3 opening quotes. -/// @author rodionov - - -main() { -// ^ -// [cfe] unspecified -// [error line 36, column 0] -// [analyzer] unspecified -// [cfe] unspecified -// [error line 37, column 0] -// [analyzer] unspecified - ""foo"""; +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error when a multi-line +/// double-quotes string literal has fewer than 3 opening quotes. +/// @author rodionov + + +main() { +// ^ +// [cfe] unspecified +// [error line 36, column 0] +// [analyzer] unspecified +// [cfe] unspecified +// [error line 37, column 0] +// [analyzer] unspecified + ""foo"""; } \ No newline at end of file diff --git a/Language/Expressions/Strings/multi_line_t25.dart b/Language/Expressions/Strings/multi_line_t25.dart index f77b67de7f..30df1fcccc 100644 --- a/Language/Expressions/Strings/multi_line_t25.dart +++ b/Language/Expressions/Strings/multi_line_t25.dart @@ -1,37 +1,37 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error when a raw multi-line -/// double-quotes string literal has fewer than 3 opening quotes. -/// @author rodionov - - -main() { -// ^ -// [cfe] unspecified -// [error line 36, column 0] -// [analyzer] unspecified -// [cfe] unspecified -// [error line 37, column 0] -// [analyzer] unspecified - r""foo"""; +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error when a raw multi-line +/// double-quotes string literal has fewer than 3 opening quotes. +/// @author rodionov + + +main() { +// ^ +// [cfe] unspecified +// [error line 36, column 0] +// [analyzer] unspecified +// [cfe] unspecified +// [error line 37, column 0] +// [analyzer] unspecified + r""foo"""; } \ No newline at end of file diff --git a/Language/Expressions/Strings/multi_line_t26.dart b/Language/Expressions/Strings/multi_line_t26.dart index 4a3069f64f..473fcb9896 100644 --- a/Language/Expressions/Strings/multi_line_t26.dart +++ b/Language/Expressions/Strings/multi_line_t26.dart @@ -1,33 +1,33 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error if a multi-line -/// double-quoted string opens with one single quote. -/// @author msyabro - - -main() { - 's"""; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error if a multi-line +/// double-quoted string opens with one single quote. +/// @author msyabro + + +main() { + 's"""; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/multi_line_t27.dart b/Language/Expressions/Strings/multi_line_t27.dart index b1f0eb827d..cbc1b01631 100644 --- a/Language/Expressions/Strings/multi_line_t27.dart +++ b/Language/Expressions/Strings/multi_line_t27.dart @@ -1,33 +1,33 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error if a raw multi-line -/// double-quoted string opens with one single quote. -/// @author msyabro - - -main() { - r's"""; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error if a raw multi-line +/// double-quoted string opens with one single quote. +/// @author msyabro + + +main() { + r's"""; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/multi_line_t28.dart b/Language/Expressions/Strings/multi_line_t28.dart index b81913e6fc..a332ae05ac 100644 --- a/Language/Expressions/Strings/multi_line_t28.dart +++ b/Language/Expressions/Strings/multi_line_t28.dart @@ -1,37 +1,37 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error if a multi-line -/// double-quoted string closes with one single quote. -/// @author msyabro - - -main() { -// ^ -// [cfe] unspecified -// [error line 36, column 0] -// [analyzer] unspecified -// [cfe] unspecified -// [error line 37, column 0] -// [analyzer] unspecified - """s'; +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error if a multi-line +/// double-quoted string closes with one single quote. +/// @author msyabro + + +main() { +// ^ +// [cfe] unspecified +// [error line 36, column 0] +// [analyzer] unspecified +// [cfe] unspecified +// [error line 37, column 0] +// [analyzer] unspecified + """s'; } \ No newline at end of file diff --git a/Language/Expressions/Strings/multi_line_t29.dart b/Language/Expressions/Strings/multi_line_t29.dart index 5c2d0c4500..2584437955 100644 --- a/Language/Expressions/Strings/multi_line_t29.dart +++ b/Language/Expressions/Strings/multi_line_t29.dart @@ -1,37 +1,37 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error if a raw multi-line -/// double-quoted string closes with one single quote. -/// @author msyabro - - -main() { -// ^ -// [cfe] unspecified -// [error line 36, column 0] -// [analyzer] unspecified -// [cfe] unspecified -// [error line 37, column 0] -// [analyzer] unspecified - r"""s'; +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error if a raw multi-line +/// double-quoted string closes with one single quote. +/// @author msyabro + + +main() { +// ^ +// [cfe] unspecified +// [error line 36, column 0] +// [analyzer] unspecified +// [cfe] unspecified +// [error line 37, column 0] +// [analyzer] unspecified + r"""s'; } \ No newline at end of file diff --git a/Language/Expressions/Strings/multi_line_t30.dart b/Language/Expressions/Strings/multi_line_t30.dart index 2e1d0d5581..f1a0dd5e49 100644 --- a/Language/Expressions/Strings/multi_line_t30.dart +++ b/Language/Expressions/Strings/multi_line_t30.dart @@ -1,33 +1,33 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error if a multi-line -/// single-quoted string opens with one double quote. -/// @author msyabro - - -main() { - "s'''; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error if a multi-line +/// single-quoted string opens with one double quote. +/// @author msyabro + + +main() { + "s'''; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/multi_line_t31.dart b/Language/Expressions/Strings/multi_line_t31.dart index 9179eaf723..e50d81d4d9 100644 --- a/Language/Expressions/Strings/multi_line_t31.dart +++ b/Language/Expressions/Strings/multi_line_t31.dart @@ -1,33 +1,33 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error if a raw multi-line -/// single-quoted string opens with one double quote. -/// @author msyabro - - -main() { - r"s'''; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error if a raw multi-line +/// single-quoted string opens with one double quote. +/// @author msyabro + + +main() { + r"s'''; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/multi_line_t32.dart b/Language/Expressions/Strings/multi_line_t32.dart index ca663177da..bc03c4fff7 100644 --- a/Language/Expressions/Strings/multi_line_t32.dart +++ b/Language/Expressions/Strings/multi_line_t32.dart @@ -1,37 +1,37 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error if a multi-line -/// single-quoted string closes with one double quote. -/// @author msyabro - - -main() { -// ^ -// [cfe] unspecified -// [error line 36, column 0] -// [analyzer] unspecified -// [cfe] unspecified -// [error line 37, column 0] -// [analyzer] unspecified - '''s"; +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error if a multi-line +/// single-quoted string closes with one double quote. +/// @author msyabro + + +main() { +// ^ +// [cfe] unspecified +// [error line 36, column 0] +// [analyzer] unspecified +// [cfe] unspecified +// [error line 37, column 0] +// [analyzer] unspecified + '''s"; } \ No newline at end of file diff --git a/Language/Expressions/Strings/multi_line_t33.dart b/Language/Expressions/Strings/multi_line_t33.dart index f64ba3cb65..ea55ad6c24 100644 --- a/Language/Expressions/Strings/multi_line_t33.dart +++ b/Language/Expressions/Strings/multi_line_t33.dart @@ -1,37 +1,37 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// multilineString: -/// '"""' stringContentTDQ* '"""' | -/// ''''' stringContentTSQ* ''''' | -/// '"""' (~ '"""')* '"""' | -/// ''''' (~ ''''')* ''''' -/// ; -/// stringContentTDQ: -/// ~( '\' | '"""' | '$') | -/// stringInterpolation -/// ; -/// stringContenTSQ: -/// ~( '\' | ''''' | '$') | -/// stringInterpolation -/// ; -/// @description Checks that it is a compile-time error if a raw multi-line -/// single-quoted string closes with one double quote. -/// @author msyabro - - -main() { -// ^ -// [cfe] unspecified -// [error line 36, column 0] -// [analyzer] unspecified -// [cfe] unspecified -// [error line 37, column 0] -// [analyzer] unspecified - r'''s"; +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// multilineString: +/// '"""' stringContentTDQ* '"""' | +/// ''''' stringContentTSQ* ''''' | +/// '"""' (~ '"""')* '"""' | +/// ''''' (~ ''''')* ''''' +/// ; +/// stringContentTDQ: +/// ~( '\' | '"""' | '$') | +/// stringInterpolation +/// ; +/// stringContenTSQ: +/// ~( '\' | ''''' | '$') | +/// stringInterpolation +/// ; +/// @description Checks that it is a compile-time error if a raw multi-line +/// single-quoted string closes with one double quote. +/// @author msyabro + + +main() { +// ^ +// [cfe] unspecified +// [error line 36, column 0] +// [analyzer] unspecified +// [cfe] unspecified +// [error line 37, column 0] +// [analyzer] unspecified + r'''s"; } \ No newline at end of file diff --git a/Language/Expressions/Strings/string_literal_t04.dart b/Language/Expressions/Strings/string_literal_t04.dart index 591b617251..3c90d6255f 100644 --- a/Language/Expressions/Strings/string_literal_t04.dart +++ b/Language/Expressions/Strings/string_literal_t04.dart @@ -1,40 +1,40 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that it is a compile-time error when a backslash -/// character is not followed by another character in a single-line -/// double-quotes string literal that isn't raw. -/// @author msyabro - - -main() { - "\"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that it is a compile-time error when a backslash +/// character is not followed by another character in a single-line +/// double-quotes string literal that isn't raw. +/// @author msyabro + + +main() { + "\"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t05.dart b/Language/Expressions/Strings/string_literal_t05.dart index 9c9d3ef761..5b683b2464 100644 --- a/Language/Expressions/Strings/string_literal_t05.dart +++ b/Language/Expressions/Strings/string_literal_t05.dart @@ -1,40 +1,40 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that it is a compile-time error when a backslash -/// character is not followed by another character in a single-line -/// single-quotes string literal that isn't raw. -/// @author msyabro - - -main() { - '\'; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that it is a compile-time error when a backslash +/// character is not followed by another character in a single-line +/// single-quotes string literal that isn't raw. +/// @author msyabro + + +main() { + '\'; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t10.dart b/Language/Expressions/Strings/string_literal_t10.dart index 38bff57e10..c39995c20e 100644 --- a/Language/Expressions/Strings/string_literal_t10.dart +++ b/Language/Expressions/Strings/string_literal_t10.dart @@ -1,39 +1,39 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that a double-quotes string literal can't contain a -/// double quote character that is not escaped using a backslash character. -/// @author msyabro - - -main() { - "invalid " string"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that a double-quotes string literal can't contain a +/// double quote character that is not escaped using a backslash character. +/// @author msyabro + + +main() { + "invalid " string"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t11.dart b/Language/Expressions/Strings/string_literal_t11.dart index ee6d51c94f..2bf8dfb066 100644 --- a/Language/Expressions/Strings/string_literal_t11.dart +++ b/Language/Expressions/Strings/string_literal_t11.dart @@ -1,39 +1,39 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that a single-quotes string literal can't contain a -/// single quote character that is not escaped using a backslash character. -/// @author msyabro - - -main() { - 'invalid ' string'; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that a single-quotes string literal can't contain a +/// single quote character that is not escaped using a backslash character. +/// @author msyabro + + +main() { + 'invalid ' string'; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t12.dart b/Language/Expressions/Strings/string_literal_t12.dart index b4acf7800f..952e02a06d 100644 --- a/Language/Expressions/Strings/string_literal_t12.dart +++ b/Language/Expressions/Strings/string_literal_t12.dart @@ -1,39 +1,39 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that a string literal can't begin with a single quote -/// and end with double. -/// @author msyabro - - -main() { - 'string"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that a string literal can't begin with a single quote +/// and end with double. +/// @author msyabro + + +main() { + 'string"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t13.dart b/Language/Expressions/Strings/string_literal_t13.dart index d3261bf5d7..14db762276 100644 --- a/Language/Expressions/Strings/string_literal_t13.dart +++ b/Language/Expressions/Strings/string_literal_t13.dart @@ -1,39 +1,39 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that a string literal can't begin with a double quote -/// and end with single. -/// @author msyabro - - -main() { - "string'; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that a string literal can't begin with a double quote +/// and end with single. +/// @author msyabro + + +main() { + "string'; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t14.dart b/Language/Expressions/Strings/string_literal_t14.dart index 8086b8ebfe..8349ba830d 100644 --- a/Language/Expressions/Strings/string_literal_t14.dart +++ b/Language/Expressions/Strings/string_literal_t14.dart @@ -1,39 +1,39 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that it is a compile-time error when a double-quotes -/// string literal does not have the closing quote. -/// @author msyabro - - -main() { - "string; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that it is a compile-time error when a double-quotes +/// string literal does not have the closing quote. +/// @author msyabro + + +main() { + "string; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t15.dart b/Language/Expressions/Strings/string_literal_t15.dart index 06f89e8115..89f610550e 100644 --- a/Language/Expressions/Strings/string_literal_t15.dart +++ b/Language/Expressions/Strings/string_literal_t15.dart @@ -1,39 +1,39 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that it is a compile-time error when a double-quotes -/// string literal does not have the opening quote. -/// @author msyabro - - -main() { - string"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that it is a compile-time error when a double-quotes +/// string literal does not have the opening quote. +/// @author msyabro + + +main() { + string"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t16.dart b/Language/Expressions/Strings/string_literal_t16.dart index c803be1bcb..fe4a70de42 100644 --- a/Language/Expressions/Strings/string_literal_t16.dart +++ b/Language/Expressions/Strings/string_literal_t16.dart @@ -1,39 +1,39 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that it is a compile-time error when a single-quotes -/// string literal does not have the opening quote. -/// @author msyabro - - -main() { - string'; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that it is a compile-time error when a single-quotes +/// string literal does not have the opening quote. +/// @author msyabro + + +main() { + string'; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t17.dart b/Language/Expressions/Strings/string_literal_t17.dart index 7154e59ac5..f89de4ce0d 100644 --- a/Language/Expressions/Strings/string_literal_t17.dart +++ b/Language/Expressions/Strings/string_literal_t17.dart @@ -1,39 +1,39 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that it is a compile-time error when a single-quotes -/// string literal does not have the closing quote. -/// @author msyabro - - -main() { - 'string; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that it is a compile-time error when a single-quotes +/// string literal does not have the closing quote. +/// @author msyabro + + +main() { + 'string; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t20.dart b/Language/Expressions/Strings/string_literal_t20.dart index f69d725f70..47bfdad4cd 100644 --- a/Language/Expressions/Strings/string_literal_t20.dart +++ b/Language/Expressions/Strings/string_literal_t20.dart @@ -1,39 +1,39 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that a raw double-quotes string literal can't -/// contain another double quote. -/// @author msyabro - - -main() { - r"invalid " string"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that a raw double-quotes string literal can't +/// contain another double quote. +/// @author msyabro + + +main() { + r"invalid " string"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t21.dart b/Language/Expressions/Strings/string_literal_t21.dart index 6e4a894c8e..41639e1391 100644 --- a/Language/Expressions/Strings/string_literal_t21.dart +++ b/Language/Expressions/Strings/string_literal_t21.dart @@ -1,39 +1,39 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that a raw single-quotes string can't -/// contain another single quote. -/// @author msyabro - - -main() { - r'invalid ' string'; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that a raw single-quotes string can't +/// contain another single quote. +/// @author msyabro + + +main() { + r'invalid ' string'; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t22.dart b/Language/Expressions/Strings/string_literal_t22.dart index 03b2212bf0..bb46c89c6f 100644 --- a/Language/Expressions/Strings/string_literal_t22.dart +++ b/Language/Expressions/Strings/string_literal_t22.dart @@ -1,39 +1,39 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that a raw string literal can't begin with a single -/// quote and end with double. -/// @author msyabro - - -main() { - r'string"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that a raw string literal can't begin with a single +/// quote and end with double. +/// @author msyabro + + +main() { + r'string"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t23.dart b/Language/Expressions/Strings/string_literal_t23.dart index 5bfc87dbbc..417855f066 100644 --- a/Language/Expressions/Strings/string_literal_t23.dart +++ b/Language/Expressions/Strings/string_literal_t23.dart @@ -1,39 +1,39 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that a raw string literal can't begin with a double -/// quote and end with single. -/// @author msyabro - - -main() { - r"string'; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that a raw string literal can't begin with a double +/// quote and end with single. +/// @author msyabro + + +main() { + r"string'; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t24.dart b/Language/Expressions/Strings/string_literal_t24.dart index 14a06d5ad7..f75726f1bb 100644 --- a/Language/Expressions/Strings/string_literal_t24.dart +++ b/Language/Expressions/Strings/string_literal_t24.dart @@ -1,39 +1,39 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that it is a compile-time error when a raw double-quotes -/// string literal does not have the closing quote. -/// @author msyabro - - -main() { - r"string; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that it is a compile-time error when a raw double-quotes +/// string literal does not have the closing quote. +/// @author msyabro + + +main() { + r"string; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t25.dart b/Language/Expressions/Strings/string_literal_t25.dart index 7a9f03f414..6520f9e0ea 100644 --- a/Language/Expressions/Strings/string_literal_t25.dart +++ b/Language/Expressions/Strings/string_literal_t25.dart @@ -1,39 +1,39 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that it is a compile-time error when a raw double-quotes -/// string literal does not have the opening quote. -/// @author msyabro - - -main() { - r string"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that it is a compile-time error when a raw double-quotes +/// string literal does not have the opening quote. +/// @author msyabro + + +main() { + r string"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t26.dart b/Language/Expressions/Strings/string_literal_t26.dart index 000b2b1a67..8ff6dcfd16 100644 --- a/Language/Expressions/Strings/string_literal_t26.dart +++ b/Language/Expressions/Strings/string_literal_t26.dart @@ -1,39 +1,39 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that it is a compile-time error when a raw single-quotes -/// string literal does not have the opening quote. -/// @author msyabro - - -main() { - r string'; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that it is a compile-time error when a raw single-quotes +/// string literal does not have the opening quote. +/// @author msyabro + + +main() { + r string'; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t27.dart b/Language/Expressions/Strings/string_literal_t27.dart index b002eea7d5..307b9ca975 100644 --- a/Language/Expressions/Strings/string_literal_t27.dart +++ b/Language/Expressions/Strings/string_literal_t27.dart @@ -1,39 +1,39 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that it is a compile-time error when a raw single-quotes -/// string literal does not have the closing quote. -/// @author msyabro - - -main() { - r'string; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that it is a compile-time error when a raw single-quotes +/// string literal does not have the closing quote. +/// @author msyabro + + +main() { + r'string; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t28.dart b/Language/Expressions/Strings/string_literal_t28.dart index 78a76e177c..722daf6635 100644 --- a/Language/Expressions/Strings/string_literal_t28.dart +++ b/Language/Expressions/Strings/string_literal_t28.dart @@ -1,39 +1,39 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that it is a compile-time error when a backtick -/// character is used as a string delimiter. -/// @author kaigorodov - - -main() { - `string`; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that it is a compile-time error when a backtick +/// character is used as a string delimiter. +/// @author kaigorodov + + +main() { + `string`; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t29.dart b/Language/Expressions/Strings/string_literal_t29.dart index 803a2f1f71..e1424409c4 100644 --- a/Language/Expressions/Strings/string_literal_t29.dart +++ b/Language/Expressions/Strings/string_literal_t29.dart @@ -1,39 +1,39 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that it is a compile-time error when a backtick -/// character is used as a raw string delimiter. -/// @author kaigorodov - - -main() { - r`string`; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that it is a compile-time error when a backtick +/// character is used as a raw string delimiter. +/// @author kaigorodov + + +main() { + r`string`; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t30.dart b/Language/Expressions/Strings/string_literal_t30.dart index cb1f420e34..ac64795230 100644 --- a/Language/Expressions/Strings/string_literal_t30.dart +++ b/Language/Expressions/Strings/string_literal_t30.dart @@ -1,43 +1,43 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that it is a compile-time error if a single-quoted -/// string contains \r. -/// @author msyabro - - -main() { - 'stri -// ^ -// [analyzer] unspecified -// [cfe] unspecified -ng'; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that it is a compile-time error if a single-quoted +/// string contains \r. +/// @author msyabro + + +main() { + 'stri +// ^ +// [analyzer] unspecified +// [cfe] unspecified +ng'; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t31.dart b/Language/Expressions/Strings/string_literal_t31.dart index 877e2f5a02..bc5823e667 100644 --- a/Language/Expressions/Strings/string_literal_t31.dart +++ b/Language/Expressions/Strings/string_literal_t31.dart @@ -1,43 +1,43 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that it is a compile-time error if a double-quoted -/// string contains \r. -/// @author msyabro - - -main() { - "stri -// ^ -// [analyzer] unspecified -// [cfe] unspecified -ng"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that it is a compile-time error if a double-quoted +/// string contains \r. +/// @author msyabro + + +main() { + "stri +// ^ +// [analyzer] unspecified +// [cfe] unspecified +ng"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t32.dart b/Language/Expressions/Strings/string_literal_t32.dart index cfdda1a470..817351a52d 100644 --- a/Language/Expressions/Strings/string_literal_t32.dart +++ b/Language/Expressions/Strings/string_literal_t32.dart @@ -1,43 +1,43 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that it is a compile-time error if a raw double-quoted -/// string contains \r. -/// @author msyabro - - -main() { - r"stri -// ^ -// [analyzer] unspecified -// [cfe] unspecified -g"; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that it is a compile-time error if a raw double-quoted +/// string contains \r. +/// @author msyabro + + +main() { + r"stri +// ^ +// [analyzer] unspecified +// [cfe] unspecified +g"; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/string_literal_t33.dart b/Language/Expressions/Strings/string_literal_t33.dart index 36d31b353e..1c1aed8de4 100644 --- a/Language/Expressions/Strings/string_literal_t33.dart +++ b/Language/Expressions/Strings/string_literal_t33.dart @@ -1,43 +1,43 @@ -// 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 -/// stringLiteral: -/// (multilineString | singleLineString)+ -/// ; -/// singleLineString: -/// '"' stringContentDQ* '"' | -/// ''' stringContentSQ* ''' | -/// 'r' ''' (~( ''' | NEWLINE ))* ''' | -/// 'r' '"' (~( '"' | NEWLINE ))* '"' -/// ; -/// stringContentDQ: -/// ~( '\' | '"' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// stringContentSQ: -/// ~( '\' | ''' | '$' | NEWLINE ) | -/// '\' ~( NEWLINE ) | -/// stringInterpolation -/// ; -/// NEWLINE: -/// '\n' | -/// '\r' -/// ; -/// @description Checks that it is a compile-time error if a raw single-quoted -/// string contains \r. -/// @author msyabro - - -main() { - r'stri -// ^ -// [analyzer] unspecified -// [cfe] unspecified -g'; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 +/// stringLiteral: +/// (multilineString | singleLineString)+ +/// ; +/// singleLineString: +/// '"' stringContentDQ* '"' | +/// ''' stringContentSQ* ''' | +/// 'r' ''' (~( ''' | NEWLINE ))* ''' | +/// 'r' '"' (~( '"' | NEWLINE ))* '"' +/// ; +/// stringContentDQ: +/// ~( '\' | '"' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// stringContentSQ: +/// ~( '\' | ''' | '$' | NEWLINE ) | +/// '\' ~( NEWLINE ) | +/// stringInterpolation +/// ; +/// NEWLINE: +/// '\n' | +/// '\r' +/// ; +/// @description Checks that it is a compile-time error if a raw single-quoted +/// string contains \r. +/// @author msyabro + + +main() { + r'stri +// ^ +// [analyzer] unspecified +// [cfe] unspecified +g'; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/u_four_hex_digits_t01.dart b/Language/Expressions/Strings/u_four_hex_digits_t01.dart index 2e5822e480..86cacf7ffd 100644 --- a/Language/Expressions/Strings/u_four_hex_digits_t01.dart +++ b/Language/Expressions/Strings/u_four_hex_digits_t01.dart @@ -1,20 +1,20 @@ -// 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 It is a compile-time error when a non-raw string literal contains -/// a character sequence of the form \u that is not followed by either a -/// sequence of four hexadecimal digits, or by curly brace delimited sequence of -/// hexadecimal digits. -/// @description Checks that it is a compile-time error when a string literal -/// contains a character sequence of the form \u that is followed by a character -/// that isn't a hexadecimal digit. -/// @author msyabro - - -main() { - 'some text\umore text'; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error when a non-raw string literal contains +/// a character sequence of the form \u that is not followed by either a +/// sequence of four hexadecimal digits, or by curly brace delimited sequence of +/// hexadecimal digits. +/// @description Checks that it is a compile-time error when a string literal +/// contains a character sequence of the form \u that is followed by a character +/// that isn't a hexadecimal digit. +/// @author msyabro + + +main() { + 'some text\umore text'; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/u_four_hex_digits_t02.dart b/Language/Expressions/Strings/u_four_hex_digits_t02.dart index 8c926346a1..657f81d110 100644 --- a/Language/Expressions/Strings/u_four_hex_digits_t02.dart +++ b/Language/Expressions/Strings/u_four_hex_digits_t02.dart @@ -1,20 +1,20 @@ -// 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 It is a compile-time error when a non-raw string literal contains -/// a character sequence of the form \u that is not followed by either a -/// sequence of four hexadecimal digits, or by curly brace delimited sequence of -/// hexadecimal digits. -/// @description Checks that it is a compile-time error when a string literal -/// contains a character sequence of the form \u that is followed by just 2 -/// hexadecimal digits. -/// @author msyabro - - -main() { - "\u1a"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error when a non-raw string literal contains +/// a character sequence of the form \u that is not followed by either a +/// sequence of four hexadecimal digits, or by curly brace delimited sequence of +/// hexadecimal digits. +/// @description Checks that it is a compile-time error when a string literal +/// contains a character sequence of the form \u that is followed by just 2 +/// hexadecimal digits. +/// @author msyabro + + +main() { + "\u1a"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/u_four_hex_digits_t03.dart b/Language/Expressions/Strings/u_four_hex_digits_t03.dart index 3eb928986b..c5be5e20b9 100644 --- a/Language/Expressions/Strings/u_four_hex_digits_t03.dart +++ b/Language/Expressions/Strings/u_four_hex_digits_t03.dart @@ -1,20 +1,20 @@ -// 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 It is a compile-time error when a non-raw string literal contains -/// a character sequence of the form \u that is not followed by either a -/// sequence of four hexadecimal digits, or by curly brace delimited sequence of -/// hexadecimal digits. -/// @description Checks that it is a compile-time error when a string literal -/// contains a character sequence of the form \u that is not followed by -/// anything. -/// @author msyabro - - -main() { - "just \u"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error when a non-raw string literal contains +/// a character sequence of the form \u that is not followed by either a +/// sequence of four hexadecimal digits, or by curly brace delimited sequence of +/// hexadecimal digits. +/// @description Checks that it is a compile-time error when a string literal +/// contains a character sequence of the form \u that is not followed by +/// anything. +/// @author msyabro + + +main() { + "just \u"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Strings/u_four_hex_digits_t04.dart b/Language/Expressions/Strings/u_four_hex_digits_t04.dart index e1078261f2..88068322c6 100644 --- a/Language/Expressions/Strings/u_four_hex_digits_t04.dart +++ b/Language/Expressions/Strings/u_four_hex_digits_t04.dart @@ -1,20 +1,20 @@ -// 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 It is a compile-time error when a non-raw string literal contains -/// a character sequence of the form \u that is not followed by either a -/// sequence of four hexadecimal digits, or by curly brace delimited sequence of -/// hexadecimal digits. -/// @description Checks that it is a compile-time error when a string literal -/// contains a character sequence of the form \u that is followed empty curly -/// braces. -/// @author msyabro - - -main() { - "empty \u{}"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error when a non-raw string literal contains +/// a character sequence of the form \u that is not followed by either a +/// sequence of four hexadecimal digits, or by curly brace delimited sequence of +/// hexadecimal digits. +/// @description Checks that it is a compile-time error when a string literal +/// contains a character sequence of the form \u that is followed empty curly +/// braces. +/// @author msyabro + + +main() { + "empty \u{}"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/This/definition_t01.dart b/Language/Expressions/This/definition_t01.dart index d3e56b8486..2d959c336f 100644 --- a/Language/Expressions/This/definition_t01.dart +++ b/Language/Expressions/This/definition_t01.dart @@ -1,20 +1,20 @@ -// 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 The reserved word this denotes the target of the current instance -/// member invocation. -/// thisExpression: -/// this -/// ; -/// @description Checks that word 'this' cannot be used to declare a variable. -/// @author hlodvig -/// @reviewer kaigorodov - - -main() { - var this; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The reserved word this denotes the target of the current instance +/// member invocation. +/// thisExpression: +/// this +/// ; +/// @description Checks that word 'this' cannot be used to declare a variable. +/// @author hlodvig +/// @reviewer kaigorodov + + +main() { + var this; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/This/definition_t02.dart b/Language/Expressions/This/definition_t02.dart index 07c6418ad2..edeefb96a8 100644 --- a/Language/Expressions/This/definition_t02.dart +++ b/Language/Expressions/This/definition_t02.dart @@ -1,24 +1,24 @@ -// 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 The reserved word this denotes the target of the current instance -/// member invocation. -/// thisExpression: -/// this -/// ; -/// @description Checks that word 'this' cannot be used to declare a class. -/// @author hlodvig - - -class this {} -// ^^^^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new this(); -// ^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The reserved word this denotes the target of the current instance +/// member invocation. +/// thisExpression: +/// this +/// ; +/// @description Checks that word 'this' cannot be used to declare a class. +/// @author hlodvig + + +class this {} +// ^^^^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new this(); +// ^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/This/definition_t03.dart b/Language/Expressions/This/definition_t03.dart index f976eaf170..127ba9c224 100644 --- a/Language/Expressions/This/definition_t03.dart +++ b/Language/Expressions/This/definition_t03.dart @@ -1,27 +1,27 @@ -// 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 The reserved word this denotes the target of the current instance -/// member invocation. -/// thisExpression: -/// this -/// ; -/// @description Checks that word 'this' cannot be used to declare an abstract -/// class. -/// @author hlodvig - - -abstract class this {} -// ^^^^ -// [analyzer] unspecified -// [cfe] unspecified - -class A implements this {} -// ^^^^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 The reserved word this denotes the target of the current instance +/// member invocation. +/// thisExpression: +/// this +/// ; +/// @description Checks that word 'this' cannot be used to declare an abstract +/// class. +/// @author hlodvig + + +abstract class this {} +// ^^^^ +// [analyzer] unspecified +// [cfe] unspecified + +class A implements this {} +// ^^^^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Expressions/This/definition_t04.dart b/Language/Expressions/This/definition_t04.dart index e5b39d841d..a6efc68e66 100644 --- a/Language/Expressions/This/definition_t04.dart +++ b/Language/Expressions/This/definition_t04.dart @@ -1,24 +1,24 @@ -// 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 The reserved word this denotes the target of the current instance -/// member invocation. -/// thisExpression: -/// this -/// ; -/// @description Checks that word 'this' cannot be used to declare a function. -/// @author hlodvig - - -void this() {} -// ^^^^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - this(); -//^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The reserved word this denotes the target of the current instance +/// member invocation. +/// thisExpression: +/// this +/// ; +/// @description Checks that word 'this' cannot be used to declare a function. +/// @author hlodvig + + +void this() {} +// ^^^^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + this(); +//^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/This/definition_t05.dart b/Language/Expressions/This/definition_t05.dart index 611cee9a95..fdddda11cf 100644 --- a/Language/Expressions/This/definition_t05.dart +++ b/Language/Expressions/This/definition_t05.dart @@ -1,19 +1,19 @@ -// 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 The reserved word this denotes the target of the current instance -/// member invocation. -/// thisExpression: -/// this -/// ; -/// @description Checks that word 'this' cannot be used in a non-instance context. -/// @author hlodvig - - -main() { - var x = this; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The reserved word this denotes the target of the current instance +/// member invocation. +/// thisExpression: +/// this +/// ; +/// @description Checks that word 'this' cannot be used in a non-instance context. +/// @author hlodvig + + +main() { + var x = this; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/This/placement_t01.dart b/Language/Expressions/This/placement_t01.dart index 60ceaa7373..4ef76929c8 100644 --- a/Language/Expressions/This/placement_t01.dart +++ b/Language/Expressions/This/placement_t01.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if this appears, implicitly or -/// explicitly, in a top-level function or variable initializer, in a factory -/// constructor, or in a static method or variable initializer, or in the -/// initializer of an instance variable. -/// @description Checks that it is a compile-error if 'this' appears in the body -/// of a top-level function. -/// @author msyabro - - -func(p1, p2) => this; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - func(1, 2); -} +// 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 It is a compile-time error if this appears, implicitly or +/// explicitly, in a top-level function or variable initializer, in a factory +/// constructor, or in a static method or variable initializer, or in the +/// initializer of an instance variable. +/// @description Checks that it is a compile-error if 'this' appears in the body +/// of a top-level function. +/// @author msyabro + + +func(p1, p2) => this; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + func(1, 2); +} diff --git a/Language/Expressions/This/placement_t02.dart b/Language/Expressions/This/placement_t02.dart index 1e7c7f266d..be53e0a6e5 100644 --- a/Language/Expressions/This/placement_t02.dart +++ b/Language/Expressions/This/placement_t02.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if this appears, implicitly or -/// explicitly, in a top-level function or variable initializer, in a factory -/// constructor, or in a static method or variable initializer, or in the -/// initializer of an instance variable. -/// @description Checks that it is a compile-error if 'this' appears in the -/// parameters list of a top-level function. -/// @author msyabro - - -func(this, p) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(func); -} +// 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 It is a compile-time error if this appears, implicitly or +/// explicitly, in a top-level function or variable initializer, in a factory +/// constructor, or in a static method or variable initializer, or in the +/// initializer of an instance variable. +/// @description Checks that it is a compile-error if 'this' appears in the +/// parameters list of a top-level function. +/// @author msyabro + + +func(this, p) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(func); +} diff --git a/Language/Expressions/This/placement_t03.dart b/Language/Expressions/This/placement_t03.dart index 5448bdfefc..574c9ce0af 100644 --- a/Language/Expressions/This/placement_t03.dart +++ b/Language/Expressions/This/placement_t03.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if this appears, implicitly or -/// explicitly, in a top-level function or variable initializer, in a factory -/// constructor, or in a static method or variable initializer, or in the -/// initializer of an instance variable. -/// @description Checks that it is a compile-error if 'this' appears in a -/// top-level variable initializer. -/// @author msyabro - - -var x = this; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(x); -} +// 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 It is a compile-time error if this appears, implicitly or +/// explicitly, in a top-level function or variable initializer, in a factory +/// constructor, or in a static method or variable initializer, or in the +/// initializer of an instance variable. +/// @description Checks that it is a compile-error if 'this' appears in a +/// top-level variable initializer. +/// @author msyabro + + +var x = this; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(x); +} diff --git a/Language/Expressions/This/placement_t04.dart b/Language/Expressions/This/placement_t04.dart index 4905906d92..291a818eaf 100644 --- a/Language/Expressions/This/placement_t04.dart +++ b/Language/Expressions/This/placement_t04.dart @@ -1,23 +1,23 @@ -// 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 It is a compile-time error if this appears, implicitly or -/// explicitly, in a top-level function or variable initializer, in a factory -/// constructor, or in a static method or variable initializer, or in the -/// initializer of an instance variable. -/// @description Checks that it is a compile-error if 'this' appears in an -/// instance variable initializer. -/// @author msyabro - - -class C { - var x = this; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - print(new C().x); -} +// 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 It is a compile-time error if this appears, implicitly or +/// explicitly, in a top-level function or variable initializer, in a factory +/// constructor, or in a static method or variable initializer, or in the +/// initializer of an instance variable. +/// @description Checks that it is a compile-error if 'this' appears in an +/// instance variable initializer. +/// @author msyabro + + +class C { + var x = this; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + print(new C().x); +} diff --git a/Language/Expressions/This/placement_t05.dart b/Language/Expressions/This/placement_t05.dart index ea9576b61f..3569957ae8 100644 --- a/Language/Expressions/This/placement_t05.dart +++ b/Language/Expressions/This/placement_t05.dart @@ -1,23 +1,23 @@ -// 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 It is a compile-time error if this appears, implicitly or -/// explicitly, in a top-level function or variable initializer, in a factory -/// constructor, or in a static method or variable initializer, or in the -/// initializer of an instance variable. -/// @description Checks that it is a compile-error if 'this' appears in a static -/// variable initializer. -/// @author msyabro - - -class C { - static var x = this; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - print(C.x); -} +// 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 It is a compile-time error if this appears, implicitly or +/// explicitly, in a top-level function or variable initializer, in a factory +/// constructor, or in a static method or variable initializer, or in the +/// initializer of an instance variable. +/// @description Checks that it is a compile-error if 'this' appears in a static +/// variable initializer. +/// @author msyabro + + +class C { + static var x = this; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + print(C.x); +} diff --git a/Language/Expressions/This/placement_t06.dart b/Language/Expressions/This/placement_t06.dart index 841ab49ea3..bcd2afbd0e 100644 --- a/Language/Expressions/This/placement_t06.dart +++ b/Language/Expressions/This/placement_t06.dart @@ -1,23 +1,23 @@ -// 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 It is a compile-time error if this appears, implicitly or -/// explicitly, in a top-level function or variable initializer, in a factory -/// constructor, or in a static method or variable initializer, or in the -/// initializer of an instance variable. -/// @description Checks that it is a compile-error if 'this' appears in a static -/// method. -/// @author msyabro - - -class C { - static method() => this; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - print(C.method()); -} +// 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 It is a compile-time error if this appears, implicitly or +/// explicitly, in a top-level function or variable initializer, in a factory +/// constructor, or in a static method or variable initializer, or in the +/// initializer of an instance variable. +/// @description Checks that it is a compile-error if 'this' appears in a static +/// method. +/// @author msyabro + + +class C { + static method() => this; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + print(C.method()); +} diff --git a/Language/Expressions/This/placement_t07.dart b/Language/Expressions/This/placement_t07.dart index 1ead19ff85..1e2de96196 100644 --- a/Language/Expressions/This/placement_t07.dart +++ b/Language/Expressions/This/placement_t07.dart @@ -1,30 +1,30 @@ -// 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 It is a compile-time error if this appears, implicitly or -/// explicitly, in a top-level function or variable initializer, in a factory -/// constructor, or in a static method or variable initializer, or in the -/// initializer of an instance variable. -/// @description Checks that it is a compile-error if 'this' appears in a -/// factory constructor. -/// @author msyabro - - -class C { - factory C() { -// ^ -// [analyzer] unspecified -// [cfe] unspecified - x = this; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } - - var x; -} - -main() { - new C(); -} +// 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 It is a compile-time error if this appears, implicitly or +/// explicitly, in a top-level function or variable initializer, in a factory +/// constructor, or in a static method or variable initializer, or in the +/// initializer of an instance variable. +/// @description Checks that it is a compile-error if 'this' appears in a +/// factory constructor. +/// @author msyabro + + +class C { + factory C() { +// ^ +// [analyzer] unspecified +// [cfe] unspecified + x = this; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } + + var x; +} + +main() { + new C(); +} diff --git a/Language/Expressions/This/placement_t08.dart b/Language/Expressions/This/placement_t08.dart index c8329117ec..5e32010dfa 100644 --- a/Language/Expressions/This/placement_t08.dart +++ b/Language/Expressions/This/placement_t08.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if this appears, implicitly or -/// explicitly, in a top-level function or variable initializer, in a factory -/// constructor, or in a static method or variable initializer, or in the -/// initializer of an instance variable. -/// @description Checks that it is a compile-error if 'this' appears in a -/// top-level variable initializer. -/// @author kaigorodov - - -var x = this.a; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(x); -} +// 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 It is a compile-time error if this appears, implicitly or +/// explicitly, in a top-level function or variable initializer, in a factory +/// constructor, or in a static method or variable initializer, or in the +/// initializer of an instance variable. +/// @description Checks that it is a compile-error if 'this' appears in a +/// top-level variable initializer. +/// @author kaigorodov + + +var x = this.a; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(x); +} diff --git a/Language/Expressions/Throw/no_catch_clause_t05.dart b/Language/Expressions/Throw/no_catch_clause_t05.dart index cd8732e31d..821bc4c758 100644 --- a/Language/Expressions/Throw/no_catch_clause_t05.dart +++ b/Language/Expressions/Throw/no_catch_clause_t05.dart @@ -1,24 +1,24 @@ -// 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 The throw expression is used to raise an exception. -/// throwExpression: -/// throw expression -/// ; -/// throwExpressionWithoutCascade: -/// throw expressionWithoutCascade -/// ; -/// @description Checks that it is a compile-error if to use throw with no -/// expression in try statement. -/// @author vasya - - -main() { - try { - throw; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 The throw expression is used to raise an exception. +/// throwExpression: +/// throw expression +/// ; +/// throwExpressionWithoutCascade: +/// throw expressionWithoutCascade +/// ; +/// @description Checks that it is a compile-error if to use throw with no +/// expression in try statement. +/// @author vasya + + +main() { + try { + throw; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Type_Cast/syntax_t02.dart b/Language/Expressions/Type_Cast/syntax_t02.dart index 4ea3cdad48..9a3fd0ba7c 100644 --- a/Language/Expressions/Type_Cast/syntax_t02.dart +++ b/Language/Expressions/Type_Cast/syntax_t02.dart @@ -1,22 +1,22 @@ -// 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 The cast expression ensures that an object is a member of a type. -/// typeCast: -/// asOperator type -/// ; -/// asOperator: -/// as -/// ; -/// @description Checks that it is a compile-time error when the type cast -/// operator is missing the first argument. -/// @author rodionov - - -main() { - var x = (as int); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The cast expression ensures that an object is a member of a type. +/// typeCast: +/// asOperator type +/// ; +/// asOperator: +/// as +/// ; +/// @description Checks that it is a compile-time error when the type cast +/// operator is missing the first argument. +/// @author rodionov + + +main() { + var x = (as int); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Type_Cast/syntax_t03.dart b/Language/Expressions/Type_Cast/syntax_t03.dart index 2030f8bc6f..8b3450e0c5 100644 --- a/Language/Expressions/Type_Cast/syntax_t03.dart +++ b/Language/Expressions/Type_Cast/syntax_t03.dart @@ -1,22 +1,22 @@ -// 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 The cast expression ensures that an object is a member of a type. -/// typeCast: -/// asOperator type -/// ; -/// asOperator: -/// as -/// ; -/// @description Checks that it is a compile-time error when the type cast -/// operator is missing the second argument. -/// @author rodionov - - -main() { - 1 as; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The cast expression ensures that an object is a member of a type. +/// typeCast: +/// asOperator type +/// ; +/// asOperator: +/// as +/// ; +/// @description Checks that it is a compile-time error when the type cast +/// operator is missing the second argument. +/// @author rodionov + + +main() { + 1 as; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Type_Cast/syntax_t05.dart b/Language/Expressions/Type_Cast/syntax_t05.dart index c260ae7a94..89fcfc00b7 100644 --- a/Language/Expressions/Type_Cast/syntax_t05.dart +++ b/Language/Expressions/Type_Cast/syntax_t05.dart @@ -1,22 +1,22 @@ -// 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 The cast expression ensures that an object is a member of a type. -/// typeCast: -/// asOperator type -/// ; -/// asOperator: -/// as -/// ; -/// @description Checks that it is a compile-time error when the second argument -/// of a type cast operator is a shift expression rather than a type. -/// @author rodionov - - -main() { - 1 as 1 << 2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The cast expression ensures that an object is a member of a type. +/// typeCast: +/// asOperator type +/// ; +/// asOperator: +/// as +/// ; +/// @description Checks that it is a compile-time error when the second argument +/// of a type cast operator is a shift expression rather than a type. +/// @author rodionov + + +main() { + 1 as 1 << 2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Type_Cast/syntax_t06.dart b/Language/Expressions/Type_Cast/syntax_t06.dart index 330792a092..42269342a2 100644 --- a/Language/Expressions/Type_Cast/syntax_t06.dart +++ b/Language/Expressions/Type_Cast/syntax_t06.dart @@ -1,22 +1,22 @@ -// 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 The cast expression ensures that an object is a member of a type. -/// typeCast: -/// asOperator type -/// ; -/// asOperator: -/// as -/// ; -/// @description Checks that it is a compile-time error when the second argument -/// of a type cast operator is a function expression rather than a type. -/// @author rodionov - - -main() { - (int x) => 1 as (num x) => 2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The cast expression ensures that an object is a member of a type. +/// typeCast: +/// asOperator type +/// ; +/// asOperator: +/// as +/// ; +/// @description Checks that it is a compile-time error when the second argument +/// of a type cast operator is a function expression rather than a type. +/// @author rodionov + + +main() { + (int x) => 1 as (num x) => 2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Type_Test/syntax_t03.dart b/Language/Expressions/Type_Test/syntax_t03.dart index d584ee1f06..b9f2d7a409 100644 --- a/Language/Expressions/Type_Test/syntax_t03.dart +++ b/Language/Expressions/Type_Test/syntax_t03.dart @@ -1,21 +1,21 @@ -// 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 The is-expression tests if an object is a member of a type. -/// typeTest: -/// isOperator type -/// ; -/// isOperator: -/// is '!'? -/// ; -/// @description Checks that it is a compile-time error when using a value -/// literal in the right part of the expression. -/// @author msyabro - -main () { - 1 is 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The is-expression tests if an object is a member of a type. +/// typeTest: +/// isOperator type +/// ; +/// isOperator: +/// is '!'? +/// ; +/// @description Checks that it is a compile-time error when using a value +/// literal in the right part of the expression. +/// @author msyabro + +main () { + 1 is 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Type_Test/syntax_t05.dart b/Language/Expressions/Type_Test/syntax_t05.dart index b5db913c18..2798e20662 100644 --- a/Language/Expressions/Type_Test/syntax_t05.dart +++ b/Language/Expressions/Type_Test/syntax_t05.dart @@ -1,21 +1,21 @@ -// 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 The is-expression tests if an object is a member of a type. -/// typeTest: -/// isOperator type -/// ; -/// isOperator: -/// is '!'? -/// ; -/// @description Checks that it is a compile-time error if left part of the -/// expression is a statement. -/// @author msyabro - -main () { - if (1 < 2) {} is bool; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The is-expression tests if an object is a member of a type. +/// typeTest: +/// isOperator type +/// ; +/// isOperator: +/// is '!'? +/// ; +/// @description Checks that it is a compile-time error if left part of the +/// expression is a statement. +/// @author msyabro + +main () { + if (1 < 2) {} is bool; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Unary_Expressions/syntax_t06.dart b/Language/Expressions/Unary_Expressions/syntax_t06.dart index 310b99eab8..e1765a317b 100644 --- a/Language/Expressions/Unary_Expressions/syntax_t06.dart +++ b/Language/Expressions/Unary_Expressions/syntax_t06.dart @@ -1,48 +1,48 @@ -// 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 Unary expressions invoke unary operators on objects. -/// unaryExpression: -/// prefixOperator unaryExpression | -/// awaitExpression | -/// postfixExpression | -/// (minusOperator | tildeOperator) super | -/// incrementOperator assignableExpression -/// ; -/// prefixOperator: -/// minusOperator | -/// negationOperator | -/// tildeOperator -/// ; -/// minusOperator: -/// ‘-’ | -/// ; -/// negationOperator: -/// ‘!’ | -/// ; -/// tildeOperator: -/// ‘˜’ -/// ; -/// A unary expression is either a postfix expression, an await expression or -/// an invocation of a prefix operator on an expression or an invocation of a -/// unary operator on either super or an expression e. -/// @description Checks that incrementOperator can't be used with super -/// @author msyabro - - -class S {} - -class A extends S { - test() { - ++super; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } -} - -main() { - A a = new A(); - a.test(); -} +// 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 Unary expressions invoke unary operators on objects. +/// unaryExpression: +/// prefixOperator unaryExpression | +/// awaitExpression | +/// postfixExpression | +/// (minusOperator | tildeOperator) super | +/// incrementOperator assignableExpression +/// ; +/// prefixOperator: +/// minusOperator | +/// negationOperator | +/// tildeOperator +/// ; +/// minusOperator: +/// ‘-’ | +/// ; +/// negationOperator: +/// ‘!’ | +/// ; +/// tildeOperator: +/// ‘˜’ +/// ; +/// A unary expression is either a postfix expression, an await expression or +/// an invocation of a prefix operator on an expression or an invocation of a +/// unary operator on either super or an expression e. +/// @description Checks that incrementOperator can't be used with super +/// @author msyabro + + +class S {} + +class A extends S { + test() { + ++super; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + A a = new A(); + a.test(); +} diff --git a/Language/Expressions/Unary_Expressions/syntax_t07.dart b/Language/Expressions/Unary_Expressions/syntax_t07.dart index fd672ceda8..e70fa62bc1 100644 --- a/Language/Expressions/Unary_Expressions/syntax_t07.dart +++ b/Language/Expressions/Unary_Expressions/syntax_t07.dart @@ -1,41 +1,41 @@ -// 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 Unary expressions invoke unary operators on objects. -/// unaryExpression: -/// prefixOperator unaryExpression | -/// awaitExpression | -/// postfixExpression | -/// (minusOperator | tildeOperator) super | -/// incrementOperator assignableExpression -/// ; -/// prefixOperator: -/// minusOperator | -/// negationOperator | -/// tildeOperator -/// ; -/// minusOperator: -/// ‘-’ | -/// ; -/// negationOperator: -/// ‘!’ | -/// ; -/// tildeOperator: -/// ‘˜’ -/// ; -/// A unary expression is either a postfix expression, an await expression or -/// an invocation of a prefix operator on an expression or an invocation of a -/// unary operator on either super or an expression e. -/// @description Checks that incrementOperator can't be used with -/// postfixExpression -/// @author msyabro - - -main() { - var x = 1; - ++x--; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Unary expressions invoke unary operators on objects. +/// unaryExpression: +/// prefixOperator unaryExpression | +/// awaitExpression | +/// postfixExpression | +/// (minusOperator | tildeOperator) super | +/// incrementOperator assignableExpression +/// ; +/// prefixOperator: +/// minusOperator | +/// negationOperator | +/// tildeOperator +/// ; +/// minusOperator: +/// ‘-’ | +/// ; +/// negationOperator: +/// ‘!’ | +/// ; +/// tildeOperator: +/// ‘˜’ +/// ; +/// A unary expression is either a postfix expression, an await expression or +/// an invocation of a prefix operator on an expression or an invocation of a +/// unary operator on either super or an expression e. +/// @description Checks that incrementOperator can't be used with +/// postfixExpression +/// @author msyabro + + +main() { + var x = 1; + ++x--; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Unary_Expressions/syntax_t08.dart b/Language/Expressions/Unary_Expressions/syntax_t08.dart index 7bddea07fa..a0bd8c6780 100644 --- a/Language/Expressions/Unary_Expressions/syntax_t08.dart +++ b/Language/Expressions/Unary_Expressions/syntax_t08.dart @@ -1,41 +1,41 @@ -// 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 Unary expressions invoke unary operators on objects. -/// unaryExpression: -/// prefixOperator unaryExpression | -/// awaitExpression | -/// postfixExpression | -/// (minusOperator | tildeOperator) super | -/// incrementOperator assignableExpression -/// ; -/// prefixOperator: -/// minusOperator | -/// negationOperator | -/// tildeOperator -/// ; -/// minusOperator: -/// ‘-’ | -/// ; -/// negationOperator: -/// ‘!’ | -/// ; -/// tildeOperator: -/// ‘˜’ -/// ; -/// A unary expression is either a postfix expression, an await expression or -/// an invocation of a prefix operator on an expression or an invocation of a -/// unary operator on either super or an expression e. -/// @description Checks that incrementOperator can't be used with an unary -/// expression of the form -e. -/// @author msyabro - - -main() { - var x = 1; - ++-x; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Unary expressions invoke unary operators on objects. +/// unaryExpression: +/// prefixOperator unaryExpression | +/// awaitExpression | +/// postfixExpression | +/// (minusOperator | tildeOperator) super | +/// incrementOperator assignableExpression +/// ; +/// prefixOperator: +/// minusOperator | +/// negationOperator | +/// tildeOperator +/// ; +/// minusOperator: +/// ‘-’ | +/// ; +/// negationOperator: +/// ‘!’ | +/// ; +/// tildeOperator: +/// ‘˜’ +/// ; +/// A unary expression is either a postfix expression, an await expression or +/// an invocation of a prefix operator on an expression or an invocation of a +/// unary operator on either super or an expression e. +/// @description Checks that incrementOperator can't be used with an unary +/// expression of the form -e. +/// @author msyabro + + +main() { + var x = 1; + ++-x; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Unary_Expressions/syntax_t09.dart b/Language/Expressions/Unary_Expressions/syntax_t09.dart index 2e43092190..1083184ed3 100644 --- a/Language/Expressions/Unary_Expressions/syntax_t09.dart +++ b/Language/Expressions/Unary_Expressions/syntax_t09.dart @@ -1,41 +1,41 @@ -// 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 Unary expressions invoke unary operators on objects. -/// unaryExpression: -/// prefixOperator unaryExpression | -/// awaitExpression | -/// postfixExpression | -/// (minusOperator | tildeOperator) super | -/// incrementOperator assignableExpression -/// ; -/// prefixOperator: -/// minusOperator | -/// negationOperator | -/// tildeOperator -/// ; -/// minusOperator: -/// ‘-’ | -/// ; -/// negationOperator: -/// ‘!’ | -/// ; -/// tildeOperator: -/// ‘˜’ -/// ; -/// A unary expression is either a postfix expression, an await expression or -/// an invocation of a prefix operator on an expression or an invocation of a -/// unary operator on either super or an expression e. -/// @description Checks that incrementOperator can't be used with an unary -/// expression of the form ++e. -/// @author msyabro - - -main() { - var x = 1; - ++ ++x; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Unary expressions invoke unary operators on objects. +/// unaryExpression: +/// prefixOperator unaryExpression | +/// awaitExpression | +/// postfixExpression | +/// (minusOperator | tildeOperator) super | +/// incrementOperator assignableExpression +/// ; +/// prefixOperator: +/// minusOperator | +/// negationOperator | +/// tildeOperator +/// ; +/// minusOperator: +/// ‘-’ | +/// ; +/// negationOperator: +/// ‘!’ | +/// ; +/// tildeOperator: +/// ‘˜’ +/// ; +/// A unary expression is either a postfix expression, an await expression or +/// an invocation of a prefix operator on an expression or an invocation of a +/// unary operator on either super or an expression e. +/// @description Checks that incrementOperator can't be used with an unary +/// expression of the form ++e. +/// @author msyabro + + +main() { + var x = 1; + ++ ++x; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Unary_Expressions/syntax_t24.dart b/Language/Expressions/Unary_Expressions/syntax_t24.dart index b9895ada6a..0dffcbdbd9 100644 --- a/Language/Expressions/Unary_Expressions/syntax_t24.dart +++ b/Language/Expressions/Unary_Expressions/syntax_t24.dart @@ -1,42 +1,42 @@ -// 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 Unary expressions invoke unary operators on objects. -/// unaryExpression: -/// prefixOperator unaryExpression | -/// awaitExpression | -/// postfixExpression | -/// (minusOperator | tildeOperator) super | -/// incrementOperator assignableExpression -/// ; -/// prefixOperator: -/// minusOperator | -/// negationOperator | -/// tildeOperator -/// ; -/// minusOperator: -/// ‘-’ | -/// ; -/// negationOperator: -/// ‘!’ | -/// ; -/// tildeOperator: -/// ‘˜’ -/// ; -/// A unary expression is either a postfix expression, an await expression or -/// an invocation of a prefix operator on an expression or an invocation of a -/// unary operator on either super or an expression e. -/// @description Checks that it's a compile-time error when a '~' -/// precedes a statement that isn't an expression (return statement). -/// @author msyabro - - -main() { - try { - ~return 0; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (e) {} -} +// 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 Unary expressions invoke unary operators on objects. +/// unaryExpression: +/// prefixOperator unaryExpression | +/// awaitExpression | +/// postfixExpression | +/// (minusOperator | tildeOperator) super | +/// incrementOperator assignableExpression +/// ; +/// prefixOperator: +/// minusOperator | +/// negationOperator | +/// tildeOperator +/// ; +/// minusOperator: +/// ‘-’ | +/// ; +/// negationOperator: +/// ‘!’ | +/// ; +/// tildeOperator: +/// ‘˜’ +/// ; +/// A unary expression is either a postfix expression, an await expression or +/// an invocation of a prefix operator on an expression or an invocation of a +/// unary operator on either super or an expression e. +/// @description Checks that it's a compile-time error when a '~' +/// precedes a statement that isn't an expression (return statement). +/// @author msyabro + + +main() { + try { + ~return 0; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (e) {} +} diff --git a/Language/Expressions/Unary_Expressions/syntax_t25.dart b/Language/Expressions/Unary_Expressions/syntax_t25.dart index 4744015df3..535bddb83b 100644 --- a/Language/Expressions/Unary_Expressions/syntax_t25.dart +++ b/Language/Expressions/Unary_Expressions/syntax_t25.dart @@ -1,40 +1,40 @@ -// 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 Unary expressions invoke unary operators on objects. -/// unaryExpression: -/// prefixOperator unaryExpression | -/// awaitExpression | -/// postfixExpression | -/// (minusOperator | tildeOperator) super | -/// incrementOperator assignableExpression -/// ; -/// prefixOperator: -/// minusOperator | -/// negationOperator | -/// tildeOperator -/// ; -/// minusOperator: -/// ‘-’ | -/// ; -/// negationOperator: -/// ‘!’ | -/// ; -/// tildeOperator: -/// ‘˜’ -/// ; -/// A unary expression is either a postfix expression, an await expression or -/// an invocation of a prefix operator on an expression or an invocation of a -/// unary operator on either super or an expression e. -/// @description Checks that it's a compile-time error when a '!' -/// precedes a statement that isn't an expression (block statement). -/// @author msyabro - - -main() { - !{int? x; x = 1;}; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Unary expressions invoke unary operators on objects. +/// unaryExpression: +/// prefixOperator unaryExpression | +/// awaitExpression | +/// postfixExpression | +/// (minusOperator | tildeOperator) super | +/// incrementOperator assignableExpression +/// ; +/// prefixOperator: +/// minusOperator | +/// negationOperator | +/// tildeOperator +/// ; +/// minusOperator: +/// ‘-’ | +/// ; +/// negationOperator: +/// ‘!’ | +/// ; +/// tildeOperator: +/// ‘˜’ +/// ; +/// A unary expression is either a postfix expression, an await expression or +/// an invocation of a prefix operator on an expression or an invocation of a +/// unary operator on either super or an expression e. +/// @description Checks that it's a compile-time error when a '!' +/// precedes a statement that isn't an expression (block statement). +/// @author msyabro + + +main() { + !{int? x; x = 1;}; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Expressions/Unary_Expressions/syntax_t26.dart b/Language/Expressions/Unary_Expressions/syntax_t26.dart index 9098376a9f..9d823c4eaa 100644 --- a/Language/Expressions/Unary_Expressions/syntax_t26.dart +++ b/Language/Expressions/Unary_Expressions/syntax_t26.dart @@ -1,40 +1,40 @@ -// 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 Unary expressions invoke unary operators on objects. -/// unaryExpression: -/// prefixOperator unaryExpression | -/// awaitExpression | -/// postfixExpression | -/// (minusOperator | tildeOperator) super | -/// incrementOperator assignableExpression -/// ; -/// prefixOperator: -/// minusOperator | -/// negationOperator | -/// tildeOperator -/// ; -/// minusOperator: -/// ‘-’ | -/// ; -/// negationOperator: -/// ‘!’ | -/// ; -/// tildeOperator: -/// ‘˜’ -/// ; -/// A unary expression is either a postfix expression, an await expression or -/// an invocation of a prefix operator on an expression or an invocation of a -/// unary operator on either super or an expression e. -/// @description Checks that a non-expression statement can't be used with -/// incrementOperator. (Variable declaration statement) -/// @author msyabro - - -main() { - ++ var x; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Unary expressions invoke unary operators on objects. +/// unaryExpression: +/// prefixOperator unaryExpression | +/// awaitExpression | +/// postfixExpression | +/// (minusOperator | tildeOperator) super | +/// incrementOperator assignableExpression +/// ; +/// prefixOperator: +/// minusOperator | +/// negationOperator | +/// tildeOperator +/// ; +/// minusOperator: +/// ‘-’ | +/// ; +/// negationOperator: +/// ‘!’ | +/// ; +/// tildeOperator: +/// ‘˜’ +/// ; +/// A unary expression is either a postfix expression, an await expression or +/// an invocation of a prefix operator on an expression or an invocation of a +/// unary operator on either super or an expression e. +/// @description Checks that a non-expression statement can't be used with +/// incrementOperator. (Variable declaration statement) +/// @author msyabro + + +main() { + ++ var x; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Functions/Formal_Parameters/Optional_Formals/name_t02.dart b/Language/Functions/Formal_Parameters/Optional_Formals/name_t02.dart index 6b7c1e6cc1..b5636b85c5 100644 --- a/Language/Functions/Formal_Parameters/Optional_Formals/name_t02.dart +++ b/Language/Functions/Formal_Parameters/Optional_Formals/name_t02.dart @@ -1,24 +1,24 @@ -// 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 It is a compile-time error if the name of a named -/// optional parameter begins with an _ character. -/// @description Checks that it is a compile-time error if the name of a named -/// optional parameter begins with an '_' character. -/// @author rodionov - - -class A { - var _p; - A({this._p: ""}) { -// ^ -// [analyzer] unspecified -// [cfe] unspecified - print(_p); - } -} - -main() { - new A(_p: "Optional parameters names must not begin with an underscore!"); -} +// 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 It is a compile-time error if the name of a named +/// optional parameter begins with an _ character. +/// @description Checks that it is a compile-time error if the name of a named +/// optional parameter begins with an '_' character. +/// @author rodionov + + +class A { + var _p; + A({this._p: ""}) { +// ^ +// [analyzer] unspecified +// [cfe] unspecified + print(_p); + } +} + +main() { + new A(_p: "Optional parameters names must not begin with an underscore!"); +} diff --git a/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t04.dart b/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t04.dart index a4d2a3a792..3eb54d71cf 100644 --- a/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t04.dart +++ b/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t04.dart @@ -1,25 +1,25 @@ -// 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 Optional parameters may be specified and provided with default -/// values. -/// defaultFormalParameter: -/// normalFormalParameter ('=' expression)? -/// ; -/// defaultNamedParameter: -/// normalFormalParameter (':' expression)? -/// ; -/// @description Checks that the '=' character in an optional positional -/// parameter declaration must be followed by an expression. -/// @author iefremov - - -f([var x = ]) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(); -} +// 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 Optional parameters may be specified and provided with default +/// values. +/// defaultFormalParameter: +/// normalFormalParameter ('=' expression)? +/// ; +/// defaultNamedParameter: +/// normalFormalParameter (':' expression)? +/// ; +/// @description Checks that the '=' character in an optional positional +/// parameter declaration must be followed by an expression. +/// @author iefremov + + +f([var x = ]) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(); +} diff --git a/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t05.dart b/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t05.dart index 33c3ae0852..0afcaa1f52 100644 --- a/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t05.dart +++ b/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t05.dart @@ -1,25 +1,25 @@ -// 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 Optional parameters may be specified and provided with default -/// values. -/// defaultFormalParameter: -/// normalFormalParameter ('=' expression)? -/// ; -/// defaultNamedParameter: -/// normalFormalParameter (':' expression)? -/// ; -/// @description Checks that a statement cannot be used instead of expression -/// in an optional positional parameter declaration. -/// @author iefremov - - -f([var x = var z]) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(); -} +// 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 Optional parameters may be specified and provided with default +/// values. +/// defaultFormalParameter: +/// normalFormalParameter ('=' expression)? +/// ; +/// defaultNamedParameter: +/// normalFormalParameter (':' expression)? +/// ; +/// @description Checks that a statement cannot be used instead of expression +/// in an optional positional parameter declaration. +/// @author iefremov + + +f([var x = var z]) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(); +} diff --git a/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t08.dart b/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t08.dart index c2a3be149a..a1c566e80c 100644 --- a/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t08.dart +++ b/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t08.dart @@ -1,25 +1,25 @@ -// 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 Optional parameters may be specified and provided with default -/// values. -/// defaultFormalParameter: -/// normalFormalParameter ('=' expression)? -/// ; -/// defaultNamedParameter: -/// normalFormalParameter (':' expression)? -/// ; -/// @description Checks that the ':' character in an optional named parameter -/// declaration must be followed by an expression. -/// @author rodionov - - -f({var x: }) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(); -} +// 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 Optional parameters may be specified and provided with default +/// values. +/// defaultFormalParameter: +/// normalFormalParameter ('=' expression)? +/// ; +/// defaultNamedParameter: +/// normalFormalParameter (':' expression)? +/// ; +/// @description Checks that the ':' character in an optional named parameter +/// declaration must be followed by an expression. +/// @author rodionov + + +f({var x: }) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(); +} diff --git a/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t09.dart b/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t09.dart index f6e8ab87ca..68848e30d6 100644 --- a/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t09.dart +++ b/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t09.dart @@ -1,25 +1,25 @@ -// 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 Optional parameters may be specified and provided with default -/// values. -/// defaultFormalParameter: -/// normalFormalParameter ('=' expression)? -/// ; -/// defaultNamedParameter: -/// normalFormalParameter (':' expression)? -/// ; -/// @description Checks that a declaration cannot be used instead of expression -/// in an optional named parameter declaration. -/// @author rodionov - - -f({var x: var z}) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(); -} +// 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 Optional parameters may be specified and provided with default +/// values. +/// defaultFormalParameter: +/// normalFormalParameter ('=' expression)? +/// ; +/// defaultNamedParameter: +/// normalFormalParameter (':' expression)? +/// ; +/// @description Checks that a declaration cannot be used instead of expression +/// in an optional named parameter declaration. +/// @author rodionov + + +f({var x: var z}) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(); +} diff --git a/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t12.dart b/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t12.dart index e558463037..dda6495458 100644 --- a/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t12.dart +++ b/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t12.dart @@ -1,26 +1,26 @@ -// 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 Optional parameters may be specified and provided with default -/// values. -/// defaultFormalParameter: -/// normalFormalParameter ('=' expression)? -/// ; -/// defaultNamedParameter: -/// normalFormalParameter (':' expression)? -/// ; -/// @description Checks that it is a compile-time error when the two kinds of -/// brackets are mixed in an optional parameters declaration. -/// @author rodionov - -foo({const p: 1]) { -// ^ -// [analyzer] unspecified -// [cfe] unspecified - p = 1; -} - -main() { - foo(); -} +// 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 Optional parameters may be specified and provided with default +/// values. +/// defaultFormalParameter: +/// normalFormalParameter ('=' expression)? +/// ; +/// defaultNamedParameter: +/// normalFormalParameter (':' expression)? +/// ; +/// @description Checks that it is a compile-time error when the two kinds of +/// brackets are mixed in an optional parameters declaration. +/// @author rodionov + +foo({const p: 1]) { +// ^ +// [analyzer] unspecified +// [cfe] unspecified + p = 1; +} + +main() { + foo(); +} diff --git a/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t13.dart b/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t13.dart index fc126be905..1e8893dccd 100644 --- a/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t13.dart +++ b/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t13.dart @@ -1,27 +1,27 @@ -// 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 Optional parameters may be specified and provided with default -/// values. -/// defaultFormalParameter: -/// normalFormalParameter ('=' expression)? -/// ; -/// defaultNamedParameter: -/// normalFormalParameter (':' expression)? -/// ; -/// @description Checks that it is a compile-time error when the two kinds of -/// brackets are mixed in an optional parameters declaration. -/// @author rodionov - - -foo([int p = 1}) { -// ^ -// [analyzer] unspecified -// [cfe] unspecified - p = 1; -} - -main() { - foo(); -} +// 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 Optional parameters may be specified and provided with default +/// values. +/// defaultFormalParameter: +/// normalFormalParameter ('=' expression)? +/// ; +/// defaultNamedParameter: +/// normalFormalParameter (':' expression)? +/// ; +/// @description Checks that it is a compile-time error when the two kinds of +/// brackets are mixed in an optional parameters declaration. +/// @author rodionov + + +foo([int p = 1}) { +// ^ +// [analyzer] unspecified +// [cfe] unspecified + p = 1; +} + +main() { + foo(); +} diff --git a/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t14.dart b/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t14.dart index c02185ba97..ee103b530a 100644 --- a/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t14.dart +++ b/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t14.dart @@ -1,26 +1,26 @@ -// 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 Optional parameters may be specified and provided with default -/// values. -/// defaultFormalParameter: -/// normalFormalParameter ('=' expression)? -/// ; -/// defaultNamedParameter: -/// normalFormalParameter (':' expression)? -/// ; -/// @description Checks that it is no error when the '=' character is used in -/// an optional named parameter declaration. -/// @author rodionov -/// @author sgrekhov@unipro.ru - -import "../../../../Utils/expect.dart"; - -foo({var a = 1, var b = 2}) { - return b; -} - -main() { - Expect.equals(2, foo()); -} +// 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 Optional parameters may be specified and provided with default +/// values. +/// defaultFormalParameter: +/// normalFormalParameter ('=' expression)? +/// ; +/// defaultNamedParameter: +/// normalFormalParameter (':' expression)? +/// ; +/// @description Checks that it is no error when the '=' character is used in +/// an optional named parameter declaration. +/// @author rodionov +/// @author sgrekhov@unipro.ru + +import "../../../../Utils/expect.dart"; + +foo({var a = 1, var b = 2}) { + return b; +} + +main() { + Expect.equals(2, foo()); +} diff --git a/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t15.dart b/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t15.dart index 9f8b26a4d8..e5fcb81595 100644 --- a/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t15.dart +++ b/Language/Functions/Formal_Parameters/Optional_Formals/syntax_t15.dart @@ -1,27 +1,27 @@ -// 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 Optional parameters may be specified and provided with default -/// values. -/// defaultFormalParameter: -/// normalFormalParameter ('=' expression)? -/// ; -/// defaultNamedParameter: -/// normalFormalParameter (':' expression)? -/// ; -/// @description Checks that it is a compile-time error when the ':' -/// character is used in an optional positional parameter declaration. -/// @author rodionov - - -foo([var a = 1, var b: 2]) { -// ^ -// [analyzer] unspecified -// [cfe] unspecified - return a; -} - -main() { - foo(); -} +// 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 Optional parameters may be specified and provided with default +/// values. +/// defaultFormalParameter: +/// normalFormalParameter ('=' expression)? +/// ; +/// defaultNamedParameter: +/// normalFormalParameter (':' expression)? +/// ; +/// @description Checks that it is a compile-time error when the ':' +/// character is used in an optional positional parameter declaration. +/// @author rodionov + + +foo([var a = 1, var b: 2]) { +// ^ +// [analyzer] unspecified +// [cfe] unspecified + return a; +} + +main() { + foo(); +} diff --git a/Language/Functions/Formal_Parameters/Required_Formals/syntax_t03.dart b/Language/Functions/Formal_Parameters/Required_Formals/syntax_t03.dart index b23f89dd5e..d34a66ec07 100644 --- a/Language/Functions/Formal_Parameters/Required_Formals/syntax_t03.dart +++ b/Language/Functions/Formal_Parameters/Required_Formals/syntax_t03.dart @@ -1,39 +1,39 @@ -// 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 required formal parameter may be specied in one of three ways: -/// -/// • By means of a function signature that names the parameter and describes -/// its type as a function type. It is a compile-time error if any default -/// values are specied in the signature of such a function type. -/// • As an initializing formal, which is only valid as a parameter to a -/// generative constructor. -/// • Via an ordinary variable declaration -/// -/// normalFormalParameter: -/// functionSignature | -/// fieldFormalParameter | -/// simpleFormalParameter -/// ; -/// simpleFormalParameter: -/// declaredIdentifier | -/// metadata identifier -/// ; -/// fieldFormalParameter: -/// metadata finalConstVarOrType? this '.' identifier formalParameterList? -/// ; -/// @description Checks that it is a compile-error if required parameter is -/// declared as const -/// @author msyabro - -func(const x) { -// ^ -// [analyzer] unspecified -// [cfe] unspecified - x = 1; -} - -main() { - func(1); -} +// 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 required formal parameter may be specied in one of three ways: +/// +/// • By means of a function signature that names the parameter and describes +/// its type as a function type. It is a compile-time error if any default +/// values are specied in the signature of such a function type. +/// • As an initializing formal, which is only valid as a parameter to a +/// generative constructor. +/// • Via an ordinary variable declaration +/// +/// normalFormalParameter: +/// functionSignature | +/// fieldFormalParameter | +/// simpleFormalParameter +/// ; +/// simpleFormalParameter: +/// declaredIdentifier | +/// metadata identifier +/// ; +/// fieldFormalParameter: +/// metadata finalConstVarOrType? this '.' identifier formalParameterList? +/// ; +/// @description Checks that it is a compile-error if required parameter is +/// declared as const +/// @author msyabro + +func(const x) { +// ^ +// [analyzer] unspecified +// [cfe] unspecified + x = 1; +} + +main() { + func(1); +} diff --git a/Language/Functions/Formal_Parameters/Required_Formals/syntax_t04.dart b/Language/Functions/Formal_Parameters/Required_Formals/syntax_t04.dart index f788039e99..df15c5e5be 100644 --- a/Language/Functions/Formal_Parameters/Required_Formals/syntax_t04.dart +++ b/Language/Functions/Formal_Parameters/Required_Formals/syntax_t04.dart @@ -1,38 +1,38 @@ -// 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 required formal parameter may be specied in one of three ways: -/// -/// • By means of a function signature that names the parameter and describes -/// its type as a function type. It is a compile-time error if any default -/// values are specied in the signature of such a function type. -/// • As an initializing formal, which is only valid as a parameter to a -/// generative constructor. -/// • Via an ordinary variable declaration -/// -/// normalFormalParameter: -/// functionSignature | -/// fieldFormalParameter | -/// simpleFormalParameter -/// ; -/// simpleFormalParameter: -/// declaredIdentifier | -/// metadata identifier -/// ; -/// fieldFormalParameter: -/// metadata finalConstVarOrType? this '.' identifier formalParameterList? -/// ; -/// @description Checks that static variable declaration can't be a required -/// formal parameter -/// @author msyabro - - -f(static var x) {} -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(1); -} +// 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 required formal parameter may be specied in one of three ways: +/// +/// • By means of a function signature that names the parameter and describes +/// its type as a function type. It is a compile-time error if any default +/// values are specied in the signature of such a function type. +/// • As an initializing formal, which is only valid as a parameter to a +/// generative constructor. +/// • Via an ordinary variable declaration +/// +/// normalFormalParameter: +/// functionSignature | +/// fieldFormalParameter | +/// simpleFormalParameter +/// ; +/// simpleFormalParameter: +/// declaredIdentifier | +/// metadata identifier +/// ; +/// fieldFormalParameter: +/// metadata finalConstVarOrType? this '.' identifier formalParameterList? +/// ; +/// @description Checks that static variable declaration can't be a required +/// formal parameter +/// @author msyabro + + +f(static var x) {} +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(1); +} diff --git a/Language/Functions/Formal_Parameters/Required_Formals/syntax_t06.dart b/Language/Functions/Formal_Parameters/Required_Formals/syntax_t06.dart index 675d429ac8..336aedf72d 100644 --- a/Language/Functions/Formal_Parameters/Required_Formals/syntax_t06.dart +++ b/Language/Functions/Formal_Parameters/Required_Formals/syntax_t06.dart @@ -1,39 +1,39 @@ -// 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 required formal parameter may be specied in one of three ways: -/// -/// • By means of a function signature that names the parameter and describes -/// its type as a function type. It is a compile-time error if any default -/// values are specied in the signature of such a function type. -/// • As an initializing formal, which is only valid as a parameter to a -/// generative constructor. -/// • Via an ordinary variable declaration -/// -/// normalFormalParameter: -/// functionSignature | -/// fieldFormalParameter | -/// simpleFormalParameter -/// ; -/// simpleFormalParameter: -/// declaredIdentifier | -/// metadata identifier -/// ; -/// fieldFormalParameter: -/// metadata finalConstVarOrType? this '.' identifier formalParameterList? -/// ; -/// @description Checks that a functionSignature parameter cannot be final. -/// @author kaigorodov - - -func(final x()) { -// ^ -// [analyzer] unspecified -// [cfe] unspecified - return x(); -} - -main() { - func(() {}); -} +// 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 required formal parameter may be specied in one of three ways: +/// +/// • By means of a function signature that names the parameter and describes +/// its type as a function type. It is a compile-time error if any default +/// values are specied in the signature of such a function type. +/// • As an initializing formal, which is only valid as a parameter to a +/// generative constructor. +/// • Via an ordinary variable declaration +/// +/// normalFormalParameter: +/// functionSignature | +/// fieldFormalParameter | +/// simpleFormalParameter +/// ; +/// simpleFormalParameter: +/// declaredIdentifier | +/// metadata identifier +/// ; +/// fieldFormalParameter: +/// metadata finalConstVarOrType? this '.' identifier formalParameterList? +/// ; +/// @description Checks that a functionSignature parameter cannot be final. +/// @author kaigorodov + + +func(final x()) { +// ^ +// [analyzer] unspecified +// [cfe] unspecified + return x(); +} + +main() { + func(() {}); +} diff --git a/Language/Functions/Formal_Parameters/Required_Formals/syntax_t07.dart b/Language/Functions/Formal_Parameters/Required_Formals/syntax_t07.dart index 9f52c1c14f..5e56c901b7 100644 --- a/Language/Functions/Formal_Parameters/Required_Formals/syntax_t07.dart +++ b/Language/Functions/Formal_Parameters/Required_Formals/syntax_t07.dart @@ -1,40 +1,40 @@ -// 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 required formal parameter may be specied in one of three ways: -/// -/// • By means of a function signature that names the parameter and describes -/// its type as a function type. It is a compile-time error if any default -/// values are specied in the signature of such a function type. -/// • As an initializing formal, which is only valid as a parameter to a -/// generative constructor. -/// • Via an ordinary variable declaration -/// -/// normalFormalParameter: -/// functionSignature | -/// fieldFormalParameter | -/// simpleFormalParameter -/// ; -/// simpleFormalParameter: -/// declaredIdentifier | -/// metadata identifier -/// ; -/// fieldFormalParameter: -/// metadata finalConstVarOrType? this '.' identifier formalParameterList? -/// ; -/// @description Checks that a functionSignature parameter cannot be declared as -/// variable. -/// @author kaigorodov - - -func(var x()) { -// ^ -// [analyzer] unspecified -// [cfe] unspecified - return x(); -} - -main() { - func(() {}); -} +// 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 required formal parameter may be specied in one of three ways: +/// +/// • By means of a function signature that names the parameter and describes +/// its type as a function type. It is a compile-time error if any default +/// values are specied in the signature of such a function type. +/// • As an initializing formal, which is only valid as a parameter to a +/// generative constructor. +/// • Via an ordinary variable declaration +/// +/// normalFormalParameter: +/// functionSignature | +/// fieldFormalParameter | +/// simpleFormalParameter +/// ; +/// simpleFormalParameter: +/// declaredIdentifier | +/// metadata identifier +/// ; +/// fieldFormalParameter: +/// metadata finalConstVarOrType? this '.' identifier formalParameterList? +/// ; +/// @description Checks that a functionSignature parameter cannot be declared as +/// variable. +/// @author kaigorodov + + +func(var x()) { +// ^ +// [analyzer] unspecified +// [cfe] unspecified + return x(); +} + +main() { + func(() {}); +} diff --git a/Language/Functions/Formal_Parameters/Required_Formals/syntax_t08.dart b/Language/Functions/Formal_Parameters/Required_Formals/syntax_t08.dart index 9582e39809..0f0052ce7f 100644 --- a/Language/Functions/Formal_Parameters/Required_Formals/syntax_t08.dart +++ b/Language/Functions/Formal_Parameters/Required_Formals/syntax_t08.dart @@ -1,41 +1,41 @@ -// 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 required formal parameter may be specied in one of three ways: -/// -/// • By means of a function signature that names the parameter and describes -/// its type as a function type. It is a compile-time error if any default -/// values are specied in the signature of such a function type. -/// • As an initializing formal, which is only valid as a parameter to a -/// generative constructor. -/// • Via an ordinary variable declaration -/// -/// normalFormalParameter: -/// functionSignature | -/// fieldFormalParameter | -/// simpleFormalParameter -/// ; -/// simpleFormalParameter: -/// declaredIdentifier | -/// metadata identifier -/// ; -/// fieldFormalParameter: -/// metadata finalConstVarOrType? this '.' identifier formalParameterList? -/// ; -/// @description Checks that it is a compile-error if signature of formal -/// parameter of a function type has default values -/// @author ilya - - -f(g([x = 1])) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(() {}); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 required formal parameter may be specied in one of three ways: +/// +/// • By means of a function signature that names the parameter and describes +/// its type as a function type. It is a compile-time error if any default +/// values are specied in the signature of such a function type. +/// • As an initializing formal, which is only valid as a parameter to a +/// generative constructor. +/// • Via an ordinary variable declaration +/// +/// normalFormalParameter: +/// functionSignature | +/// fieldFormalParameter | +/// simpleFormalParameter +/// ; +/// simpleFormalParameter: +/// declaredIdentifier | +/// metadata identifier +/// ; +/// fieldFormalParameter: +/// metadata finalConstVarOrType? this '.' identifier formalParameterList? +/// ; +/// @description Checks that it is a compile-error if signature of formal +/// parameter of a function type has default values +/// @author ilya + + +f(g([x = 1])) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(() {}); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Functions/Formal_Parameters/Required_Formals/syntax_t09.dart b/Language/Functions/Formal_Parameters/Required_Formals/syntax_t09.dart index 06c5edc7e4..70f056c51b 100644 --- a/Language/Functions/Formal_Parameters/Required_Formals/syntax_t09.dart +++ b/Language/Functions/Formal_Parameters/Required_Formals/syntax_t09.dart @@ -1,41 +1,41 @@ -// 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 required formal parameter may be specied in one of three ways: -/// -/// • By means of a function signature that names the parameter and describes -/// its type as a function type. It is a compile-time error if any default -/// values are specied in the signature of such a function type. -/// • As an initializing formal, which is only valid as a parameter to a -/// generative constructor. -/// • Via an ordinary variable declaration -/// -/// normalFormalParameter: -/// functionSignature | -/// fieldFormalParameter | -/// simpleFormalParameter -/// ; -/// simpleFormalParameter: -/// declaredIdentifier | -/// metadata identifier -/// ; -/// fieldFormalParameter: -/// metadata finalConstVarOrType? this '.' identifier formalParameterList? -/// ; -/// @description Checks that it is a compile-error if signature of formal -/// parameter of a function type has default values -/// @author ilya - - -f(g({x: 1})) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(() {}); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 required formal parameter may be specied in one of three ways: +/// +/// • By means of a function signature that names the parameter and describes +/// its type as a function type. It is a compile-time error if any default +/// values are specied in the signature of such a function type. +/// • As an initializing formal, which is only valid as a parameter to a +/// generative constructor. +/// • Via an ordinary variable declaration +/// +/// normalFormalParameter: +/// functionSignature | +/// fieldFormalParameter | +/// simpleFormalParameter +/// ; +/// simpleFormalParameter: +/// declaredIdentifier | +/// metadata identifier +/// ; +/// fieldFormalParameter: +/// metadata finalConstVarOrType? this '.' identifier formalParameterList? +/// ; +/// @description Checks that it is a compile-error if signature of formal +/// parameter of a function type has default values +/// @author ilya + + +f(g({x: 1})) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(() {}); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Functions/Formal_Parameters/Required_Formals/syntax_t10.dart b/Language/Functions/Formal_Parameters/Required_Formals/syntax_t10.dart index 8ed470f286..a250dbb2f6 100644 --- a/Language/Functions/Formal_Parameters/Required_Formals/syntax_t10.dart +++ b/Language/Functions/Formal_Parameters/Required_Formals/syntax_t10.dart @@ -1,38 +1,38 @@ -// 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 required formal parameter may be specied in one of three ways: -/// -/// • By means of a function signature that names the parameter and describes -/// its type as a function type. It is a compile-time error if any default -/// values are specied in the signature of such a function type. -/// • As an initializing formal, which is only valid as a parameter to a -/// generative constructor. -/// • Via an ordinary variable declaration -/// -/// normalFormalParameter: -/// functionSignature | -/// fieldFormalParameter | -/// simpleFormalParameter -/// ; -/// simpleFormalParameter: -/// declaredIdentifier | -/// metadata identifier -/// ; -/// fieldFormalParameter: -/// metadata finalConstVarOrType? this '.' identifier formalParameterList? -/// ; -/// @description Checks that initializing formals are not allowed in library -/// functions. -/// @author ilya - - -f(this.x) {} -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(0); -} +// 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 required formal parameter may be specied in one of three ways: +/// +/// • By means of a function signature that names the parameter and describes +/// its type as a function type. It is a compile-time error if any default +/// values are specied in the signature of such a function type. +/// • As an initializing formal, which is only valid as a parameter to a +/// generative constructor. +/// • Via an ordinary variable declaration +/// +/// normalFormalParameter: +/// functionSignature | +/// fieldFormalParameter | +/// simpleFormalParameter +/// ; +/// simpleFormalParameter: +/// declaredIdentifier | +/// metadata identifier +/// ; +/// fieldFormalParameter: +/// metadata finalConstVarOrType? this '.' identifier formalParameterList? +/// ; +/// @description Checks that initializing formals are not allowed in library +/// functions. +/// @author ilya + + +f(this.x) {} +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(0); +} diff --git a/Language/Functions/Formal_Parameters/Required_Formals/syntax_t11.dart b/Language/Functions/Formal_Parameters/Required_Formals/syntax_t11.dart index b6b9fdafce..345cea26b5 100644 --- a/Language/Functions/Formal_Parameters/Required_Formals/syntax_t11.dart +++ b/Language/Functions/Formal_Parameters/Required_Formals/syntax_t11.dart @@ -1,38 +1,38 @@ -// 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 required formal parameter may be specied in one of three ways: -/// -/// • By means of a function signature that names the parameter and describes -/// its type as a function type. It is a compile-time error if any default -/// values are specied in the signature of such a function type. -/// • As an initializing formal, which is only valid as a parameter to a -/// generative constructor. -/// • Via an ordinary variable declaration -/// -/// normalFormalParameter: -/// functionSignature | -/// fieldFormalParameter | -/// simpleFormalParameter -/// ; -/// simpleFormalParameter: -/// declaredIdentifier | -/// metadata identifier -/// ; -/// fieldFormalParameter: -/// metadata finalConstVarOrType? this '.' identifier formalParameterList? -/// ; -/// @description Checks that initializing formals of function type are not -/// allowed in library functions. -/// @author ilya - - -f(this.x(y)) {} -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f((x) {}); -} +// 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 required formal parameter may be specied in one of three ways: +/// +/// • By means of a function signature that names the parameter and describes +/// its type as a function type. It is a compile-time error if any default +/// values are specied in the signature of such a function type. +/// • As an initializing formal, which is only valid as a parameter to a +/// generative constructor. +/// • Via an ordinary variable declaration +/// +/// normalFormalParameter: +/// functionSignature | +/// fieldFormalParameter | +/// simpleFormalParameter +/// ; +/// simpleFormalParameter: +/// declaredIdentifier | +/// metadata identifier +/// ; +/// fieldFormalParameter: +/// metadata finalConstVarOrType? this '.' identifier formalParameterList? +/// ; +/// @description Checks that initializing formals of function type are not +/// allowed in library functions. +/// @author ilya + + +f(this.x(y)) {} +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f((x) {}); +} diff --git a/Language/Functions/Formal_Parameters/Required_Formals/syntax_t12.dart b/Language/Functions/Formal_Parameters/Required_Formals/syntax_t12.dart index 41d4eed797..91e383ccb8 100644 --- a/Language/Functions/Formal_Parameters/Required_Formals/syntax_t12.dart +++ b/Language/Functions/Formal_Parameters/Required_Formals/syntax_t12.dart @@ -1,40 +1,40 @@ -// 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 required formal parameter may be specied in one of three ways: -/// -/// • By means of a function signature that names the parameter and describes -/// its type as a function type. It is a compile-time error if any default -/// values are specied in the signature of such a function type. -/// • As an initializing formal, which is only valid as a parameter to a -/// generative constructor. -/// • Via an ordinary variable declaration -/// -/// normalFormalParameter: -/// functionSignature | -/// fieldFormalParameter | -/// simpleFormalParameter -/// ; -/// simpleFormalParameter: -/// declaredIdentifier | -/// metadata identifier -/// ; -/// fieldFormalParameter: -/// metadata finalConstVarOrType? this '.' identifier formalParameterList? -/// ; -/// @description Checks that initializing formals are not allowed in local -/// functions. -/// @author ilya - - -main() { - f(this.x) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - - f(0); -// ^ -// [analyzer] unspecified -} +// 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 required formal parameter may be specied in one of three ways: +/// +/// • By means of a function signature that names the parameter and describes +/// its type as a function type. It is a compile-time error if any default +/// values are specied in the signature of such a function type. +/// • As an initializing formal, which is only valid as a parameter to a +/// generative constructor. +/// • Via an ordinary variable declaration +/// +/// normalFormalParameter: +/// functionSignature | +/// fieldFormalParameter | +/// simpleFormalParameter +/// ; +/// simpleFormalParameter: +/// declaredIdentifier | +/// metadata identifier +/// ; +/// fieldFormalParameter: +/// metadata finalConstVarOrType? this '.' identifier formalParameterList? +/// ; +/// @description Checks that initializing formals are not allowed in local +/// functions. +/// @author ilya + + +main() { + f(this.x) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + + f(0); +// ^ +// [analyzer] unspecified +} diff --git a/Language/Functions/Formal_Parameters/Required_Formals/syntax_t13.dart b/Language/Functions/Formal_Parameters/Required_Formals/syntax_t13.dart index d87925009e..6ec7e1659b 100644 --- a/Language/Functions/Formal_Parameters/Required_Formals/syntax_t13.dart +++ b/Language/Functions/Formal_Parameters/Required_Formals/syntax_t13.dart @@ -1,40 +1,40 @@ -// 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 required formal parameter may be specied in one of three ways: -/// -/// • By means of a function signature that names the parameter and describes -/// its type as a function type. It is a compile-time error if any default -/// values are specied in the signature of such a function type. -/// • As an initializing formal, which is only valid as a parameter to a -/// generative constructor. -/// • Via an ordinary variable declaration -/// -/// normalFormalParameter: -/// functionSignature | -/// fieldFormalParameter | -/// simpleFormalParameter -/// ; -/// simpleFormalParameter: -/// declaredIdentifier | -/// metadata identifier -/// ; -/// fieldFormalParameter: -/// metadata finalConstVarOrType? this '.' identifier formalParameterList? -/// ; -/// @description Checks that initializing formals of function type are not -/// allowed in local functions. -/// @author ilya - - -main() { - f(this.x(y)) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - - f((x) {}); -// ^ -// [analyzer] unspecified -} +// 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 required formal parameter may be specied in one of three ways: +/// +/// • By means of a function signature that names the parameter and describes +/// its type as a function type. It is a compile-time error if any default +/// values are specied in the signature of such a function type. +/// • As an initializing formal, which is only valid as a parameter to a +/// generative constructor. +/// • Via an ordinary variable declaration +/// +/// normalFormalParameter: +/// functionSignature | +/// fieldFormalParameter | +/// simpleFormalParameter +/// ; +/// simpleFormalParameter: +/// declaredIdentifier | +/// metadata identifier +/// ; +/// fieldFormalParameter: +/// metadata finalConstVarOrType? this '.' identifier formalParameterList? +/// ; +/// @description Checks that initializing formals of function type are not +/// allowed in local functions. +/// @author ilya + + +main() { + f(this.x(y)) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + + f((x) {}); +// ^ +// [analyzer] unspecified +} diff --git a/Language/Functions/Formal_Parameters/declare_as_constant_t01.dart b/Language/Functions/Formal_Parameters/declare_as_constant_t01.dart index a2dbf9a515..26aadbce85 100644 --- a/Language/Functions/Formal_Parameters/declare_as_constant_t01.dart +++ b/Language/Functions/Formal_Parameters/declare_as_constant_t01.dart @@ -1,19 +1,19 @@ -// 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 It is a compile-time error if a formal parameter is declared as -/// a constant variable. -/// @description Checks that it is a compile-time error if a required parameter -/// is declared as a constant variable. -/// @author msyabro - - -void f(const x) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main () { - f(1); -} +// 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 It is a compile-time error if a formal parameter is declared as +/// a constant variable. +/// @description Checks that it is a compile-time error if a required parameter +/// is declared as a constant variable. +/// @author msyabro + + +void f(const x) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main () { + f(1); +} diff --git a/Language/Functions/Formal_Parameters/declare_as_constant_t02.dart b/Language/Functions/Formal_Parameters/declare_as_constant_t02.dart index b451993b15..7c3d1a4e22 100644 --- a/Language/Functions/Formal_Parameters/declare_as_constant_t02.dart +++ b/Language/Functions/Formal_Parameters/declare_as_constant_t02.dart @@ -1,19 +1,19 @@ -// 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 It is a compile-time error if a formal parameter is declared as -/// a constant variable. -/// @description Checks that it is a compile-time error if a required parameter -/// is declared as a constant typed variable. -/// @author msyabro - - -void f(const int x) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main () { - f(1); -} +// 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 It is a compile-time error if a formal parameter is declared as +/// a constant variable. +/// @description Checks that it is a compile-time error if a required parameter +/// is declared as a constant typed variable. +/// @author msyabro + + +void f(const int x) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main () { + f(1); +} diff --git a/Language/Functions/Formal_Parameters/declare_as_constant_t03.dart b/Language/Functions/Formal_Parameters/declare_as_constant_t03.dart index e27536f4ac..67f353ad6a 100644 --- a/Language/Functions/Formal_Parameters/declare_as_constant_t03.dart +++ b/Language/Functions/Formal_Parameters/declare_as_constant_t03.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if a formal parameter is declared as -/// a constant variable. -/// @description Checks that it is a compile-time error if an optional named -/// parameter is declared as a constant variable. -/// @author msyabro - - -void f({const x}) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main () { - f(1); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error if a formal parameter is declared as +/// a constant variable. +/// @description Checks that it is a compile-time error if an optional named +/// parameter is declared as a constant variable. +/// @author msyabro + + +void f({const x}) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main () { + f(1); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Functions/Formal_Parameters/declare_as_constant_t04.dart b/Language/Functions/Formal_Parameters/declare_as_constant_t04.dart index b45271311f..5b520145fe 100644 --- a/Language/Functions/Formal_Parameters/declare_as_constant_t04.dart +++ b/Language/Functions/Formal_Parameters/declare_as_constant_t04.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if a formal parameter is declared as -/// a constant variable. -/// @description Checks that it is a compile-time error if an optional named -/// parameter is declared as a constant typed variable. -/// @author msyabro - - -void f({const int x}) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main () { - f(1); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error if a formal parameter is declared as +/// a constant variable. +/// @description Checks that it is a compile-time error if an optional named +/// parameter is declared as a constant typed variable. +/// @author msyabro + + +void f({const int x}) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main () { + f(1); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Functions/Formal_Parameters/declare_as_constant_t05.dart b/Language/Functions/Formal_Parameters/declare_as_constant_t05.dart index 9905443082..91b8b1c8af 100644 --- a/Language/Functions/Formal_Parameters/declare_as_constant_t05.dart +++ b/Language/Functions/Formal_Parameters/declare_as_constant_t05.dart @@ -1,19 +1,19 @@ -// 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 It is a compile-time error if a formal parameter is declared as -/// a constant variable. -/// @description Checks that it is a compile-time error if an optional positional -/// parameter is declared as a constant variable. -/// @author rodionov - - -void f([const x]) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main () { - f(1); -} +// 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 It is a compile-time error if a formal parameter is declared as +/// a constant variable. +/// @description Checks that it is a compile-time error if an optional positional +/// parameter is declared as a constant variable. +/// @author rodionov + + +void f([const x]) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main () { + f(1); +} diff --git a/Language/Functions/Formal_Parameters/declare_as_constant_t06.dart b/Language/Functions/Formal_Parameters/declare_as_constant_t06.dart index e2ece65791..b9be70644a 100644 --- a/Language/Functions/Formal_Parameters/declare_as_constant_t06.dart +++ b/Language/Functions/Formal_Parameters/declare_as_constant_t06.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if a formal parameter is declared as -/// a constant variable. -/// @description Checks that it is a compile-time error if an optional positional -/// parameter is declared as a constant typed variable. -/// @author rodionov - - -void f({const int x}) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main () { - f(1); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error if a formal parameter is declared as +/// a constant variable. +/// @description Checks that it is a compile-time error if an optional positional +/// parameter is declared as a constant typed variable. +/// @author rodionov + + +void f({const int x}) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main () { + f(1); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Functions/Formal_Parameters/syntax_t02.dart b/Language/Functions/Formal_Parameters/syntax_t02.dart index 46a90a4aea..5e1e98deda 100644 --- a/Language/Functions/Formal_Parameters/syntax_t02.dart +++ b/Language/Functions/Formal_Parameters/syntax_t02.dart @@ -1,42 +1,42 @@ -// 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 Every function includes a formal parameter list, which consists -/// of a list of required parameters, followed by any optional parameters. -/// The optional parameters may be specified either as a set of named parameters -/// or as a list of positional parameters, but not both. -/// formalParameterList: -/// '(' ')' | -/// '('normalFormalParameters(',' optionalFormalParameters)?')' | -/// '('optionalFormalParameters')' -/// ; -/// normalFormalParameters: -/// normalFormalParameter(',' normalFormalParameter)* -/// ; -/// optionalFormalParameters: -/// optionalPositionalFormalParameters | -/// namedFormalParameters -/// ; -/// optionalPositionalFormalParameters: -/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' -/// ; -/// namedFormalParameters: -/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' -/// ; -/// @description Checks that named parameters can't precede required positional -/// parameters. -/// @author msyabro - - -f({var a}, var b) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(1, 1); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Every function includes a formal parameter list, which consists +/// of a list of required parameters, followed by any optional parameters. +/// The optional parameters may be specified either as a set of named parameters +/// or as a list of positional parameters, but not both. +/// formalParameterList: +/// '(' ')' | +/// '('normalFormalParameters(',' optionalFormalParameters)?')' | +/// '('optionalFormalParameters')' +/// ; +/// normalFormalParameters: +/// normalFormalParameter(',' normalFormalParameter)* +/// ; +/// optionalFormalParameters: +/// optionalPositionalFormalParameters | +/// namedFormalParameters +/// ; +/// optionalPositionalFormalParameters: +/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' +/// ; +/// namedFormalParameters: +/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' +/// ; +/// @description Checks that named parameters can't precede required positional +/// parameters. +/// @author msyabro + + +f({var a}, var b) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(1, 1); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Functions/Formal_Parameters/syntax_t03.dart b/Language/Functions/Formal_Parameters/syntax_t03.dart index 075a2b7e1b..7b7e509e34 100644 --- a/Language/Functions/Formal_Parameters/syntax_t03.dart +++ b/Language/Functions/Formal_Parameters/syntax_t03.dart @@ -1,38 +1,38 @@ -// 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 Every function includes a formal parameter list, which consists -/// of a list of required parameters, followed by any optional parameters. -/// The optional parameters may be specified either as a set of named parameters -/// or as a list of positional parameters, but not both. -/// formalParameterList: -/// '(' ')' | -/// '('normalFormalParameters(',' optionalFormalParameters)?')' | -/// '('optionalFormalParameters')' -/// ; -/// normalFormalParameters: -/// normalFormalParameter(',' normalFormalParameter)* -/// ; -/// optionalFormalParameters: -/// optionalPositionalFormalParameters | -/// namedFormalParameters -/// ; -/// optionalPositionalFormalParameters: -/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' -/// ; -/// namedFormalParameters: -/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' -/// ; -/// @description Checks that parameter declarations must be separated by comma. -/// @author msyabro - - -void f(var p1 {var p2}) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main () { - f(1); -} +// 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 Every function includes a formal parameter list, which consists +/// of a list of required parameters, followed by any optional parameters. +/// The optional parameters may be specified either as a set of named parameters +/// or as a list of positional parameters, but not both. +/// formalParameterList: +/// '(' ')' | +/// '('normalFormalParameters(',' optionalFormalParameters)?')' | +/// '('optionalFormalParameters')' +/// ; +/// normalFormalParameters: +/// normalFormalParameter(',' normalFormalParameter)* +/// ; +/// optionalFormalParameters: +/// optionalPositionalFormalParameters | +/// namedFormalParameters +/// ; +/// optionalPositionalFormalParameters: +/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' +/// ; +/// namedFormalParameters: +/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' +/// ; +/// @description Checks that parameter declarations must be separated by comma. +/// @author msyabro + + +void f(var p1 {var p2}) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main () { + f(1); +} diff --git a/Language/Functions/Formal_Parameters/syntax_t04.dart b/Language/Functions/Formal_Parameters/syntax_t04.dart index 0ea41e956f..45e112aaf0 100644 --- a/Language/Functions/Formal_Parameters/syntax_t04.dart +++ b/Language/Functions/Formal_Parameters/syntax_t04.dart @@ -1,36 +1,36 @@ -// 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 Every function includes a formal parameter list, which consists -/// of a list of required parameters, followed by any optional parameters. -/// The optional parameters may be specified either as a set of named parameters -/// or as a list of positional parameters, but not both. -/// formalParameterList: -/// '(' ')' | -/// '('normalFormalParameters(',' optionalFormalParameters)?')' | -/// '('optionalFormalParameters')' -/// ; -/// normalFormalParameters: -/// normalFormalParameter(',' normalFormalParameter)* -/// ; -/// optionalFormalParameters: -/// optionalPositionalFormalParameters | -/// namedFormalParameters -/// ; -/// optionalPositionalFormalParameters: -/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' -/// ; -/// namedFormalParameters: -/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' -/// ; -/// @description Checks that the parameter list may end with a comma. -/// @author iefremov -/// @reviewer kaigorodov - - -void f(var p1, ) {} - -main () { - f(1); -} +// 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 Every function includes a formal parameter list, which consists +/// of a list of required parameters, followed by any optional parameters. +/// The optional parameters may be specified either as a set of named parameters +/// or as a list of positional parameters, but not both. +/// formalParameterList: +/// '(' ')' | +/// '('normalFormalParameters(',' optionalFormalParameters)?')' | +/// '('optionalFormalParameters')' +/// ; +/// normalFormalParameters: +/// normalFormalParameter(',' normalFormalParameter)* +/// ; +/// optionalFormalParameters: +/// optionalPositionalFormalParameters | +/// namedFormalParameters +/// ; +/// optionalPositionalFormalParameters: +/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' +/// ; +/// namedFormalParameters: +/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' +/// ; +/// @description Checks that the parameter list may end with a comma. +/// @author iefremov +/// @reviewer kaigorodov + + +void f(var p1, ) {} + +main () { + f(1); +} diff --git a/Language/Functions/Formal_Parameters/syntax_t05.dart b/Language/Functions/Formal_Parameters/syntax_t05.dart index 3f846747b9..dcfbaaf2de 100644 --- a/Language/Functions/Formal_Parameters/syntax_t05.dart +++ b/Language/Functions/Formal_Parameters/syntax_t05.dart @@ -1,35 +1,35 @@ -// 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 Every function includes a formal parameter list, which consists -/// of a list of required parameters, followed by any optional parameters. -/// The optional parameters may be specified either as a set of named parameters -/// or as a list of positional parameters, but not both. -/// formalParameterList: -/// '(' ')' | -/// '('normalFormalParameters(',' optionalFormalParameters)?')' | -/// '('optionalFormalParameters')' -/// ; -/// normalFormalParameters: -/// normalFormalParameter(',' normalFormalParameter)* -/// ; -/// optionalFormalParameters: -/// optionalPositionalFormalParameters | -/// namedFormalParameters -/// ; -/// optionalPositionalFormalParameters: -/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' -/// ; -/// namedFormalParameters: -/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' -/// ; -/// @description Checks that the named parameter list may end with a comma. -/// @author iefremov - - -void f({var p1, }) {} - -main () { - f(p1: 1); -} +// 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 Every function includes a formal parameter list, which consists +/// of a list of required parameters, followed by any optional parameters. +/// The optional parameters may be specified either as a set of named parameters +/// or as a list of positional parameters, but not both. +/// formalParameterList: +/// '(' ')' | +/// '('normalFormalParameters(',' optionalFormalParameters)?')' | +/// '('optionalFormalParameters')' +/// ; +/// normalFormalParameters: +/// normalFormalParameter(',' normalFormalParameter)* +/// ; +/// optionalFormalParameters: +/// optionalPositionalFormalParameters | +/// namedFormalParameters +/// ; +/// optionalPositionalFormalParameters: +/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' +/// ; +/// namedFormalParameters: +/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' +/// ; +/// @description Checks that the named parameter list may end with a comma. +/// @author iefremov + + +void f({var p1, }) {} + +main () { + f(p1: 1); +} diff --git a/Language/Functions/Formal_Parameters/syntax_t06.dart b/Language/Functions/Formal_Parameters/syntax_t06.dart index 5960a5c851..7a2d92b4eb 100644 --- a/Language/Functions/Formal_Parameters/syntax_t06.dart +++ b/Language/Functions/Formal_Parameters/syntax_t06.dart @@ -1,38 +1,38 @@ -// 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 Every function includes a formal parameter list, which consists -/// of a list of required parameters, followed by any optional parameters. -/// The optional parameters may be specified either as a set of named parameters -/// or as a list of positional parameters, but not both. -/// formalParameterList: -/// '(' ')' | -/// '('normalFormalParameters(',' optionalFormalParameters)?')' | -/// '('optionalFormalParameters')' -/// ; -/// normalFormalParameters: -/// normalFormalParameter(',' normalFormalParameter)* -/// ; -/// optionalFormalParameters: -/// optionalPositionalFormalParameters | -/// namedFormalParameters -/// ; -/// optionalPositionalFormalParameters: -/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' -/// ; -/// namedFormalParameters: -/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' -/// ; -/// @description Checks that the list of named parameters cannot be empty. -/// @author iefremov - - -void f({}) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main () { - f(); -} +// 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 Every function includes a formal parameter list, which consists +/// of a list of required parameters, followed by any optional parameters. +/// The optional parameters may be specified either as a set of named parameters +/// or as a list of positional parameters, but not both. +/// formalParameterList: +/// '(' ')' | +/// '('normalFormalParameters(',' optionalFormalParameters)?')' | +/// '('optionalFormalParameters')' +/// ; +/// normalFormalParameters: +/// normalFormalParameter(',' normalFormalParameter)* +/// ; +/// optionalFormalParameters: +/// optionalPositionalFormalParameters | +/// namedFormalParameters +/// ; +/// optionalPositionalFormalParameters: +/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' +/// ; +/// namedFormalParameters: +/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' +/// ; +/// @description Checks that the list of named parameters cannot be empty. +/// @author iefremov + + +void f({}) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main () { + f(); +} diff --git a/Language/Functions/Formal_Parameters/syntax_t07.dart b/Language/Functions/Formal_Parameters/syntax_t07.dart index 8fe305bd2a..aed1143eab 100644 --- a/Language/Functions/Formal_Parameters/syntax_t07.dart +++ b/Language/Functions/Formal_Parameters/syntax_t07.dart @@ -1,39 +1,39 @@ -// 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 Every function includes a formal parameter list, which consists -/// of a list of required parameters, followed by any optional parameters. -/// The optional parameters may be specified either as a set of named parameters -/// or as a list of positional parameters, but not both. -/// formalParameterList: -/// '(' ')' | -/// '('normalFormalParameters(',' optionalFormalParameters)?')' | -/// '('optionalFormalParameters')' -/// ; -/// normalFormalParameters: -/// normalFormalParameter(',' normalFormalParameter)* -/// ; -/// optionalFormalParameters: -/// optionalPositionalFormalParameters | -/// namedFormalParameters -/// ; -/// optionalPositionalFormalParameters: -/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' -/// ; -/// namedFormalParameters: -/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' -/// ; -/// @description Checks that the list of named parameters must end with a closing -/// curly brace. -/// @author iefremov - - -void f({) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main () { - f(); -} +// 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 Every function includes a formal parameter list, which consists +/// of a list of required parameters, followed by any optional parameters. +/// The optional parameters may be specified either as a set of named parameters +/// or as a list of positional parameters, but not both. +/// formalParameterList: +/// '(' ')' | +/// '('normalFormalParameters(',' optionalFormalParameters)?')' | +/// '('optionalFormalParameters')' +/// ; +/// normalFormalParameters: +/// normalFormalParameter(',' normalFormalParameter)* +/// ; +/// optionalFormalParameters: +/// optionalPositionalFormalParameters | +/// namedFormalParameters +/// ; +/// optionalPositionalFormalParameters: +/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' +/// ; +/// namedFormalParameters: +/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' +/// ; +/// @description Checks that the list of named parameters must end with a closing +/// curly brace. +/// @author iefremov + + +void f({) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main () { + f(); +} diff --git a/Language/Functions/Formal_Parameters/syntax_t08.dart b/Language/Functions/Formal_Parameters/syntax_t08.dart index 7832afcbd4..a1dd1e2ccb 100644 --- a/Language/Functions/Formal_Parameters/syntax_t08.dart +++ b/Language/Functions/Formal_Parameters/syntax_t08.dart @@ -1,41 +1,41 @@ -// 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 Every function includes a formal parameter list, which consists -/// of a list of required parameters, followed by any optional parameters. -/// The optional parameters may be specified either as a set of named parameters -/// or as a list of positional parameters, but not both. -/// formalParameterList: -/// '(' ')' | -/// '('normalFormalParameters(',' optionalFormalParameters)?')' | -/// '('optionalFormalParameters')' -/// ; -/// normalFormalParameters: -/// normalFormalParameter(',' normalFormalParameter)* -/// ; -/// optionalFormalParameters: -/// optionalPositionalFormalParameters | -/// namedFormalParameters -/// ; -/// optionalPositionalFormalParameters: -/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' -/// ; -/// namedFormalParameters: -/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' -/// ; -/// @description Checks that the named parameter list must begin with an opening -/// curly brace. -/// @author iefremov - - -void f(}) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main () { - f(); -// ^ -// [analyzer] unspecified -} +// 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 Every function includes a formal parameter list, which consists +/// of a list of required parameters, followed by any optional parameters. +/// The optional parameters may be specified either as a set of named parameters +/// or as a list of positional parameters, but not both. +/// formalParameterList: +/// '(' ')' | +/// '('normalFormalParameters(',' optionalFormalParameters)?')' | +/// '('optionalFormalParameters')' +/// ; +/// normalFormalParameters: +/// normalFormalParameter(',' normalFormalParameter)* +/// ; +/// optionalFormalParameters: +/// optionalPositionalFormalParameters | +/// namedFormalParameters +/// ; +/// optionalPositionalFormalParameters: +/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' +/// ; +/// namedFormalParameters: +/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' +/// ; +/// @description Checks that the named parameter list must begin with an opening +/// curly brace. +/// @author iefremov + + +void f(}) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main () { + f(); +// ^ +// [analyzer] unspecified +} diff --git a/Language/Functions/Formal_Parameters/syntax_t09.dart b/Language/Functions/Formal_Parameters/syntax_t09.dart index e0a01ad7e3..47999df59e 100644 --- a/Language/Functions/Formal_Parameters/syntax_t09.dart +++ b/Language/Functions/Formal_Parameters/syntax_t09.dart @@ -1,42 +1,42 @@ -// 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 Every function includes a formal parameter list, which consists -/// of a list of required parameters, followed by any optional parameters. -/// The optional parameters may be specified either as a set of named parameters -/// or as a list of positional parameters, but not both. -/// formalParameterList: -/// '(' ')' | -/// '('normalFormalParameters(',' optionalFormalParameters)?')' | -/// '('optionalFormalParameters')' -/// ; -/// normalFormalParameters: -/// normalFormalParameter(',' normalFormalParameter)* -/// ; -/// optionalFormalParameters: -/// optionalPositionalFormalParameters | -/// namedFormalParameters -/// ; -/// optionalPositionalFormalParameters: -/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' -/// ; -/// namedFormalParameters: -/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' -/// ; -/// @description Checks that optional positional parameters can't precede -/// required parameters. -/// @author rodionov - - -f([var a], var b) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(1, 1); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Every function includes a formal parameter list, which consists +/// of a list of required parameters, followed by any optional parameters. +/// The optional parameters may be specified either as a set of named parameters +/// or as a list of positional parameters, but not both. +/// formalParameterList: +/// '(' ')' | +/// '('normalFormalParameters(',' optionalFormalParameters)?')' | +/// '('optionalFormalParameters')' +/// ; +/// normalFormalParameters: +/// normalFormalParameter(',' normalFormalParameter)* +/// ; +/// optionalFormalParameters: +/// optionalPositionalFormalParameters | +/// namedFormalParameters +/// ; +/// optionalPositionalFormalParameters: +/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' +/// ; +/// namedFormalParameters: +/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' +/// ; +/// @description Checks that optional positional parameters can't precede +/// required parameters. +/// @author rodionov + + +f([var a], var b) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(1, 1); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Functions/Formal_Parameters/syntax_t10.dart b/Language/Functions/Formal_Parameters/syntax_t10.dart index 5a4d21d150..6f4dedc320 100644 --- a/Language/Functions/Formal_Parameters/syntax_t10.dart +++ b/Language/Functions/Formal_Parameters/syntax_t10.dart @@ -1,38 +1,38 @@ -// 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 Every function includes a formal parameter list, which consists -/// of a list of required parameters, followed by any optional parameters. -/// The optional parameters may be specified either as a set of named parameters -/// or as a list of positional parameters, but not both. -/// formalParameterList: -/// '(' ')' | -/// '('normalFormalParameters(',' optionalFormalParameters)?')' | -/// '('optionalFormalParameters')' -/// ; -/// normalFormalParameters: -/// normalFormalParameter(',' normalFormalParameter)* -/// ; -/// optionalFormalParameters: -/// optionalPositionalFormalParameters | -/// namedFormalParameters -/// ; -/// optionalPositionalFormalParameters: -/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' -/// ; -/// namedFormalParameters: -/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' -/// ; -/// @description Checks that parameter declarations must be separated by comma. -/// @author rodionov - - -void f(var p1 [var p2]) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main () { - f(1); -} +// 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 Every function includes a formal parameter list, which consists +/// of a list of required parameters, followed by any optional parameters. +/// The optional parameters may be specified either as a set of named parameters +/// or as a list of positional parameters, but not both. +/// formalParameterList: +/// '(' ')' | +/// '('normalFormalParameters(',' optionalFormalParameters)?')' | +/// '('optionalFormalParameters')' +/// ; +/// normalFormalParameters: +/// normalFormalParameter(',' normalFormalParameter)* +/// ; +/// optionalFormalParameters: +/// optionalPositionalFormalParameters | +/// namedFormalParameters +/// ; +/// optionalPositionalFormalParameters: +/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' +/// ; +/// namedFormalParameters: +/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' +/// ; +/// @description Checks that parameter declarations must be separated by comma. +/// @author rodionov + + +void f(var p1 [var p2]) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main () { + f(1); +} diff --git a/Language/Functions/Formal_Parameters/syntax_t12.dart b/Language/Functions/Formal_Parameters/syntax_t12.dart index 480d175dd2..6d1d600f94 100644 --- a/Language/Functions/Formal_Parameters/syntax_t12.dart +++ b/Language/Functions/Formal_Parameters/syntax_t12.dart @@ -1,36 +1,36 @@ -// 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 Every function includes a formal parameter list, which consists -/// of a list of required parameters, followed by any optional parameters. -/// The optional parameters may be specified either as a set of named parameters -/// or as a list of positional parameters, but not both. -/// formalParameterList: -/// '(' ')' | -/// '('normalFormalParameters(',' optionalFormalParameters)?')' | -/// '('optionalFormalParameters')' -/// ; -/// normalFormalParameters: -/// normalFormalParameter(',' normalFormalParameter)* -/// ; -/// optionalFormalParameters: -/// optionalPositionalFormalParameters | -/// namedFormalParameters -/// ; -/// optionalPositionalFormalParameters: -/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' -/// ; -/// namedFormalParameters: -/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' -/// ; -/// @description Checks that the optional positional parameter list may end -/// with a comma. -/// @author rodionov - - -void f([var p1, ]) {} - -main () { - f(1); -} +// 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 Every function includes a formal parameter list, which consists +/// of a list of required parameters, followed by any optional parameters. +/// The optional parameters may be specified either as a set of named parameters +/// or as a list of positional parameters, but not both. +/// formalParameterList: +/// '(' ')' | +/// '('normalFormalParameters(',' optionalFormalParameters)?')' | +/// '('optionalFormalParameters')' +/// ; +/// normalFormalParameters: +/// normalFormalParameter(',' normalFormalParameter)* +/// ; +/// optionalFormalParameters: +/// optionalPositionalFormalParameters | +/// namedFormalParameters +/// ; +/// optionalPositionalFormalParameters: +/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' +/// ; +/// namedFormalParameters: +/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' +/// ; +/// @description Checks that the optional positional parameter list may end +/// with a comma. +/// @author rodionov + + +void f([var p1, ]) {} + +main () { + f(1); +} diff --git a/Language/Functions/Formal_Parameters/syntax_t13.dart b/Language/Functions/Formal_Parameters/syntax_t13.dart index f8d3e2987e..99a44e4bb3 100644 --- a/Language/Functions/Formal_Parameters/syntax_t13.dart +++ b/Language/Functions/Formal_Parameters/syntax_t13.dart @@ -1,39 +1,39 @@ -// 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 Every function includes a formal parameter list, which consists -/// of a list of required parameters, followed by any optional parameters. -/// The optional parameters may be specified either as a set of named parameters -/// or as a list of positional parameters, but not both. -/// formalParameterList: -/// '(' ')' | -/// '('normalFormalParameters(',' optionalFormalParameters)?')' | -/// '('optionalFormalParameters')' -/// ; -/// normalFormalParameters: -/// normalFormalParameter(',' normalFormalParameter)* -/// ; -/// optionalFormalParameters: -/// optionalPositionalFormalParameters | -/// namedFormalParameters -/// ; -/// optionalPositionalFormalParameters: -/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' -/// ; -/// namedFormalParameters: -/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' -/// ; -/// @description Checks that the list of optional positional parameters cannot -/// be empty. -/// @author rodionov - - -void f([]) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main () { - f(); -} +// 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 Every function includes a formal parameter list, which consists +/// of a list of required parameters, followed by any optional parameters. +/// The optional parameters may be specified either as a set of named parameters +/// or as a list of positional parameters, but not both. +/// formalParameterList: +/// '(' ')' | +/// '('normalFormalParameters(',' optionalFormalParameters)?')' | +/// '('optionalFormalParameters')' +/// ; +/// normalFormalParameters: +/// normalFormalParameter(',' normalFormalParameter)* +/// ; +/// optionalFormalParameters: +/// optionalPositionalFormalParameters | +/// namedFormalParameters +/// ; +/// optionalPositionalFormalParameters: +/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' +/// ; +/// namedFormalParameters: +/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' +/// ; +/// @description Checks that the list of optional positional parameters cannot +/// be empty. +/// @author rodionov + + +void f([]) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main () { + f(); +} diff --git a/Language/Functions/Formal_Parameters/syntax_t14.dart b/Language/Functions/Formal_Parameters/syntax_t14.dart index 9f0259081c..ac54522c1e 100644 --- a/Language/Functions/Formal_Parameters/syntax_t14.dart +++ b/Language/Functions/Formal_Parameters/syntax_t14.dart @@ -1,39 +1,39 @@ -// 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 Every function includes a formal parameter list, which consists -/// of a list of required parameters, followed by any optional parameters. -/// The optional parameters may be specified either as a set of named parameters -/// or as a list of positional parameters, but not both. -/// formalParameterList: -/// '(' ')' | -/// '('normalFormalParameters(',' optionalFormalParameters)?')' | -/// '('optionalFormalParameters')' -/// ; -/// normalFormalParameters: -/// normalFormalParameter(',' normalFormalParameter)* -/// ; -/// optionalFormalParameters: -/// optionalPositionalFormalParameters | -/// namedFormalParameters -/// ; -/// optionalPositionalFormalParameters: -/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' -/// ; -/// namedFormalParameters: -/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' -/// ; -/// @description Checks that the list of optional positional parameters must end -/// with a closing square bracket. -/// @author rodionov - - -void f([) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main () { - f(); -} +// 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 Every function includes a formal parameter list, which consists +/// of a list of required parameters, followed by any optional parameters. +/// The optional parameters may be specified either as a set of named parameters +/// or as a list of positional parameters, but not both. +/// formalParameterList: +/// '(' ')' | +/// '('normalFormalParameters(',' optionalFormalParameters)?')' | +/// '('optionalFormalParameters')' +/// ; +/// normalFormalParameters: +/// normalFormalParameter(',' normalFormalParameter)* +/// ; +/// optionalFormalParameters: +/// optionalPositionalFormalParameters | +/// namedFormalParameters +/// ; +/// optionalPositionalFormalParameters: +/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' +/// ; +/// namedFormalParameters: +/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' +/// ; +/// @description Checks that the list of optional positional parameters must end +/// with a closing square bracket. +/// @author rodionov + + +void f([) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main () { + f(); +} diff --git a/Language/Functions/Formal_Parameters/syntax_t15.dart b/Language/Functions/Formal_Parameters/syntax_t15.dart index 9c8fe807fd..cbaa237bb0 100644 --- a/Language/Functions/Formal_Parameters/syntax_t15.dart +++ b/Language/Functions/Formal_Parameters/syntax_t15.dart @@ -1,41 +1,41 @@ -// 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 Every function includes a formal parameter list, which consists -/// of a list of required parameters, followed by any optional parameters. -/// The optional parameters may be specified either as a set of named parameters -/// or as a list of positional parameters, but not both. -/// formalParameterList: -/// '(' ')' | -/// '('normalFormalParameters(',' optionalFormalParameters)?')' | -/// '('optionalFormalParameters')' -/// ; -/// normalFormalParameters: -/// normalFormalParameter(',' normalFormalParameter)* -/// ; -/// optionalFormalParameters: -/// optionalPositionalFormalParameters | -/// namedFormalParameters -/// ; -/// optionalPositionalFormalParameters: -/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' -/// ; -/// namedFormalParameters: -/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' -/// ; -/// @description Checks that the optional positional parameter list must begin -/// with an opening square bracket. -/// @author rodionov - - -void f(]) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main () { - f(); -// ^ -// [analyzer] unspecified -} +// 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 Every function includes a formal parameter list, which consists +/// of a list of required parameters, followed by any optional parameters. +/// The optional parameters may be specified either as a set of named parameters +/// or as a list of positional parameters, but not both. +/// formalParameterList: +/// '(' ')' | +/// '('normalFormalParameters(',' optionalFormalParameters)?')' | +/// '('optionalFormalParameters')' +/// ; +/// normalFormalParameters: +/// normalFormalParameter(',' normalFormalParameter)* +/// ; +/// optionalFormalParameters: +/// optionalPositionalFormalParameters | +/// namedFormalParameters +/// ; +/// optionalPositionalFormalParameters: +/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' +/// ; +/// namedFormalParameters: +/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' +/// ; +/// @description Checks that the optional positional parameter list must begin +/// with an opening square bracket. +/// @author rodionov + + +void f(]) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main () { + f(); +// ^ +// [analyzer] unspecified +} diff --git a/Language/Functions/Formal_Parameters/syntax_t16.dart b/Language/Functions/Formal_Parameters/syntax_t16.dart index 909b55be57..ba1da5bc85 100644 --- a/Language/Functions/Formal_Parameters/syntax_t16.dart +++ b/Language/Functions/Formal_Parameters/syntax_t16.dart @@ -1,39 +1,39 @@ -// 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 Every function includes a formal parameter list, which consists -/// of a list of required parameters, followed by any optional parameters. -/// The optional parameters may be specified either as a set of named parameters -/// or as a list of positional parameters, but not both. -/// formalParameterList: -/// '(' ')' | -/// '('normalFormalParameters(',' optionalFormalParameters)?')' | -/// '('optionalFormalParameters')' -/// ; -/// normalFormalParameters: -/// normalFormalParameter(',' normalFormalParameter)* -/// ; -/// optionalFormalParameters: -/// optionalPositionalFormalParameters | -/// namedFormalParameters -/// ; -/// optionalPositionalFormalParameters: -/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' -/// ; -/// namedFormalParameters: -/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' -/// ; -/// @description Checks that it is a compile-time error when both named and -/// optional positional parameters are present in one function declaration. -/// @author rodionov - - -void f(var a, [var b], {var c}) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main () { - f(1); -} +// 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 Every function includes a formal parameter list, which consists +/// of a list of required parameters, followed by any optional parameters. +/// The optional parameters may be specified either as a set of named parameters +/// or as a list of positional parameters, but not both. +/// formalParameterList: +/// '(' ')' | +/// '('normalFormalParameters(',' optionalFormalParameters)?')' | +/// '('optionalFormalParameters')' +/// ; +/// normalFormalParameters: +/// normalFormalParameter(',' normalFormalParameter)* +/// ; +/// optionalFormalParameters: +/// optionalPositionalFormalParameters | +/// namedFormalParameters +/// ; +/// optionalPositionalFormalParameters: +/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' +/// ; +/// namedFormalParameters: +/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' +/// ; +/// @description Checks that it is a compile-time error when both named and +/// optional positional parameters are present in one function declaration. +/// @author rodionov + + +void f(var a, [var b], {var c}) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main () { + f(1); +} diff --git a/Language/Functions/Formal_Parameters/syntax_t17.dart b/Language/Functions/Formal_Parameters/syntax_t17.dart index fa086acabd..138c567d33 100644 --- a/Language/Functions/Formal_Parameters/syntax_t17.dart +++ b/Language/Functions/Formal_Parameters/syntax_t17.dart @@ -1,39 +1,39 @@ -// 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 Every function includes a formal parameter list, which consists -/// of a list of required parameters, followed by any optional parameters. -/// The optional parameters may be specified either as a set of named parameters -/// or as a list of positional parameters, but not both. -/// formalParameterList: -/// '(' ')' | -/// '('normalFormalParameters(',' optionalFormalParameters)?')' | -/// '('optionalFormalParameters')' -/// ; -/// normalFormalParameters: -/// normalFormalParameter(',' normalFormalParameter)* -/// ; -/// optionalFormalParameters: -/// optionalPositionalFormalParameters | -/// namedFormalParameters -/// ; -/// optionalPositionalFormalParameters: -/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' -/// ; -/// namedFormalParameters: -/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' -/// ; -/// @description Checks that it is a compile-time error when both named and -/// optional positional parameters are present in one function declaration. -/// @author rodionov - - -void f(var a, {var b}, [var c]) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main () { - f(1); -} +// 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 Every function includes a formal parameter list, which consists +/// of a list of required parameters, followed by any optional parameters. +/// The optional parameters may be specified either as a set of named parameters +/// or as a list of positional parameters, but not both. +/// formalParameterList: +/// '(' ')' | +/// '('normalFormalParameters(',' optionalFormalParameters)?')' | +/// '('optionalFormalParameters')' +/// ; +/// normalFormalParameters: +/// normalFormalParameter(',' normalFormalParameter)* +/// ; +/// optionalFormalParameters: +/// optionalPositionalFormalParameters | +/// namedFormalParameters +/// ; +/// optionalPositionalFormalParameters: +/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' +/// ; +/// namedFormalParameters: +/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' +/// ; +/// @description Checks that it is a compile-time error when both named and +/// optional positional parameters are present in one function declaration. +/// @author rodionov + + +void f(var a, {var b}, [var c]) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main () { + f(1); +} diff --git a/Language/Functions/Formal_Parameters/syntax_t20.dart b/Language/Functions/Formal_Parameters/syntax_t20.dart index 6c55c5fb2a..0749769ce4 100644 --- a/Language/Functions/Formal_Parameters/syntax_t20.dart +++ b/Language/Functions/Formal_Parameters/syntax_t20.dart @@ -1,42 +1,42 @@ -// 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 Every function includes a formal parameter list, which consists -/// of a list of required parameters, followed by any optional parameters. -/// The optional parameters may be specified either as a set of named parameters -/// or as a list of positional parameters, but not both. -/// formalParameterList: -/// '(' ')' | -/// '('normalFormalParameters(',' optionalFormalParameters)?')' | -/// '('optionalFormalParameters')' -/// ; -/// normalFormalParameters: -/// normalFormalParameter(',' normalFormalParameter)* -/// ; -/// optionalFormalParameters: -/// optionalPositionalFormalParameters | -/// namedFormalParameters -/// ; -/// optionalPositionalFormalParameters: -/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' -/// ; -/// namedFormalParameters: -/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' -/// ; -/// @description Checks that it is a compile-time error when more than one set -/// of named parameters is present in one function declaration. -/// @author rodionov - - -void f(var a, {var b}, {var c}) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main () { - f(1, 2, 3); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Every function includes a formal parameter list, which consists +/// of a list of required parameters, followed by any optional parameters. +/// The optional parameters may be specified either as a set of named parameters +/// or as a list of positional parameters, but not both. +/// formalParameterList: +/// '(' ')' | +/// '('normalFormalParameters(',' optionalFormalParameters)?')' | +/// '('optionalFormalParameters')' +/// ; +/// normalFormalParameters: +/// normalFormalParameter(',' normalFormalParameter)* +/// ; +/// optionalFormalParameters: +/// optionalPositionalFormalParameters | +/// namedFormalParameters +/// ; +/// optionalPositionalFormalParameters: +/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' +/// ; +/// namedFormalParameters: +/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' +/// ; +/// @description Checks that it is a compile-time error when more than one set +/// of named parameters is present in one function declaration. +/// @author rodionov + + +void f(var a, {var b}, {var c}) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main () { + f(1, 2, 3); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Functions/Formal_Parameters/syntax_t21.dart b/Language/Functions/Formal_Parameters/syntax_t21.dart index c4ff49cdbe..7c329c3fb5 100644 --- a/Language/Functions/Formal_Parameters/syntax_t21.dart +++ b/Language/Functions/Formal_Parameters/syntax_t21.dart @@ -1,42 +1,42 @@ -// 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 Every function includes a formal parameter list, which consists -/// of a list of required parameters, followed by any optional parameters. -/// The optional parameters may be specified either as a set of named parameters -/// or as a list of positional parameters, but not both. -/// formalParameterList: -/// '(' ')' | -/// '('normalFormalParameters(',' optionalFormalParameters)?')' | -/// '('optionalFormalParameters')' -/// ; -/// normalFormalParameters: -/// normalFormalParameter(',' normalFormalParameter)* -/// ; -/// optionalFormalParameters: -/// optionalPositionalFormalParameters | -/// namedFormalParameters -/// ; -/// optionalPositionalFormalParameters: -/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' -/// ; -/// namedFormalParameters: -/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' -/// ; -/// @description Checks that it is a compile-time error when more than one set -/// of optional positional parameters is present in one function declaration. -/// @author rodionov - - -void f(var a, [var b], [var c]) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main () { - f(1, 2, 3); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Every function includes a formal parameter list, which consists +/// of a list of required parameters, followed by any optional parameters. +/// The optional parameters may be specified either as a set of named parameters +/// or as a list of positional parameters, but not both. +/// formalParameterList: +/// '(' ')' | +/// '('normalFormalParameters(',' optionalFormalParameters)?')' | +/// '('optionalFormalParameters')' +/// ; +/// normalFormalParameters: +/// normalFormalParameter(',' normalFormalParameter)* +/// ; +/// optionalFormalParameters: +/// optionalPositionalFormalParameters | +/// namedFormalParameters +/// ; +/// optionalPositionalFormalParameters: +/// `['defaultFormalParameter(`,' defaultFormalParameter)*`]' +/// ; +/// namedFormalParameters: +/// `{'defaultNamedParameter(`,' defaultNamedParameter)*`}' +/// ; +/// @description Checks that it is a compile-time error when more than one set +/// of optional positional parameters is present in one function declaration. +/// @author rodionov + + +void f(var a, [var b], [var c]) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main () { + f(1, 2, 3); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Functions/Function_Declarations/static_preface_t01.dart b/Language/Functions/Function_Declarations/static_preface_t01.dart index 5c60ff72e5..1c21aaf4c3 100644 --- a/Language/Functions/Function_Declarations/static_preface_t01.dart +++ b/Language/Functions/Function_Declarations/static_preface_t01.dart @@ -1,19 +1,19 @@ -// 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 It is a compile-time error to preface a function declaration with -/// the built-in identifier static. -/// -/// @description Checks that it is a compile-time error to preface a library -/// function declaration with 'static'. -/// @author msyabro - - static void f() {} -//^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(); -} +// 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 It is a compile-time error to preface a function declaration with +/// the built-in identifier static. +/// +/// @description Checks that it is a compile-time error to preface a library +/// function declaration with 'static'. +/// @author msyabro + + static void f() {} +//^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(); +} diff --git a/Language/Functions/Function_Declarations/static_preface_t02.dart b/Language/Functions/Function_Declarations/static_preface_t02.dart index 44cc39ad69..e438183c42 100644 --- a/Language/Functions/Function_Declarations/static_preface_t02.dart +++ b/Language/Functions/Function_Declarations/static_preface_t02.dart @@ -1,17 +1,17 @@ -// 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 It is a compile-time error to preface a function declaration with -/// the built-in identifier static. -/// -/// @description Checks that it is a compile-time error to preface a local -/// function declaration with 'static'. -/// @author msyabro - -main() { - static void f() {} -//^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error to preface a function declaration with +/// the built-in identifier static. +/// +/// @description Checks that it is a compile-time error to preface a local +/// function declaration with 'static'. +/// @author msyabro + +main() { + static void f() {} +//^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Functions/syntax_t05.dart b/Language/Functions/syntax_t05.dart index aa37ee802e..3fe2ba10b0 100644 --- a/Language/Functions/syntax_t05.dart +++ b/Language/Functions/syntax_t05.dart @@ -1,33 +1,33 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that it is a compile error if a function -/// does not have formalParameterList -/// -/// @author msyabro - - -int function1 {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - function1(); -} +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that it is a compile error if a function +/// does not have formalParameterList +/// +/// @author msyabro + + +int function1 {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + function1(); +} diff --git a/Language/Functions/syntax_t06.dart b/Language/Functions/syntax_t06.dart index 7e54bfa3df..97ba0bec3c 100644 --- a/Language/Functions/syntax_t06.dart +++ b/Language/Functions/syntax_t06.dart @@ -1,34 +1,34 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that it is a compile error if a block of a function body -/// isn't closed -/// -/// @author msyabro - - -main() { - function(); -} - -function() { -// ^ -// [cfe] unspecified -// [error line 34, column 0] +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that it is a compile error if a block of a function body +/// isn't closed +/// +/// @author msyabro + + +main() { + function(); +} + +function() { +// ^ +// [cfe] unspecified +// [error line 34, column 0] // [analyzer] unspecified \ No newline at end of file diff --git a/Language/Functions/syntax_t07.dart b/Language/Functions/syntax_t07.dart index d0a38679c2..ef67eca832 100644 --- a/Language/Functions/syntax_t07.dart +++ b/Language/Functions/syntax_t07.dart @@ -1,33 +1,33 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that it is a compile error if a block of a -/// function body isn't opened -/// -/// @author msyabro - - -main() { - function(); -} - -function() } -// ^ -// [analyzer] unspecified -// [cfe] unspecified +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that it is a compile error if a block of a +/// function body isn't opened +/// +/// @author msyabro + + +main() { + function(); +} + +function() } +// ^ +// [analyzer] unspecified +// [cfe] unspecified diff --git a/Language/Functions/syntax_t08.dart b/Language/Functions/syntax_t08.dart index 8e1ff62516..a591ab0278 100644 --- a/Language/Functions/syntax_t08.dart +++ b/Language/Functions/syntax_t08.dart @@ -1,33 +1,33 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that it is a compile error if a statement of a -/// function body isn't enclosed in a block -/// -/// @author msyabro - - -main() { - f(); -} - -f() return 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that it is a compile error if a statement of a +/// function body isn't enclosed in a block +/// +/// @author msyabro + + +main() { + f(); +} + +f() return 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified diff --git a/Language/Functions/syntax_t09.dart b/Language/Functions/syntax_t09.dart index 6e9fb643c8..b3e42144d8 100644 --- a/Language/Functions/syntax_t09.dart +++ b/Language/Functions/syntax_t09.dart @@ -1,35 +1,35 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that it is a compile error if the function body of the -/// form ['=>' expression ';'] isn't terminated with semicolon -/// -/// @author msyabro - - -main() { - f(); -} - -int f() => 1 -// ^ -// [analyzer] unspecified -// [cfe] unspecified -// [error line 35, column 0] +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that it is a compile error if the function body of the +/// form ['=>' expression ';'] isn't terminated with semicolon +/// +/// @author msyabro + + +main() { + f(); +} + +int f() => 1 +// ^ +// [analyzer] unspecified +// [cfe] unspecified +// [error line 35, column 0] // [cfe] unspecified \ No newline at end of file diff --git a/Language/Functions/syntax_t10.dart b/Language/Functions/syntax_t10.dart index ec435c6627..4dc98859b6 100644 --- a/Language/Functions/syntax_t10.dart +++ b/Language/Functions/syntax_t10.dart @@ -1,33 +1,33 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that expression is necessary in the form -/// ['=>' expression ';'] -/// -/// @author msyabro - - -void f() => ; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(); -} +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that expression is necessary in the form +/// ['=>' expression ';'] +/// +/// @author msyabro + + +void f() => ; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(); +} diff --git a/Language/Functions/syntax_t12.dart b/Language/Functions/syntax_t12.dart index 942ea5e637..cabae994a8 100644 --- a/Language/Functions/syntax_t12.dart +++ b/Language/Functions/syntax_t12.dart @@ -1,33 +1,33 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that the block statement can't be a body of a function of -/// the form [functionSignature '=>' expression ';']. -/// -/// @author msyabro - - -f() => { 1 + 1; 2 + 2; }; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(); -} +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that the block statement can't be a body of a function of +/// the form [functionSignature '=>' expression ';']. +/// +/// @author msyabro + + +f() => { 1 + 1; 2 + 2; }; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(); +} diff --git a/Language/Functions/syntax_t13.dart b/Language/Functions/syntax_t13.dart index aa4bd754c0..3cabd013fa 100644 --- a/Language/Functions/syntax_t13.dart +++ b/Language/Functions/syntax_t13.dart @@ -1,32 +1,32 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// @description Checks that the variable declaration statement can't be -/// a body of a function of the form [functionSignature '=>' expression ';']. -/// -/// @author msyabro - - -f(var y) => int x; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -} +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// @description Checks that the variable declaration statement can't be +/// a body of a function of the form [functionSignature '=>' expression ';']. +/// +/// @author msyabro + + +f(var y) => int x; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +} diff --git a/Language/Functions/syntax_t14.dart b/Language/Functions/syntax_t14.dart index c8ea3d240d..11059fcef1 100644 --- a/Language/Functions/syntax_t14.dart +++ b/Language/Functions/syntax_t14.dart @@ -1,33 +1,33 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that the if statement can't be a body of a function of -/// the form [functionSignature '=>' expression ';']. -/// -/// @author msyabro - - -f() => if (1 > 0) 1 else 2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(); -} +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that the if statement can't be a body of a function of +/// the form [functionSignature '=>' expression ';']. +/// +/// @author msyabro + + +f() => if (1 > 0) 1 else 2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(); +} diff --git a/Language/Functions/syntax_t15.dart b/Language/Functions/syntax_t15.dart index f57f796952..4e2d99d6d5 100644 --- a/Language/Functions/syntax_t15.dart +++ b/Language/Functions/syntax_t15.dart @@ -1,33 +1,33 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that the for statement can't be a body of a function of -/// the form [functionSignature '=>' expression ';']. -/// -/// @author msyabro - - -f() => for (int i = 0; i < 100; i++); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(); -} +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that the for statement can't be a body of a function of +/// the form [functionSignature '=>' expression ';']. +/// +/// @author msyabro + + +f() => for (int i = 0; i < 100; i++); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(); +} diff --git a/Language/Functions/syntax_t16.dart b/Language/Functions/syntax_t16.dart index b84a3b1df2..77186e580e 100644 --- a/Language/Functions/syntax_t16.dart +++ b/Language/Functions/syntax_t16.dart @@ -1,33 +1,33 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that the foreach statement can't be a body of -/// a function of the form [functionSignature '=>' expression ';']. -/// -/// @author msyabro - - -f() => for (var i in [1,2,3]); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(); -} +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that the foreach statement can't be a body of +/// a function of the form [functionSignature '=>' expression ';']. +/// +/// @author msyabro + + +f() => for (var i in [1,2,3]); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(); +} diff --git a/Language/Functions/syntax_t17.dart b/Language/Functions/syntax_t17.dart index 8d8a7807a2..a684de900c 100644 --- a/Language/Functions/syntax_t17.dart +++ b/Language/Functions/syntax_t17.dart @@ -1,33 +1,33 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that the while statement can't be a body of -/// a function of the form [functionSignature '=>' expression ';']. -/// -/// @author msyabro - - -f() => while (true); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(); -} +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that the while statement can't be a body of +/// a function of the form [functionSignature '=>' expression ';']. +/// +/// @author msyabro + + +f() => while (true); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(); +} diff --git a/Language/Functions/syntax_t18.dart b/Language/Functions/syntax_t18.dart index 196363a18a..bfdd1787b6 100644 --- a/Language/Functions/syntax_t18.dart +++ b/Language/Functions/syntax_t18.dart @@ -1,33 +1,33 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that the do statement can't be a body of a function of -/// the form [functionSignature '=>' expression ';']. -/// -/// @author msyabro - - -f() => do {1 + 1;} while (true); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(); -} +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that the do statement can't be a body of a function of +/// the form [functionSignature '=>' expression ';']. +/// +/// @author msyabro + + +f() => do {1 + 1;} while (true); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(); +} diff --git a/Language/Functions/syntax_t19.dart b/Language/Functions/syntax_t19.dart index 99e8f478df..d02a82f10e 100644 --- a/Language/Functions/syntax_t19.dart +++ b/Language/Functions/syntax_t19.dart @@ -1,33 +1,33 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that the switch statement can't be a body of a function -/// of the form [functionSignature '=>' expression ';']. -/// -/// @author msyabro - - -f() => switch (1 + 1) { case 1: false; case 2: true; default: false; }; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(); -} +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that the switch statement can't be a body of a function +/// of the form [functionSignature '=>' expression ';']. +/// +/// @author msyabro + + +f() => switch (1 + 1) { case 1: false; case 2: true; default: false; }; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(); +} diff --git a/Language/Functions/syntax_t20.dart b/Language/Functions/syntax_t20.dart index 5ed09a3b6e..65d4ba85c7 100644 --- a/Language/Functions/syntax_t20.dart +++ b/Language/Functions/syntax_t20.dart @@ -1,33 +1,33 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that the try statement can't be a body of a function of -/// the form [functionSignature '=>' expression ';']. -/// -/// @author msyabro - - -f() => try { 1 + 1; } catch (e) {}; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(); -} +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that the try statement can't be a body of a function of +/// the form [functionSignature '=>' expression ';']. +/// +/// @author msyabro + + +f() => try { 1 + 1; } catch (e) {}; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(); +} diff --git a/Language/Functions/syntax_t21.dart b/Language/Functions/syntax_t21.dart index 159a9e2f52..1cafd2c8ab 100644 --- a/Language/Functions/syntax_t21.dart +++ b/Language/Functions/syntax_t21.dart @@ -1,33 +1,33 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that the return statement can't be a body of a function -/// of the form [functionSignature '=>' expression ';']. -/// -/// @author msyabro - - -f() => return 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(); -} +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that the return statement can't be a body of a function +/// of the form [functionSignature '=>' expression ';']. +/// +/// @author msyabro + + +f() => return 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(); +} diff --git a/Language/Functions/syntax_t23.dart b/Language/Functions/syntax_t23.dart index fc0817df4f..bfda4bbd07 100644 --- a/Language/Functions/syntax_t23.dart +++ b/Language/Functions/syntax_t23.dart @@ -1,33 +1,33 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that the assert statement can't be a body of a function -/// of the form [functionSignature '=>' expression ';']. -/// -/// @author msyabro - - -f() => assert (false); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(); -} +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that the assert statement can't be a body of a function +/// of the form [functionSignature '=>' expression ';']. +/// +/// @author msyabro + + +f() => assert (false); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(); +} diff --git a/Language/Functions/syntax_t24.dart b/Language/Functions/syntax_t24.dart index 91ff8a41ad..a7152f5849 100644 --- a/Language/Functions/syntax_t24.dart +++ b/Language/Functions/syntax_t24.dart @@ -1,33 +1,33 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that a class can't be defined in a body -/// of a function of the form [functionSignature '=>' expression ';']. -/// -/// @author msyabro - - -f() => class A {}; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(); -} +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that a class can't be defined in a body +/// of a function of the form [functionSignature '=>' expression ';']. +/// +/// @author msyabro + + +f() => class A {}; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(); +} diff --git a/Language/Functions/syntax_t25.dart b/Language/Functions/syntax_t25.dart index 5efbd827c3..df9c5fbbba 100644 --- a/Language/Functions/syntax_t25.dart +++ b/Language/Functions/syntax_t25.dart @@ -1,35 +1,35 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that a class can't be defined in a body -/// of a function of the form [functionSignature '{' statements '}']. -/// -/// @author msyabro - - -f() { - class A{}; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - f(); -} +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that a class can't be defined in a body +/// of a function of the form [functionSignature '{' statements '}']. +/// +/// @author msyabro + + +f() { + class A{}; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + f(); +} diff --git a/Language/Functions/syntax_t28.dart b/Language/Functions/syntax_t28.dart index e82078c055..c2c788ecd3 100644 --- a/Language/Functions/syntax_t28.dart +++ b/Language/Functions/syntax_t28.dart @@ -1,35 +1,35 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that a typedef can't be defined in a body -/// of a function of the form [functionSignature '=>' expression ';']. -/// -/// @author msyabro - - -f() => typedef void f(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(); -//^ -// [cfe] unspecified -} +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that a typedef can't be defined in a body +/// of a function of the form [functionSignature '=>' expression ';']. +/// +/// @author msyabro + + +f() => typedef void f(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(); +//^ +// [cfe] unspecified +} diff --git a/Language/Functions/syntax_t29.dart b/Language/Functions/syntax_t29.dart index 1302ec357f..f1c159322f 100644 --- a/Language/Functions/syntax_t29.dart +++ b/Language/Functions/syntax_t29.dart @@ -1,35 +1,35 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that a typedef can't be defined in a body -/// of a function of the form [functionSignature '{' statements '}']. -/// -/// @author msyabro - - -f() { - typedef void f(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - f(); -} +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that a typedef can't be defined in a body +/// of a function of the form [functionSignature '{' statements '}']. +/// +/// @author msyabro + + +f() { + typedef void f(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + f(); +} diff --git a/Language/Functions/syntax_t30.dart b/Language/Functions/syntax_t30.dart index 6c3f4980cc..780524fdb5 100644 --- a/Language/Functions/syntax_t30.dart +++ b/Language/Functions/syntax_t30.dart @@ -1,35 +1,35 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that variables can't be declared as static inside of -/// a function body. -/// -/// @author msyabro - - -f() { - static var x; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - f(); -} +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that variables can't be declared as static inside of +/// a function body. +/// +/// @author msyabro + + +f() { + static var x; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + f(); +} diff --git a/Language/Functions/syntax_t31.dart b/Language/Functions/syntax_t31.dart index 4d192bf57b..5f75c8a4de 100644 --- a/Language/Functions/syntax_t31.dart +++ b/Language/Functions/syntax_t31.dart @@ -1,35 +1,35 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that functions can't be declared as static inside of -/// a function body. -/// -/// @author msyabro - - -f() { - static localFunction() {} -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - f(); -} +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that functions can't be declared as static inside of +/// a function body. +/// +/// @author msyabro + + +f() { + static localFunction() {} +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + f(); +} diff --git a/Language/Functions/syntax_t32.dart b/Language/Functions/syntax_t32.dart index c34da93010..c3f11520a8 100644 --- a/Language/Functions/syntax_t32.dart +++ b/Language/Functions/syntax_t32.dart @@ -1,35 +1,35 @@ -// 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 Functions include function declarations, methods, getters, -/// setters, constructors and function literals. -/// All functions have a signature and a body. -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: void | type -/// ; -/// functionBody: -/// async? '=>' expression ';' | (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// -/// @description Checks that 'abstract' keyword can't be used inside of -/// a function body. -/// -/// @author msyabro - - -f() { - abstract localFunction(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - f(); -} +// 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 Functions include function declarations, methods, getters, +/// setters, constructors and function literals. +/// All functions have a signature and a body. +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: void | type +/// ; +/// functionBody: +/// async? '=>' expression ';' | (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// +/// @description Checks that 'abstract' keyword can't be used inside of +/// a function body. +/// +/// @author msyabro + + +f() { + abstract localFunction(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + f(); +} diff --git a/Language/Generics/syntax_t05.dart b/Language/Generics/syntax_t05.dart index ee21309837..04eab40e16 100644 --- a/Language/Generics/syntax_t05.dart +++ b/Language/Generics/syntax_t05.dart @@ -1,18 +1,18 @@ -// Copyright (c) 2019, 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 class declaration, type alias, or function [G] may be generic, -/// that is, [G] may have formal type parameters declared. -/// @description Checks that at least one typeParameter is a must in the generic -/// class declaration. -/// @author iefremov - - -class C<>{} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2019, 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 class declaration, type alias, or function [G] may be generic, +/// that is, [G] may have formal type parameters declared. +/// @description Checks that at least one typeParameter is a must in the generic +/// class declaration. +/// @author iefremov + + +class C<>{} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Generics/syntax_t06.dart b/Language/Generics/syntax_t06.dart index ed60793a80..8a85422847 100644 --- a/Language/Generics/syntax_t06.dart +++ b/Language/Generics/syntax_t06.dart @@ -1,18 +1,18 @@ -// Copyright (c) 2019, 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 class declaration, type alias, or function [G] may be generic, -/// that is, [G] may have formal type parameters declared. -/// @description Checks that closing bracket is a must in the generic class -/// declaration. -/// @author iefremov - - -class C{} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2019, 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 class declaration, type alias, or function [G] may be generic, +/// that is, [G] may have formal type parameters declared. +/// @description Checks that opening bracket is a must in the generic class +/// declaration. +/// @author iefremov + + +class C T>{} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Generics/syntax_t08.dart b/Language/Generics/syntax_t08.dart index e93c785b55..016c8a93bc 100644 --- a/Language/Generics/syntax_t08.dart +++ b/Language/Generics/syntax_t08.dart @@ -1,18 +1,18 @@ -// Copyright (c) 2019, 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 class declaration, type alias, or function [G] may be generic, -/// that is, [G] may have formal type parameters declared. -/// @description Checks that a comma must be succeeded by a typeParameter in the -/// class declaration. -/// @author iefremov - - -class C{} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2019, 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 class declaration, type alias, or function [G] may be generic, +/// that is, [G] may have formal type parameters declared. +/// @description Checks that a comma must be succeeded by a typeParameter in the +/// class declaration. +/// @author iefremov + + +class C{} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Generics/syntax_t10.dart b/Language/Generics/syntax_t10.dart index b230fc3d8f..bdd5defd4a 100644 --- a/Language/Generics/syntax_t10.dart +++ b/Language/Generics/syntax_t10.dart @@ -1,18 +1,18 @@ -// Copyright (c) 2019, 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 class declaration, type alias, or function [G] may be generic, -/// that is, [G] may have formal type parameters declared. -/// @description Checks that a compile-time error is produced when trying -/// to specify a parameterized type parameter for the generic class. -/// @author iefremov - - -class C>{} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2019, 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 class declaration, type alias, or function [G] may be generic, +/// that is, [G] may have formal type parameters declared. +/// @description Checks that a compile-time error is produced when trying +/// to specify a parameterized type parameter for the generic class. +/// @author iefremov + + +class C>{} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Generics/syntax_t11.dart b/Language/Generics/syntax_t11.dart index ad90e70105..08c936e2d8 100644 --- a/Language/Generics/syntax_t11.dart +++ b/Language/Generics/syntax_t11.dart @@ -1,18 +1,18 @@ -// Copyright (c) 2019, 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 class declaration, type alias, or function [G] may be generic, -/// that is, [G] may have formal type parameters declared. -/// @description Checks that a compile-time error is produced when "extends" -/// is not followed with "type" for the generic class. -/// @author kaigorodov - - -class C{} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2019, 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 class declaration, type alias, or function [G] may be generic, +/// that is, [G] may have formal type parameters declared. +/// @description Checks that a compile-time error is produced when "extends" +/// is not followed with "type" for the generic class. +/// @author kaigorodov + + +class C{} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Generics/syntax_t12.dart b/Language/Generics/syntax_t12.dart index 1ec2116c73..80f9aa616b 100644 --- a/Language/Generics/syntax_t12.dart +++ b/Language/Generics/syntax_t12.dart @@ -1,22 +1,22 @@ -// Copyright (c) 2019, 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 class declaration, type alias, or function [G] may be generic, -/// that is, [G] may have formal type parameters declared. -/// @description Checks that a compile-time error is produced when typeParameter -/// declaration is not complete. -/// @author kaigorodov - - -class A{} -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2019, 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 class declaration, type alias, or function [G] may be generic, +/// that is, [G] may have formal type parameters declared. +/// @description Checks that a compile-time error is produced when typeParameter +/// declaration is not complete. +/// @author kaigorodov + + +class A{} +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Generics/syntax_t13.dart b/Language/Generics/syntax_t13.dart index dbd19048ea..33fa08ad34 100644 --- a/Language/Generics/syntax_t13.dart +++ b/Language/Generics/syntax_t13.dart @@ -1,18 +1,18 @@ -// Copyright (c) 2019, 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 class declaration, type alias, or function [G] may be generic, -/// that is, [G] may have formal type parameters declared. -/// @description Checks that a compile-time error is produced when "extends" -/// keyword is not spelled correctly for the generic class. -/// @author kaigorodov - - -class C{} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2019, 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 class declaration, type alias, or function [G] may be generic, +/// that is, [G] may have formal type parameters declared. +/// @description Checks that a compile-time error is produced when "extends" +/// keyword is not spelled correctly for the generic class. +/// @author kaigorodov + + +class C{} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Generics/syntax_t14.dart b/Language/Generics/syntax_t14.dart index 8d0c53c477..5518902d26 100644 --- a/Language/Generics/syntax_t14.dart +++ b/Language/Generics/syntax_t14.dart @@ -1,18 +1,18 @@ -// Copyright (c) 2019, 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 class declaration, type alias, or function [G] may be generic, -/// that is, [G] may have formal type parameters declared. -/// @description Checks that a compile-time error is produced when "extends" -/// keyword is not spelled correctly and is not followed with "type". -/// @author kaigorodov - - -class C{} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2019, 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 class declaration, type alias, or function [G] may be generic, +/// that is, [G] may have formal type parameters declared. +/// @description Checks that a compile-time error is produced when "extends" +/// keyword is not spelled correctly and is not followed with "type". +/// @author kaigorodov + + +class C{} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Generics/syntax_t15.dart b/Language/Generics/syntax_t15.dart index e90b5081e4..81e34db224 100644 --- a/Language/Generics/syntax_t15.dart +++ b/Language/Generics/syntax_t15.dart @@ -1,38 +1,38 @@ -// Copyright (c) 2019, 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 class declaration, type alias, or function [G] may be generic, -/// that is, [G] may have formal type parameters declared. -/// @description Checks that a generic syntax is not confused with relational -/// expressions. -/// @author msyabro - - -import "../../Utils/expect.dart"; - -class A { - foo(p1, p2, p3, p4) { - Expect.equals(true, p1); - Expect.equals(3, p2); - Expect.equals(4, p3); - Expect.equals(false, p4); - } - bar(p) { - Expect.equals(null, p()); - } - - test() { - var a = 1; - var b = 2; - var c = 3; - var d = 4; - var e = 5; - var f = 6; - foo(a < b, c, d, e > f); - } -} - -main() { - new A().test(); -} +// Copyright (c) 2019, 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 class declaration, type alias, or function [G] may be generic, +/// that is, [G] may have formal type parameters declared. +/// @description Checks that a generic syntax is not confused with relational +/// expressions. +/// @author msyabro + + +import "../../Utils/expect.dart"; + +class A { + foo(p1, p2, p3, p4) { + Expect.equals(true, p1); + Expect.equals(3, p2); + Expect.equals(4, p3); + Expect.equals(false, p4); + } + bar(p) { + Expect.equals(null, p()); + } + + test() { + var a = 1; + var b = 2; + var c = 3; + var d = 4; + var e = 5; + var f = 6; + foo(a < b, c, d, e > f); + } +} + +main() { + new A().test(); +} diff --git a/Language/Interfaces/Superinterfaces/definition_t03.dart b/Language/Interfaces/Superinterfaces/definition_t03.dart index b87e7f3739..a29590c7b5 100644 --- a/Language/Interfaces/Superinterfaces/definition_t03.dart +++ b/Language/Interfaces/Superinterfaces/definition_t03.dart @@ -1,34 +1,34 @@ -// 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 An interface has a set of direct superinterfaces. -/// An interface J is a superinterface of an interface I iff either J is a -/// direct superinterface of I or J is a superinterface of a direct -/// superinterface of I. -/// @description Checks that it is a compile-time error if the chain of -/// superinterfaces forms a circular dependency. -/// @author vasya - - -abstract class C implements A {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -abstract class B implements C {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -abstract class A implements B {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -class D implements A {} -// ^ -// [cfe] unspecified - -main() { - new D(); -} - +// 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 An interface has a set of direct superinterfaces. +/// An interface J is a superinterface of an interface I iff either J is a +/// direct superinterface of I or J is a superinterface of a direct +/// superinterface of I. +/// @description Checks that it is a compile-time error if the chain of +/// superinterfaces forms a circular dependency. +/// @author vasya + + +abstract class C implements A {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +abstract class B implements C {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +abstract class A implements B {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +class D implements A {} +// ^ +// [cfe] unspecified + +main() { + new D(); +} + diff --git a/Language/Interfaces/Superinterfaces/definition_t04.dart b/Language/Interfaces/Superinterfaces/definition_t04.dart index cac3c3dc2f..67835c1318 100644 --- a/Language/Interfaces/Superinterfaces/definition_t04.dart +++ b/Language/Interfaces/Superinterfaces/definition_t04.dart @@ -1,33 +1,33 @@ -// 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 An interface has a set of direct superinterfaces. -/// An interface J is a superinterface of an interface I iff either J is a -/// direct superinterface of I or J is a superinterface of a direct -/// superinterface of I. -/// @description Checks that it is a compile-time error if the chain of -/// superinterfaces forms a circular dependency. -/// @author rodionov - - -abstract class A implements B {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -abstract class B implements A {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -class C implements B {} -// ^ -// [cfe] unspecified - -main() { - new B(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// 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 An interface has a set of direct superinterfaces. +/// An interface J is a superinterface of an interface I iff either J is a +/// direct superinterface of I or J is a superinterface of a direct +/// superinterface of I. +/// @description Checks that it is a compile-time error if the chain of +/// superinterfaces forms a circular dependency. +/// @author rodionov + + +abstract class A implements B {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +abstract class B implements A {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +class C implements B {} +// ^ +// [cfe] unspecified + +main() { + new B(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Interfaces/Superinterfaces/superinterface_of_itself_t01.dart b/Language/Interfaces/Superinterfaces/superinterface_of_itself_t01.dart index 2911a7fcb5..a29e4b2af3 100644 --- a/Language/Interfaces/Superinterfaces/superinterface_of_itself_t01.dart +++ b/Language/Interfaces/Superinterfaces/superinterface_of_itself_t01.dart @@ -1,24 +1,24 @@ -// 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 It is a compile-time error if an interface is a superinterface -/// of itself. -/// @description Checks that it is a compile-time error if a non-generic -/// interface is a superinterface of itself. -/// @author vasya - - -abstract class I implements I {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -class A implements I {} -// ^ -// [cfe] unspecified - -main() { - new A(); -} - +// 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 It is a compile-time error if an interface is a superinterface +/// of itself. +/// @description Checks that it is a compile-time error if a non-generic +/// interface is a superinterface of itself. +/// @author vasya + + +abstract class I implements I {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +class A implements I {} +// ^ +// [cfe] unspecified + +main() { + new A(); +} + diff --git a/Language/Interfaces/Superinterfaces/superinterface_of_itself_t02.dart b/Language/Interfaces/Superinterfaces/superinterface_of_itself_t02.dart index 1071ce76ca..2ff8578bf7 100644 --- a/Language/Interfaces/Superinterfaces/superinterface_of_itself_t02.dart +++ b/Language/Interfaces/Superinterfaces/superinterface_of_itself_t02.dart @@ -1,24 +1,24 @@ -// 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 It is a compile-time error if an interface is a superinterface -/// of itself. -/// @description Checks that it is a compile-time error if a generic interface -/// is a superinterface of itself. -/// @author rodionov - - -abstract class I implements I {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -class A implements I {} -// ^ -// [cfe] unspecified - -main() { - new A(); -} - +// 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 It is a compile-time error if an interface is a superinterface +/// of itself. +/// @description Checks that it is a compile-time error if a generic interface +/// is a superinterface of itself. +/// @author rodionov + + +abstract class I implements I {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +class A implements I {} +// ^ +// [cfe] unspecified + +main() { + new A(); +} + diff --git a/Language/Interfaces/Superinterfaces/superinterface_of_itself_t03.dart b/Language/Interfaces/Superinterfaces/superinterface_of_itself_t03.dart index f38e0829c4..37dfdb262e 100644 --- a/Language/Interfaces/Superinterfaces/superinterface_of_itself_t03.dart +++ b/Language/Interfaces/Superinterfaces/superinterface_of_itself_t03.dart @@ -1,29 +1,29 @@ -// 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 It is a compile-time error if an interface is a superinterface -/// of itself. -/// @description Checks that it is a compile-time error if a non-generic -/// interface is an indirect superinterface of itself. -/// @author msyabro - - -abstract class J implements I {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -abstract class I implements J {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -class A implements I {} -// ^ -// [cfe] unspecified - -main() { - new A(); -} - +// 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 It is a compile-time error if an interface is a superinterface +/// of itself. +/// @description Checks that it is a compile-time error if a non-generic +/// interface is an indirect superinterface of itself. +/// @author msyabro + + +abstract class J implements I {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +abstract class I implements J {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +class A implements I {} +// ^ +// [cfe] unspecified + +main() { + new A(); +} + diff --git a/Language/Libraries_and_Scripts/Exports/reexport_t02.dart b/Language/Libraries_and_Scripts/Exports/reexport_t02.dart index 5e267b0fdc..6aab1e5d76 100644 --- a/Language/Libraries_and_Scripts/Exports/reexport_t02.dart +++ b/Language/Libraries_and_Scripts/Exports/reexport_t02.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if a name N is re-exported by a library -/// L and N is introduced into the export namespace of L by more than one export. -/// @description Checks that it is a compile-time error if this library imports -/// another which re-exports two more libraries defining the same name and that -/// name is referenced in this library. -/// @author rodionov -/// @issue 6134 -/// @issue 44990 - -import "reexport_lib.dart"; - -main() { - 1 is foo; -} +// 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 It is a compile-time error if a name N is re-exported by a library +/// L and N is introduced into the export namespace of L by more than one export. +/// @description Checks that it is a compile-time error if this library imports +/// another which re-exports two more libraries defining the same name and that +/// name is referenced in this library. +/// @author rodionov +/// @issue 6134 +/// @issue 44990 + +import "reexport_lib.dart"; + +main() { + 1 is foo; +} diff --git a/Language/Libraries_and_Scripts/Exports/syntax_t01.dart b/Language/Libraries_and_Scripts/Exports/syntax_t01.dart index 647c0a8d37..fc37f33cb3 100644 --- a/Language/Libraries_and_Scripts/Exports/syntax_t01.dart +++ b/Language/Libraries_and_Scripts/Exports/syntax_t01.dart @@ -1,20 +1,20 @@ -// 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 library L exports a namespace, meaning that the declarations in -/// the namespace are made available to other libraries if they choose to import -/// L. The namespace that L exports is known as its exported namespace. -/// libraryExport: -/// metadata export uri combinator* `;' -/// ; -/// @description Checks that it is a compile-time error if export token is -/// prefixed with a '#' character. -/// @author rodionov -/// @issue 44990 - -import "syntax_t01_lib.dart"; - -main() { - var x = foo; -} +// 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 library L exports a namespace, meaning that the declarations in +/// the namespace are made available to other libraries if they choose to import +/// L. The namespace that L exports is known as its exported namespace. +/// libraryExport: +/// metadata export uri combinator* `;' +/// ; +/// @description Checks that it is a compile-time error if export token is +/// prefixed with a '#' character. +/// @author rodionov +/// @issue 44990 + +import "syntax_t01_lib.dart"; + +main() { + var x = foo; +} diff --git a/Language/Libraries_and_Scripts/Exports/syntax_t04.dart b/Language/Libraries_and_Scripts/Exports/syntax_t04.dart index 158dcadfc4..f9cb8c6a28 100644 --- a/Language/Libraries_and_Scripts/Exports/syntax_t04.dart +++ b/Language/Libraries_and_Scripts/Exports/syntax_t04.dart @@ -1,22 +1,22 @@ -// 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 library L exports a namespace, meaning that the declarations in -/// the namespace are made available to other libraries if they choose to import -/// L. The namespace that L exports is known as its exported namespace. -/// libraryExport: -/// metadata export uri combinator* `;' -/// ; -/// @description Checks that it is a compile-time error when there're no -/// identifiers following a show combinator in an export declaration. -/// @author rodionov -/// @issue 44990 - -import "syntax_t04_lib.dart"; - -main() { - var x = foo; -// ^ -// [analyzer] unspecified -} +// 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 library L exports a namespace, meaning that the declarations in +/// the namespace are made available to other libraries if they choose to import +/// L. The namespace that L exports is known as its exported namespace. +/// libraryExport: +/// metadata export uri combinator* `;' +/// ; +/// @description Checks that it is a compile-time error when there're no +/// identifiers following a show combinator in an export declaration. +/// @author rodionov +/// @issue 44990 + +import "syntax_t04_lib.dart"; + +main() { + var x = foo; +// ^ +// [analyzer] unspecified +} diff --git a/Language/Libraries_and_Scripts/Exports/syntax_t05.dart b/Language/Libraries_and_Scripts/Exports/syntax_t05.dart index 045b63d8fd..5981f27e93 100644 --- a/Language/Libraries_and_Scripts/Exports/syntax_t05.dart +++ b/Language/Libraries_and_Scripts/Exports/syntax_t05.dart @@ -1,20 +1,20 @@ -// 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 library L exports a namespace, meaning that the declarations in -/// the namespace are made available to other libraries if they choose to import -/// L. The namespace that L exports is known as its exported namespace. -/// libraryExport: -/// metadata export uri combinator* `;' -/// ; -/// @description Checks that it is a compile-time error when there're no -/// identifiers following a hide combinator in an export declaration. -/// @author rodionov -/// @issue 44990 - -import "syntax_t05_lib.dart"; - -main() { - var x = foo; -} +// 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 library L exports a namespace, meaning that the declarations in +/// the namespace are made available to other libraries if they choose to import +/// L. The namespace that L exports is known as its exported namespace. +/// libraryExport: +/// metadata export uri combinator* `;' +/// ; +/// @description Checks that it is a compile-time error when there're no +/// identifiers following a hide combinator in an export declaration. +/// @author rodionov +/// @issue 44990 + +import "syntax_t05_lib.dart"; + +main() { + var x = foo; +} diff --git a/Language/Libraries_and_Scripts/Exports/syntax_t06.dart b/Language/Libraries_and_Scripts/Exports/syntax_t06.dart index de0ae35c72..3df716f7e4 100644 --- a/Language/Libraries_and_Scripts/Exports/syntax_t06.dart +++ b/Language/Libraries_and_Scripts/Exports/syntax_t06.dart @@ -1,20 +1,20 @@ -// 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 library L exports a namespace, meaning that the declarations in -/// the namespace are made available to other libraries if they choose to import -/// L. The namespace that L exports is known as its exported namespace. -/// libraryExport: -/// metadata export uri combinator* `;' -/// ; -/// @description Checks that it is a compile-time error when export declaration -/// includes an 'as prefix' clause. -/// @author rodionov -/// @issue 44990 - -import "syntax_t06_lib.dart"; - -main() { - var x = foo; -} +// 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 library L exports a namespace, meaning that the declarations in +/// the namespace are made available to other libraries if they choose to import +/// L. The namespace that L exports is known as its exported namespace. +/// libraryExport: +/// metadata export uri combinator* `;' +/// ; +/// @description Checks that it is a compile-time error when export declaration +/// includes an 'as prefix' clause. +/// @author rodionov +/// @issue 44990 + +import "syntax_t06_lib.dart"; + +main() { + var x = foo; +} diff --git a/Language/Libraries_and_Scripts/Imports/invalid_uri_t01.dart b/Language/Libraries_and_Scripts/Imports/invalid_uri_t01.dart index 95815b5878..5406b4ca5c 100644 --- a/Language/Libraries_and_Scripts/Imports/invalid_uri_t01.dart +++ b/Language/Libraries_and_Scripts/Imports/invalid_uri_t01.dart @@ -1,24 +1,24 @@ -// 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 An import specifies a URI x where the declaration of an imported -/// library is to be found. It is a compile-time error if the specified URI does -/// not refer to a library declaration. -/// @description Checks that it is a compile-time error if the URI in an import -/// directive refers to a part declaration which is not a library declaration. -/// @author ilya - -// [error line 1, column 1] -// [cfe] unspecified - -library my_lib; - -import "invalid_uri_t01_part.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - var someVar = 0; -} +// 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 An import specifies a URI x where the declaration of an imported +/// library is to be found. It is a compile-time error if the specified URI does +/// not refer to a library declaration. +/// @description Checks that it is a compile-time error if the URI in an import +/// directive refers to a part declaration which is not a library declaration. +/// @author ilya + +// [error line 1, column 1] +// [cfe] unspecified + +library my_lib; + +import "invalid_uri_t01_part.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + var someVar = 0; +} diff --git a/Language/Libraries_and_Scripts/Imports/invalid_uri_t02.dart b/Language/Libraries_and_Scripts/Imports/invalid_uri_t02.dart index 40b1271cb2..aa4dcdafe5 100644 --- a/Language/Libraries_and_Scripts/Imports/invalid_uri_t02.dart +++ b/Language/Libraries_and_Scripts/Imports/invalid_uri_t02.dart @@ -1,20 +1,20 @@ -// 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 An import specifies a URI x where the declaration of an imported -/// library is to be found. It is a compile-time error if the specified URI does -/// not refer to a library declaration. -/// @description Checks that it is a compile-time error if the URI in an import -/// directive does not denote an existing file. -/// @author msyabro - - -import "IntentionallyMissingFile.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - var someVar = 0; -} +// 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 An import specifies a URI x where the declaration of an imported +/// library is to be found. It is a compile-time error if the specified URI does +/// not refer to a library declaration. +/// @description Checks that it is a compile-time error if the URI in an import +/// directive does not denote an existing file. +/// @author msyabro + + +import "IntentionallyMissingFile.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + var someVar = 0; +} diff --git a/Language/Libraries_and_Scripts/Imports/invalid_uri_t03.dart b/Language/Libraries_and_Scripts/Imports/invalid_uri_t03.dart index c182a8c71f..6c72eb4374 100644 --- a/Language/Libraries_and_Scripts/Imports/invalid_uri_t03.dart +++ b/Language/Libraries_and_Scripts/Imports/invalid_uri_t03.dart @@ -1,17 +1,17 @@ -// 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 An import specifies a URI x where the declaration of an imported -/// library is to be found. It is a compile-time error if the specified URI does -/// not refer to a library declaration. -/// @description Checks that it is not a compile-time error if the file pointed -/// to by an import directive exists but does not contain a library declaration. -/// @author rodionov - - -import "invalid_uri_t03_lib.dart"; - -main() { - foo(); -} +// 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 An import specifies a URI x where the declaration of an imported +/// library is to be found. It is a compile-time error if the specified URI does +/// not refer to a library declaration. +/// @description Checks that it is not a compile-time error if the file pointed +/// to by an import directive exists but does not contain a library declaration. +/// @author rodionov + + +import "invalid_uri_t03_lib.dart"; + +main() { + foo(); +} diff --git a/Language/Libraries_and_Scripts/Imports/library_name_t02.dart b/Language/Libraries_and_Scripts/Imports/library_name_t02.dart index 1d275a6bf3..7a5bf16bf1 100644 --- a/Language/Libraries_and_Scripts/Imports/library_name_t02.dart +++ b/Language/Libraries_and_Scripts/Imports/library_name_t02.dart @@ -1,18 +1,18 @@ -// 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 It is a static warning to import two different libraries with -/// the same name unless their name is the empty string. -/// @description Checks that it is not an error or warning when a library -/// directly imports two other libraries (A and B) that have different names and -/// A imports and re-exports a third one (C) that has the same name as B. -/// @author rodionov - - -import "library_name_t02_libA.dart"; -import "library_name_t02_libB.dart"; - -main() { - var someVar = 0; -} +// 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 It is a static warning to import two different libraries with +/// the same name unless their name is the empty string. +/// @description Checks that it is not an error or warning when a library +/// directly imports two other libraries (A and B) that have different names and +/// A imports and re-exports a third one (C) that has the same name as B. +/// @author rodionov + + +import "library_name_t02_libA.dart"; +import "library_name_t02_libB.dart"; + +main() { + var someVar = 0; +} diff --git a/Language/Libraries_and_Scripts/Imports/namespace_changes_t07.dart b/Language/Libraries_and_Scripts/Imports/namespace_changes_t07.dart index 187902b6d0..ce6ef1ac7f 100644 --- a/Language/Libraries_and_Scripts/Imports/namespace_changes_t07.dart +++ b/Language/Libraries_and_Scripts/Imports/namespace_changes_t07.dart @@ -1,72 +1,72 @@ -// 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 The current library is the library currently being compiled. The -/// import modifies the import namespace of the current library in a manner that -/// is determined by the imported library and by the optional elements of the -/// import. -/// . . . -/// Let I be an import directive that refers to a URI via the string s1. -/// Evaluation of I proceeds as follows: -/// . . . -/// If I is an immediate import then, first -/// • If the URI that is the value of s1 has not yet been accessed by an import -/// or export directive in the current isolate then the contents of the URI -/// are compiled to yield a library B. Because libraries may have mutually -/// recursive imports, care must be taken to avoid an infinite regress. -/// • Otherwise, the contents of the URI denoted by s1 have been compiled into -/// a library B within the current isolate. -/// -/// Let NS0 be the exported namespace of B. Then, for each combinator clause Ci, -/// 1 <= i <= n in I: -/// • If Ci is of the form -/// show id1, ..., idk -/// then let NSi = show([id1, ..., idk], NSi-1) -/// where show(l, n) takes a list of identifiers l and a namespace n, and -/// produces a namespace that maps each name in l to the same element that n -/// does. Furthermore, for each name x in l, if n defines the name x= then -/// the new namespace maps x= to the same element that n does. Otherwise the -/// resulting mapping is undefined. -/// • If Ci is of the form -/// hide id1, ..., idk -/// then let NSi = hide([id1, ..., idk], NSi-1) -/// where hide(l, n) takes a list of identfiers l and a namespace n, and -/// produces a namespace that is identical to n except that for each name k -/// in l, k and k= are undefined. -/// -/// Next, if I includes a prefix clause of the form as p, let NS = NSn ∪ -/// {p : pref ixObject(NSn)} where pref ixObject(NSn) is a prefix object for the -/// namespace NSn, which is an object that has the following members: -/// • For every top level function f named id in NSn, a corresponding method with -/// the same name and signature as f that forwards to f. -/// • For every top level getter with the same name and signature as g named id -/// in NSn, a corresponding getter that forwards to g. -/// • For every top level setter s with the same name and signature as named id -/// in NSn, a corresponding setter that forwards to s. -/// • For every type T named id in NSn, a corresponding getter named id with -/// return type Type, that, when invoked, returns the type object for T. -/// Otherwise, let NS = NSn. It is a compile-time error if the current -/// library declares a top-level member named p. -/// . . . -/// Then, for each entry mapping key k to declaration d in NS, d is made -/// available in the top level scope of L under the name k unless either: -/// • a top-level declaration with the name k exists in L, OR -/// • a prefix clause of the form as k is used in L. -/// -/// @description Checks that imports of an imported library are not accessible -/// with a combination of prefixes used in both import directives. Library being -/// imported does not re-export its own imports by default. -/// @author kaigorodov - - -import "namespace_changes_lib.dart" as PP; - -main() { - try { - new PP.P.B.spec().foo(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (x) {} -} +// 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 The current library is the library currently being compiled. The +/// import modifies the import namespace of the current library in a manner that +/// is determined by the imported library and by the optional elements of the +/// import. +/// . . . +/// Let I be an import directive that refers to a URI via the string s1. +/// Evaluation of I proceeds as follows: +/// . . . +/// If I is an immediate import then, first +/// • If the URI that is the value of s1 has not yet been accessed by an import +/// or export directive in the current isolate then the contents of the URI +/// are compiled to yield a library B. Because libraries may have mutually +/// recursive imports, care must be taken to avoid an infinite regress. +/// • Otherwise, the contents of the URI denoted by s1 have been compiled into +/// a library B within the current isolate. +/// +/// Let NS0 be the exported namespace of B. Then, for each combinator clause Ci, +/// 1 <= i <= n in I: +/// • If Ci is of the form +/// show id1, ..., idk +/// then let NSi = show([id1, ..., idk], NSi-1) +/// where show(l, n) takes a list of identifiers l and a namespace n, and +/// produces a namespace that maps each name in l to the same element that n +/// does. Furthermore, for each name x in l, if n defines the name x= then +/// the new namespace maps x= to the same element that n does. Otherwise the +/// resulting mapping is undefined. +/// • If Ci is of the form +/// hide id1, ..., idk +/// then let NSi = hide([id1, ..., idk], NSi-1) +/// where hide(l, n) takes a list of identfiers l and a namespace n, and +/// produces a namespace that is identical to n except that for each name k +/// in l, k and k= are undefined. +/// +/// Next, if I includes a prefix clause of the form as p, let NS = NSn ∪ +/// {p : pref ixObject(NSn)} where pref ixObject(NSn) is a prefix object for the +/// namespace NSn, which is an object that has the following members: +/// • For every top level function f named id in NSn, a corresponding method with +/// the same name and signature as f that forwards to f. +/// • For every top level getter with the same name and signature as g named id +/// in NSn, a corresponding getter that forwards to g. +/// • For every top level setter s with the same name and signature as named id +/// in NSn, a corresponding setter that forwards to s. +/// • For every type T named id in NSn, a corresponding getter named id with +/// return type Type, that, when invoked, returns the type object for T. +/// Otherwise, let NS = NSn. It is a compile-time error if the current +/// library declares a top-level member named p. +/// . . . +/// Then, for each entry mapping key k to declaration d in NS, d is made +/// available in the top level scope of L under the name k unless either: +/// • a top-level declaration with the name k exists in L, OR +/// • a prefix clause of the form as k is used in L. +/// +/// @description Checks that imports of an imported library are not accessible +/// with a combination of prefixes used in both import directives. Library being +/// imported does not re-export its own imports by default. +/// @author kaigorodov + + +import "namespace_changes_lib.dart" as PP; + +main() { + try { + new PP.P.B.spec().foo(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (x) {} +} diff --git a/Language/Libraries_and_Scripts/Imports/namespace_changes_t08.dart b/Language/Libraries_and_Scripts/Imports/namespace_changes_t08.dart index 3efa8bab71..cca96c646d 100644 --- a/Language/Libraries_and_Scripts/Imports/namespace_changes_t08.dart +++ b/Language/Libraries_and_Scripts/Imports/namespace_changes_t08.dart @@ -1,69 +1,69 @@ -// 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 The current library is the library currently being compiled. The -/// import modifies the import namespace of the current library in a manner that -/// is determined by the imported library and by the optional elements of the -/// import. -/// . . . -/// Let I be an import directive that refers to a URI via the string s1. -/// Evaluation of I proceeds as follows: -/// . . . -/// If I is an immediate import then, first -/// • If the URI that is the value of s1 has not yet been accessed by an import -/// or export directive in the current isolate then the contents of the URI -/// are compiled to yield a library B. Because libraries may have mutually -/// recursive imports, care must be taken to avoid an infinite regress. -/// • Otherwise, the contents of the URI denoted by s1 have been compiled into -/// a library B within the current isolate. -/// -/// Let NS0 be the exported namespace of B. Then, for each combinator clause Ci, -/// 1 <= i <= n in I: -/// • If Ci is of the form -/// show id1, ..., idk -/// then let NSi = show([id1, ..., idk], NSi-1) -/// where show(l, n) takes a list of identifiers l and a namespace n, and -/// produces a namespace that maps each name in l to the same element that n -/// does. Furthermore, for each name x in l, if n defines the name x= then -/// the new namespace maps x= to the same element that n does. Otherwise the -/// resulting mapping is undefined. -/// • If Ci is of the form -/// hide id1, ..., idk -/// then let NSi = hide([id1, ..., idk], NSi-1) -/// where hide(l, n) takes a list of identfiers l and a namespace n, and -/// produces a namespace that is identical to n except that for each name k -/// in l, k and k= are undefined. -/// -/// Next, if I includes a prefix clause of the form as p, let NS = NSn ∪ -/// {p : pref ixObject(NSn)} where pref ixObject(NSn) is a prefix object for the -/// namespace NSn, which is an object that has the following members: -/// • For every top level function f named id in NSn, a corresponding method with -/// the same name and signature as f that forwards to f. -/// • For every top level getter with the same name and signature as g named id -/// in NSn, a corresponding getter that forwards to g. -/// • For every top level setter s with the same name and signature as named id -/// in NSn, a corresponding setter that forwards to s. -/// • For every type T named id in NSn, a corresponding getter named id with -/// return type Type, that, when invoked, returns the type object for T. -/// Otherwise, let NS = NSn. It is a compile-time error if the current -/// library declares a top-level member named p. -/// . . . -/// Then, for each entry mapping key k to declaration d in NS, d is made -/// available in the top level scope of L under the name k unless either: -/// • a top-level declaration with the name k exists in L, OR -/// • a prefix clause of the form as k is used in L. -/// -/// @description Checks that imports of an imported library are not accessible -/// with a combination of prefixes used in both import directives. Library being -/// imported re-exports its own imports by default. -/// @author kaigorodov - -import "namespace_changes_lib_reexport.dart" as PP; - -main() { - new PP.P.B.spec().foo(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The current library is the library currently being compiled. The +/// import modifies the import namespace of the current library in a manner that +/// is determined by the imported library and by the optional elements of the +/// import. +/// . . . +/// Let I be an import directive that refers to a URI via the string s1. +/// Evaluation of I proceeds as follows: +/// . . . +/// If I is an immediate import then, first +/// • If the URI that is the value of s1 has not yet been accessed by an import +/// or export directive in the current isolate then the contents of the URI +/// are compiled to yield a library B. Because libraries may have mutually +/// recursive imports, care must be taken to avoid an infinite regress. +/// • Otherwise, the contents of the URI denoted by s1 have been compiled into +/// a library B within the current isolate. +/// +/// Let NS0 be the exported namespace of B. Then, for each combinator clause Ci, +/// 1 <= i <= n in I: +/// • If Ci is of the form +/// show id1, ..., idk +/// then let NSi = show([id1, ..., idk], NSi-1) +/// where show(l, n) takes a list of identifiers l and a namespace n, and +/// produces a namespace that maps each name in l to the same element that n +/// does. Furthermore, for each name x in l, if n defines the name x= then +/// the new namespace maps x= to the same element that n does. Otherwise the +/// resulting mapping is undefined. +/// • If Ci is of the form +/// hide id1, ..., idk +/// then let NSi = hide([id1, ..., idk], NSi-1) +/// where hide(l, n) takes a list of identfiers l and a namespace n, and +/// produces a namespace that is identical to n except that for each name k +/// in l, k and k= are undefined. +/// +/// Next, if I includes a prefix clause of the form as p, let NS = NSn ∪ +/// {p : pref ixObject(NSn)} where pref ixObject(NSn) is a prefix object for the +/// namespace NSn, which is an object that has the following members: +/// • For every top level function f named id in NSn, a corresponding method with +/// the same name and signature as f that forwards to f. +/// • For every top level getter with the same name and signature as g named id +/// in NSn, a corresponding getter that forwards to g. +/// • For every top level setter s with the same name and signature as named id +/// in NSn, a corresponding setter that forwards to s. +/// • For every type T named id in NSn, a corresponding getter named id with +/// return type Type, that, when invoked, returns the type object for T. +/// Otherwise, let NS = NSn. It is a compile-time error if the current +/// library declares a top-level member named p. +/// . . . +/// Then, for each entry mapping key k to declaration d in NS, d is made +/// available in the top level scope of L under the name k unless either: +/// • a top-level declaration with the name k exists in L, OR +/// • a prefix clause of the form as k is used in L. +/// +/// @description Checks that imports of an imported library are not accessible +/// with a combination of prefixes used in both import directives. Library being +/// imported re-exports its own imports by default. +/// @author kaigorodov + +import "namespace_changes_lib_reexport.dart" as PP; + +main() { + new PP.P.B.spec().foo(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/namespace_changes_t26.dart b/Language/Libraries_and_Scripts/Imports/namespace_changes_t26.dart index c984180088..299b5d82fd 100644 --- a/Language/Libraries_and_Scripts/Imports/namespace_changes_t26.dart +++ b/Language/Libraries_and_Scripts/Imports/namespace_changes_t26.dart @@ -1,75 +1,75 @@ -// 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 The current library is the library currently being compiled. The -/// import modifies the import namespace of the current library in a manner that -/// is determined by the imported library and by the optional elements of the -/// import. -/// . . . -/// Let I be an import directive that refers to a URI via the string s1. -/// Evaluation of I proceeds as follows: -/// . . . -/// If I is an immediate import then, first -/// • If the URI that is the value of s1 has not yet been accessed by an import -/// or export directive in the current isolate then the contents of the URI -/// are compiled to yield a library B. Because libraries may have mutually -/// recursive imports, care must be taken to avoid an infinite regress. -/// • Otherwise, the contents of the URI denoted by s1 have been compiled into -/// a library B within the current isolate. -/// -/// Let NS0 be the exported namespace of B. Then, for each combinator clause Ci, -/// 1 <= i <= n in I: -/// • If Ci is of the form -/// show id1, ..., idk -/// then let NSi = show([id1, ..., idk], NSi-1) -/// where show(l, n) takes a list of identifiers l and a namespace n, and -/// produces a namespace that maps each name in l to the same element that n -/// does. Furthermore, for each name x in l, if n defines the name x= then -/// the new namespace maps x= to the same element that n does. Otherwise the -/// resulting mapping is undefined. -/// • If Ci is of the form -/// hide id1, ..., idk -/// then let NSi = hide([id1, ..., idk], NSi-1) -/// where hide(l, n) takes a list of identfiers l and a namespace n, and -/// produces a namespace that is identical to n except that for each name k -/// in l, k and k= are undefined. -/// -/// Next, if I includes a prefix clause of the form as p, let NS = NSn ∪ -/// {p : pref ixObject(NSn)} where pref ixObject(NSn) is a prefix object for the -/// namespace NSn, which is an object that has the following members: -/// • For every top level function f named id in NSn, a corresponding method with -/// the same name and signature as f that forwards to f. -/// • For every top level getter with the same name and signature as g named id -/// in NSn, a corresponding getter that forwards to g. -/// • For every top level setter s with the same name and signature as named id -/// in NSn, a corresponding setter that forwards to s. -/// • For every type T named id in NSn, a corresponding getter named id with -/// return type Type, that, when invoked, returns the type object for T. -/// Otherwise, let NS = NSn. It is a compile-time error if the current -/// library declares a top-level member named p. -/// . . . -/// Then, for each entry mapping key k to declaration d in NS, d is made -/// available in the top level scope of L under the name k unless either: -/// • a top-level declaration with the name k exists in L, OR -/// • a prefix clause of the form as k is used in L. -/// -/// @description Checks that it is a compile-time error when prefix value -/// duplicates a function type alias name. -/// @author rodionov - - -import "syntax_lib.dart" as prefix; -// ^ -// [cfe] unspecified - -typedef prefix(int); -// ^ -// [analyzer] unspecified - -main() { - (int) {} is prefix; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The current library is the library currently being compiled. The +/// import modifies the import namespace of the current library in a manner that +/// is determined by the imported library and by the optional elements of the +/// import. +/// . . . +/// Let I be an import directive that refers to a URI via the string s1. +/// Evaluation of I proceeds as follows: +/// . . . +/// If I is an immediate import then, first +/// • If the URI that is the value of s1 has not yet been accessed by an import +/// or export directive in the current isolate then the contents of the URI +/// are compiled to yield a library B. Because libraries may have mutually +/// recursive imports, care must be taken to avoid an infinite regress. +/// • Otherwise, the contents of the URI denoted by s1 have been compiled into +/// a library B within the current isolate. +/// +/// Let NS0 be the exported namespace of B. Then, for each combinator clause Ci, +/// 1 <= i <= n in I: +/// • If Ci is of the form +/// show id1, ..., idk +/// then let NSi = show([id1, ..., idk], NSi-1) +/// where show(l, n) takes a list of identifiers l and a namespace n, and +/// produces a namespace that maps each name in l to the same element that n +/// does. Furthermore, for each name x in l, if n defines the name x= then +/// the new namespace maps x= to the same element that n does. Otherwise the +/// resulting mapping is undefined. +/// • If Ci is of the form +/// hide id1, ..., idk +/// then let NSi = hide([id1, ..., idk], NSi-1) +/// where hide(l, n) takes a list of identfiers l and a namespace n, and +/// produces a namespace that is identical to n except that for each name k +/// in l, k and k= are undefined. +/// +/// Next, if I includes a prefix clause of the form as p, let NS = NSn ∪ +/// {p : pref ixObject(NSn)} where pref ixObject(NSn) is a prefix object for the +/// namespace NSn, which is an object that has the following members: +/// • For every top level function f named id in NSn, a corresponding method with +/// the same name and signature as f that forwards to f. +/// • For every top level getter with the same name and signature as g named id +/// in NSn, a corresponding getter that forwards to g. +/// • For every top level setter s with the same name and signature as named id +/// in NSn, a corresponding setter that forwards to s. +/// • For every type T named id in NSn, a corresponding getter named id with +/// return type Type, that, when invoked, returns the type object for T. +/// Otherwise, let NS = NSn. It is a compile-time error if the current +/// library declares a top-level member named p. +/// . . . +/// Then, for each entry mapping key k to declaration d in NS, d is made +/// available in the top level scope of L under the name k unless either: +/// • a top-level declaration with the name k exists in L, OR +/// • a prefix clause of the form as k is used in L. +/// +/// @description Checks that it is a compile-time error when prefix value +/// duplicates a function type alias name. +/// @author rodionov + + +import "syntax_lib.dart" as prefix; +// ^ +// [cfe] unspecified + +typedef prefix(int); +// ^ +// [analyzer] unspecified + +main() { + (int) {} is prefix; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/same_name_t07.dart b/Language/Libraries_and_Scripts/Imports/same_name_t07.dart index 3352fa28f3..aa4b4d4e58 100644 --- a/Language/Libraries_and_Scripts/Imports/same_name_t07.dart +++ b/Language/Libraries_and_Scripts/Imports/same_name_t07.dart @@ -1,31 +1,31 @@ -// 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 If a name N is referenced by a library L and N is introduced into -/// the top level scope L by more than one import, and not all the imports denote -/// the same declaration, then: -/// • A static warning occurs. -/// • If N is referenced as a function, getter or setter, a NoSuchMethodError is -/// raised. -/// • If N is referenced as a type, it is treated as a malformed type. -/// It is neither an error nor a warning if N is introduced by two or more -/// imports but never referred to. -/// @description Checks that it is a compile-time error if two different -/// libraries introduce the same name to the top level scope of L and L uses -/// it as a type name reference in an extends clause. -/// @author rodionov - - -import "same_name_t01_p1_lib.dart"; -import "same_name_t01_p2_lib.dart"; -//^ -// [cfe] unspecified - -class Foo2 extends foo {} -// ^ -// [analyzer] unspecified - -main() { - new Foo2(); -} +// 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 If a name N is referenced by a library L and N is introduced into +/// the top level scope L by more than one import, and not all the imports denote +/// the same declaration, then: +/// • A static warning occurs. +/// • If N is referenced as a function, getter or setter, a NoSuchMethodError is +/// raised. +/// • If N is referenced as a type, it is treated as a malformed type. +/// It is neither an error nor a warning if N is introduced by two or more +/// imports but never referred to. +/// @description Checks that it is a compile-time error if two different +/// libraries introduce the same name to the top level scope of L and L uses +/// it as a type name reference in an extends clause. +/// @author rodionov + + +import "same_name_t01_p1_lib.dart"; +import "same_name_t01_p2_lib.dart"; +//^ +// [cfe] unspecified + +class Foo2 extends foo {} +// ^ +// [analyzer] unspecified + +main() { + new Foo2(); +} diff --git a/Language/Libraries_and_Scripts/Imports/same_name_t17.dart b/Language/Libraries_and_Scripts/Imports/same_name_t17.dart index ae75fe3507..cffedeecd4 100644 --- a/Language/Libraries_and_Scripts/Imports/same_name_t17.dart +++ b/Language/Libraries_and_Scripts/Imports/same_name_t17.dart @@ -1,30 +1,30 @@ -// 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 If a name N is referenced by a library L and N is introduced into -/// the top level scope L by more than one import, and not all the imports denote -/// the same declaration, then: -/// • A static warning occurs. -/// • If N is referenced as a function, getter or setter, a NoSuchMethodError is -/// raised. -/// • If N is referenced as a type, it is treated as a malformed type. -/// It is neither an error nor a warning if N is introduced by two or more -/// imports but never referred to. -/// @description Checks that it is a compile error if two different libraries -/// introduce the same name (one of them via re-export) to the top level scope -/// of L and L uses it as a type name reference in an extends clause. -/// @author rodionov - -import "same_name_t11_p1_lib.dart"; -import "same_name_t11_p2_lib.dart"; -//^ -// [cfe] unspecified - -class Foo2 extends foo {} -// ^ -// [analyzer] unspecified - -main() { - new Foo2(); -} +// 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 If a name N is referenced by a library L and N is introduced into +/// the top level scope L by more than one import, and not all the imports denote +/// the same declaration, then: +/// • A static warning occurs. +/// • If N is referenced as a function, getter or setter, a NoSuchMethodError is +/// raised. +/// • If N is referenced as a type, it is treated as a malformed type. +/// It is neither an error nor a warning if N is introduced by two or more +/// imports but never referred to. +/// @description Checks that it is a compile error if two different libraries +/// introduce the same name (one of them via re-export) to the top level scope +/// of L and L uses it as a type name reference in an extends clause. +/// @author rodionov + +import "same_name_t11_p1_lib.dart"; +import "same_name_t11_p2_lib.dart"; +//^ +// [cfe] unspecified + +class Foo2 extends foo {} +// ^ +// [analyzer] unspecified + +main() { + new Foo2(); +} diff --git a/Language/Libraries_and_Scripts/Imports/same_name_t22.dart b/Language/Libraries_and_Scripts/Imports/same_name_t22.dart index 361b048a01..2064b8d49e 100644 --- a/Language/Libraries_and_Scripts/Imports/same_name_t22.dart +++ b/Language/Libraries_and_Scripts/Imports/same_name_t22.dart @@ -1,25 +1,25 @@ -// 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 If a name N is referenced by a library L and N is introduced into -/// the top level scope L by more than one import, and not all the imports denote -/// the same declaration, then: -/// • A static warning occurs. -/// • If N is referenced as a function, getter or setter, a NoSuchMethodError is -/// raised. -/// • If N is referenced as a type, it is treated as a malformed type. -/// It is neither an error nor a warning if N is introduced by two or more -/// imports but never referred to. -/// @description Checks that it is neither warning nor error if two different -/// libraries imported with an empty prefix introduce the same name to the -/// import namespace of L (both via re-export of a third library), but L doesn't -/// reference it. -/// @author rodionov - - -import "same_name_t20_p1_lib.dart"; -import "same_name_t20_p2_lib.dart"; - -main() { -} +// 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 If a name N is referenced by a library L and N is introduced into +/// the top level scope L by more than one import, and not all the imports denote +/// the same declaration, then: +/// • A static warning occurs. +/// • If N is referenced as a function, getter or setter, a NoSuchMethodError is +/// raised. +/// • If N is referenced as a type, it is treated as a malformed type. +/// It is neither an error nor a warning if N is introduced by two or more +/// imports but never referred to. +/// @description Checks that it is neither warning nor error if two different +/// libraries imported with an empty prefix introduce the same name to the +/// import namespace of L (both via re-export of a third library), but L doesn't +/// reference it. +/// @author rodionov + + +import "same_name_t20_p1_lib.dart"; +import "same_name_t20_p2_lib.dart"; + +main() { +} diff --git a/Language/Libraries_and_Scripts/Imports/same_name_t23.dart b/Language/Libraries_and_Scripts/Imports/same_name_t23.dart index 3bd8248d10..87f48909e5 100644 --- a/Language/Libraries_and_Scripts/Imports/same_name_t23.dart +++ b/Language/Libraries_and_Scripts/Imports/same_name_t23.dart @@ -1,38 +1,38 @@ -// 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 If a name N is referenced by a library L and N is introduced into -/// the top level scope L by more than one import, and not all the imports denote -/// the same declaration, then: -/// • A static warning occurs. -/// • If N is referenced as a function, getter or setter, a NoSuchMethodError is -/// raised. -/// • If N is referenced as a type, it is treated as a malformed type. -/// It is neither an error nor a warning if N is introduced by two or more -/// imports but never referred to. -/// @description Checks that it is neither error nor warning if a library -/// imports two other libraries exporting the same name (both via re-export of a -/// third library), references that name in an explicit type test and other -/// expressions, but it's hidden in one of the import declarations of L (so -/// there's actually no name clash). -/// @author rodionov - - -import "same_name_t20_p1_lib.dart" hide foo, Bar, id; -import "same_name_t20_p2_lib.dart"; - -class Foo2 extends foo {} - -class Foo3 {} - -main() { - 1 is foo; - null as foo?; - new foo(); - new Foo2(); - new Foo3(); - Bar.BAR; - Bar.BAR = 11; - id is foo; -} +// 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 If a name N is referenced by a library L and N is introduced into +/// the top level scope L by more than one import, and not all the imports denote +/// the same declaration, then: +/// • A static warning occurs. +/// • If N is referenced as a function, getter or setter, a NoSuchMethodError is +/// raised. +/// • If N is referenced as a type, it is treated as a malformed type. +/// It is neither an error nor a warning if N is introduced by two or more +/// imports but never referred to. +/// @description Checks that it is neither error nor warning if a library +/// imports two other libraries exporting the same name (both via re-export of a +/// third library), references that name in an explicit type test and other +/// expressions, but it's hidden in one of the import declarations of L (so +/// there's actually no name clash). +/// @author rodionov + + +import "same_name_t20_p1_lib.dart" hide foo, Bar, id; +import "same_name_t20_p2_lib.dart"; + +class Foo2 extends foo {} + +class Foo3 {} + +main() { + 1 is foo; + null as foo?; + new foo(); + new Foo2(); + new Foo3(); + Bar.BAR; + Bar.BAR = 11; + id is foo; +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t01.dart b/Language/Libraries_and_Scripts/Imports/syntax_t01.dart index 5c1ba112f8..09266174ff 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t01.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t01.dart @@ -1,33 +1,33 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when an import -/// directive starts with '#' symbol. -/// @author vasya - - -#import "syntax_lib.dart"; -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when an import +/// directive starts with '#' symbol. +/// @author vasya + + +#import "syntax_lib.dart"; +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t02.dart b/Language/Libraries_and_Scripts/Imports/syntax_t02.dart index 7eb16a56dd..73334fc6c3 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t02.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t02.dart @@ -1,36 +1,36 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when the URI in an -/// import directive is enclosed in parentheses. -/// @author vasya - - -import("syntax_lib.dart"); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when the URI in an +/// import directive is enclosed in parentheses. +/// @author vasya + + +import("syntax_lib.dart"); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t03.dart b/Language/Libraries_and_Scripts/Imports/syntax_t03.dart index 0f804867d3..0147657d1a 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t03.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t03.dart @@ -1,36 +1,36 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when the URI is not -/// enclosed in quotes. -/// @author vasya - - -import syntax_lib.dart; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when the URI is not +/// enclosed in quotes. +/// @author vasya + + +import syntax_lib.dart; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t04.dart b/Language/Libraries_and_Scripts/Imports/syntax_t04.dart index 428a34c5bd..ad55bee441 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t04.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t04.dart @@ -1,36 +1,36 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when the URI is not -/// enclosed in quotes. -/// @author msyabro - - -import syntax_lib.dart as prfx; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when the URI is not +/// enclosed in quotes. +/// @author msyabro + + +import syntax_lib.dart as prfx; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t05.dart b/Language/Libraries_and_Scripts/Imports/syntax_t05.dart index deae7b3909..bdb118c5fb 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t05.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t05.dart @@ -1,33 +1,33 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when an import directive -/// does not end with semicolon. -/// @author vasya - - -import "syntax_lib.dart" -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when an import directive +/// does not end with semicolon. +/// @author vasya + + +import "syntax_lib.dart" +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t06.dart b/Language/Libraries_and_Scripts/Imports/syntax_t06.dart index c972f9483d..549d834828 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t06.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t06.dart @@ -1,36 +1,36 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when there's no -/// identifier after the 'as' keyword. -/// @author vasya - - -import "syntax_lib.dart" as; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when there's no +/// identifier after the 'as' keyword. +/// @author vasya + + +import "syntax_lib.dart" as; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t07.dart b/Language/Libraries_and_Scripts/Imports/syntax_t07.dart index 03821da299..004b4a6364 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t07.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t07.dart @@ -1,36 +1,36 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when there's an invalid -/// identifier after the 'as' keyword. -/// @author rodionov - - -import "syntax_lib.dart" as id.entifier; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when there's an invalid +/// identifier after the 'as' keyword. +/// @author rodionov + + +import "syntax_lib.dart" as id.entifier; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t08.dart b/Language/Libraries_and_Scripts/Imports/syntax_t08.dart index b174e00824..590d9b24c5 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t08.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t08.dart @@ -1,36 +1,36 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when there's an invalid -/// identifier after the 'as' keyword. -/// @author rodionov - - -import "syntax_lib.dart" as 28digits; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when there's an invalid +/// identifier after the 'as' keyword. +/// @author rodionov + + +import "syntax_lib.dart" as 28digits; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t09.dart b/Language/Libraries_and_Scripts/Imports/syntax_t09.dart index f32c96f969..7d4e9bf09a 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t09.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t09.dart @@ -1,36 +1,36 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error if the identifier after -/// 'as' keyword is enclosed in quotes. -/// @author vasya - - -import "syntax_lib.dart" as "lib"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error if the identifier after +/// 'as' keyword is enclosed in quotes. +/// @author vasya + + +import "syntax_lib.dart" as "lib"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t10.dart b/Language/Libraries_and_Scripts/Imports/syntax_t10.dart index baa26c3537..a43d8a8e15 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t10.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t10.dart @@ -1,36 +1,36 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error if the identifier after -/// 'as' keyword is enclosed in single quotes. -/// @author vasya - - -import "syntax_lib.dart" as 'lib'; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error if the identifier after +/// 'as' keyword is enclosed in single quotes. +/// @author vasya + + +import "syntax_lib.dart" as 'lib'; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t11.dart b/Language/Libraries_and_Scripts/Imports/syntax_t11.dart index 2fc292432a..02f79fef71 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t11.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t11.dart @@ -1,33 +1,33 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when the URI of the -/// library being imported is missing entirely. -/// @author vasya - - -import as lib; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - var someVar = 0; -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when the URI of the +/// library being imported is missing entirely. +/// @author vasya + + +import as lib; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + var someVar = 0; +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t12.dart b/Language/Libraries_and_Scripts/Imports/syntax_t12.dart index 55b6977ca5..d2405468a8 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t12.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t12.dart @@ -1,34 +1,34 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when the 'as' keyword is -/// missing in the import directive while the subsequent identifier isn't. -/// @author msyabro -/// @reviewer rodionov - - -import "syntax_lib.dart" lib; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when the 'as' keyword is +/// missing in the import directive while the subsequent identifier isn't. +/// @author msyabro +/// @reviewer rodionov + + +import "syntax_lib.dart" lib; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t13.dart b/Language/Libraries_and_Scripts/Imports/syntax_t13.dart index ac5337f454..e9e5a34fba 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t13.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t13.dart @@ -1,33 +1,33 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when there is an additive -/// expression in place of the URI. -/// @author msyabro - - -import 7 + 7; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - var someVar = 0; -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when there is an additive +/// expression in place of the URI. +/// @author msyabro + + +import 7 + 7; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + var someVar = 0; +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t14.dart b/Language/Libraries_and_Scripts/Imports/syntax_t14.dart index 7af2cd1bf2..f02c0d352a 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t14.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t14.dart @@ -1,36 +1,36 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when there is an additive -/// expression in place of the identifier (prefix). -/// @author msyabro - - -import "syntax_lib.dart" as 2+2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when there is an additive +/// expression in place of the identifier (prefix). +/// @author msyabro + + +import "syntax_lib.dart" as 2+2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t16.dart b/Language/Libraries_and_Scripts/Imports/syntax_t16.dart index b9f8474f90..e352208544 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t16.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t16.dart @@ -1,36 +1,36 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when there're two -/// 'as' clauses in an import directive. -/// @author rodionov - - -import 'syntax_lib.dart' as lib1 as lib2; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when there're two +/// 'as' clauses in an import directive. +/// @author rodionov + + +import 'syntax_lib.dart' as lib1 as lib2; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t17.dart b/Language/Libraries_and_Scripts/Imports/syntax_t17.dart index 9a0e313c3a..cf41a88e1d 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t17.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t17.dart @@ -1,33 +1,33 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error if the URI is an invalid -/// string literal -/// @author msyabro - - -import '1_Imports'_lib.dart'; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - var someVar = 0; -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error if the URI is an invalid +/// string literal +/// @author msyabro + + +import '1_Imports'_lib.dart'; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + var someVar = 0; +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t18.dart b/Language/Libraries_and_Scripts/Imports/syntax_t18.dart index 7a0e931657..3671586829 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t18.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t18.dart @@ -1,33 +1,33 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when an import directive -/// is followed immediately by a semicolon; -/// @author msyabro - - -import; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - var someVar = 0; -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when an import directive +/// is followed immediately by a semicolon; +/// @author msyabro + + +import; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + var someVar = 0; +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t19.dart b/Language/Libraries_and_Scripts/Imports/syntax_t19.dart index 75ffd775a7..11f40a2637 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t19.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t19.dart @@ -1,36 +1,36 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when the parts of an -/// import directive are specified in the wrong order. -/// @author rodionov - - -import "syntax_lib.dart" show foo as prfx; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when the parts of an +/// import directive are specified in the wrong order. +/// @author rodionov + + +import "syntax_lib.dart" show foo as prfx; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t20.dart b/Language/Libraries_and_Scripts/Imports/syntax_t20.dart index 51ed1f9386..90082b1ea3 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t20.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t20.dart @@ -1,33 +1,33 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error if the URI is missing -/// in an import directive. -/// @author rodionov - - -import as lib show foo; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - var someVar = 0; -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error if the URI is missing +/// in an import directive. +/// @author rodionov + + +import as lib show foo; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + var someVar = 0; +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t21.dart b/Language/Libraries_and_Scripts/Imports/syntax_t21.dart index 33b176a695..8b00272b98 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t21.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t21.dart @@ -1,37 +1,37 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error if the parts of an import -/// directive are specified in the wrong order. -/// @author rodionov -/// @reviewer kaigorodov - - -import show foo hide someVar "syntax_lib.dart" as prfx; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error if the parts of an import +/// directive are specified in the wrong order. +/// @author rodionov +/// @reviewer kaigorodov + + +import show foo hide someVar "syntax_lib.dart" as prfx; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t22.dart b/Language/Libraries_and_Scripts/Imports/syntax_t22.dart index 05c2700258..a3cc07a34c 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t22.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t22.dart @@ -1,36 +1,36 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error if the parts of an import -/// directive are separated by commas. -/// @author rodionov -/// @reviewer kaigorodov - - -import "syntax_lib.dart", as prfx, show foo; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -//^ -// [analyzer] unspecified -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error if the parts of an import +/// directive are separated by commas. +/// @author rodionov +/// @reviewer kaigorodov + + +import "syntax_lib.dart", as prfx, show foo; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +//^ +// [analyzer] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t23.dart b/Language/Libraries_and_Scripts/Imports/syntax_t23.dart index bb0a940b89..51bb52c75a 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t23.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t23.dart @@ -1,33 +1,33 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error if the value of a -/// show/hide combinator is a list literal. -/// @author rodionov - - -import "syntax_lib.dart" as prfx show [foo, someVar]; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error if the value of a +/// show/hide combinator is a list literal. +/// @author rodionov + + +import "syntax_lib.dart" as prfx show [foo, someVar]; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t24.dart b/Language/Libraries_and_Scripts/Imports/syntax_t24.dart index 52ffb72585..5c6c0dd50f 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t24.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t24.dart @@ -1,33 +1,33 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error if the value of a -/// show/hide combinator is a list literal. -/// @author rodionov - - -import "syntax_lib.dart" hide [foo, someVar]; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error if the value of a +/// show/hide combinator is a list literal. +/// @author rodionov + + +import "syntax_lib.dart" hide [foo, someVar]; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t27.dart b/Language/Libraries_and_Scripts/Imports/syntax_t27.dart index ea1c1ed170..705c800d8c 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t27.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t27.dart @@ -1,36 +1,36 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when there's an ampersand -/// character in an import directive. -/// @author rodionov - - -import "syntax_lib.dart" as lib & export; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when there's an ampersand +/// character in an import directive. +/// @author rodionov + + +import "syntax_lib.dart" as lib & export; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t28.dart b/Language/Libraries_and_Scripts/Imports/syntax_t28.dart index eaf334a86b..3d4a138d39 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t28.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t28.dart @@ -1,36 +1,36 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when there's an ampersand -/// character in an import directive. -/// @author rodionov - - -import "syntax_lib.dart" as lib & "export I guess"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when there's an ampersand +/// character in an import directive. +/// @author rodionov + + +import "syntax_lib.dart" as lib & "export I guess"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t29.dart b/Language/Libraries_and_Scripts/Imports/syntax_t29.dart index a6e172e036..79b0d4cc1e 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t29.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t29.dart @@ -1,36 +1,36 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when the arguments of a -/// show/hide combinator include an invalid identifier. -/// @author rodionov - - -import "syntax_lib.dart" show fo.o; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when the arguments of a +/// show/hide combinator include an invalid identifier. +/// @author rodionov + + +import "syntax_lib.dart" show fo.o; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t30.dart b/Language/Libraries_and_Scripts/Imports/syntax_t30.dart index 653850af09..112671874a 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t30.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t30.dart @@ -1,35 +1,35 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when the arguments of a -/// show/hide combinator include an invalid identifier. -/// @author rodionov - - -import "syntax_lib.dart" show foo, 8ar; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -//^ -// [analyzer] unspecified -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when the arguments of a +/// show/hide combinator include an invalid identifier. +/// @author rodionov + + +import "syntax_lib.dart" show foo, 8ar; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +//^ +// [analyzer] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t31.dart b/Language/Libraries_and_Scripts/Imports/syntax_t31.dart index 0f1204247e..6417838cb9 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t31.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t31.dart @@ -1,33 +1,33 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when the arguments of a -/// show/hide combinator include an invalid identifier. -/// @author rodionov - - -import "syntax_lib.dart" hide foo, 8ar; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when the arguments of a +/// show/hide combinator include an invalid identifier. +/// @author rodionov + + +import "syntax_lib.dart" hide foo, 8ar; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t32.dart b/Language/Libraries_and_Scripts/Imports/syntax_t32.dart index 07a170a5bd..3f6840d249 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t32.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t32.dart @@ -1,33 +1,33 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when the arguments of a -/// show/hide combinator include an invalid identifier. -/// @author rodionov - - -import "syntax_lib.dart" hide foo, фу; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when the arguments of a +/// show/hide combinator include an invalid identifier. +/// @author rodionov + + +import "syntax_lib.dart" hide foo, фу; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t33.dart b/Language/Libraries_and_Scripts/Imports/syntax_t33.dart index a33b11cb50..d258c06f7e 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t33.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t33.dart @@ -1,33 +1,33 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when the arguments of a -/// show/hide combinator include a string literal. -/// @author rodionov - - -import "syntax_lib.dart" hide foo, "someVar"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when the arguments of a +/// show/hide combinator include a string literal. +/// @author rodionov + + +import "syntax_lib.dart" hide foo, "someVar"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t34.dart b/Language/Libraries_and_Scripts/Imports/syntax_t34.dart index 2828e7f762..41071bde4e 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t34.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t34.dart @@ -1,35 +1,35 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error when the arguments of a -/// show/hide combinator include a string literal. -/// @author rodionov - - -import "syntax_lib.dart" show foo, "someVar"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - someVar = 0; -//^ -// [analyzer] unspecified -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error when the arguments of a +/// show/hide combinator include a string literal. +/// @author rodionov + + +import "syntax_lib.dart" show foo, "someVar"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + someVar = 0; +//^ +// [analyzer] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t39.dart b/Language/Libraries_and_Scripts/Imports/syntax_t39.dart index 5a482c5862..5b073acb31 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t39.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t39.dart @@ -1,35 +1,35 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error if there're no -/// identifiers following a show combinator in an import declaration. -/// @author rodionov - - -import "syntax_lib.dart" show; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - var x = foo; -// ^ -// [analyzer] unspecified -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error if there're no +/// identifiers following a show combinator in an import declaration. +/// @author rodionov + + +import "syntax_lib.dart" show; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + var x = foo; +// ^ +// [analyzer] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t40.dart b/Language/Libraries_and_Scripts/Imports/syntax_t40.dart index 090d99f151..3d1acba387 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t40.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t40.dart @@ -1,33 +1,33 @@ -// 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error if there're no -/// identifiers following a hide combinator in an import declaration. -/// @author rodionov - - -import "syntax_lib.dart" hide; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - var x = foo; -} +// 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error if there're no +/// identifiers following a hide combinator in an import declaration. +/// @author rodionov + + +import "syntax_lib.dart" hide; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + var x = foo; +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t41.dart b/Language/Libraries_and_Scripts/Imports/syntax_t41.dart index 0db073c75c..b13720edc9 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t41.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t41.dart @@ -1,33 +1,33 @@ -// Copyright (c) 2016, 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error if there is no as clause -/// in a deferred import declaration. -/// @author ngl@unipro.ru - - -import "syntax_lib.dart" deferred; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - var x = foo; -} +// Copyright (c) 2016, 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error if there is no as clause +/// in a deferred import declaration. +/// @author ngl@unipro.ru + + +import "syntax_lib.dart" deferred; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + var x = foo; +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t42.dart b/Language/Libraries_and_Scripts/Imports/syntax_t42.dart index d391bba13a..3e579fd14a 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t42.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t42.dart @@ -1,36 +1,36 @@ -// Copyright (c) 2016, 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error if there're no an -/// identifier in as clause of a deferred import declaration. -/// @author ngl@unipro.ru - - -import "syntax_lib.dart" deferred as; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - var x = foo; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// Copyright (c) 2016, 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error if there're no an +/// identifier in as clause of a deferred import declaration. +/// @author ngl@unipro.ru + + +import "syntax_lib.dart" deferred as; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + var x = foo; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Imports/syntax_t43.dart b/Language/Libraries_and_Scripts/Imports/syntax_t43.dart index d01a6de783..39cf317f52 100644 --- a/Language/Libraries_and_Scripts/Imports/syntax_t43.dart +++ b/Language/Libraries_and_Scripts/Imports/syntax_t43.dart @@ -1,33 +1,33 @@ -// Copyright (c) 2016, 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 An import specifies a library to be used in the scope of another -/// library. -/// libraryImport: -/// metadata importSpecification -/// ; -/// importSpecification: -/// import uri (as identifier)? combinator* ‘;’ | -/// import uri deferred as identifier combinator* ‘;’ -/// ; -/// combinator: -/// show identifierList | -/// hide identifierList -/// ; -/// identifierList: -/// identifier (, identifier)* -/// ; -/// @description Checks that it is a compile-time error if as clause precedes -/// deferred clause in a deferred import declaration. -/// @author ngl@unipro.ru - - -import "syntax_lib.dart" as p deferred; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - var x = p.foo; -} +// Copyright (c) 2016, 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 An import specifies a library to be used in the scope of another +/// library. +/// libraryImport: +/// metadata importSpecification +/// ; +/// importSpecification: +/// import uri (as identifier)? combinator* ‘;’ | +/// import uri deferred as identifier combinator* ‘;’ +/// ; +/// combinator: +/// show identifierList | +/// hide identifierList +/// ; +/// identifierList: +/// identifier (, identifier)* +/// ; +/// @description Checks that it is a compile-time error if as clause precedes +/// deferred clause in a deferred import declaration. +/// @author ngl@unipro.ru + + +import "syntax_lib.dart" as p deferred; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + var x = p.foo; +} diff --git a/Language/Libraries_and_Scripts/Parts/compilation_t01.dart b/Language/Libraries_and_Scripts/Parts/compilation_t01.dart index 0e31f56378..b0798673d7 100644 --- a/Language/Libraries_and_Scripts/Parts/compilation_t01.dart +++ b/Language/Libraries_and_Scripts/Parts/compilation_t01.dart @@ -1,24 +1,24 @@ -// 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 Compiling a part directive of the form part s; causes the Dart -/// system to attempt to compile the contents of the URI that is the value of s. -/// The top-level declarations at that URI are then compiled by the Dart compiler -/// in the scope of the current library. It is a compile-time error if the -/// contents of the URI are not a valid part declaration. -/// @description Checks that it is a compile-time error when names in the -/// included file conflict with top-level definitions in this library. -/// @author rodionov -/// @issue 44990 - -library Parts_test_lib; -part "part_0.dart"; - -var foo; - -main() { - foo = 1; -// ^ -// [cfe] unspecified -} +// 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 Compiling a part directive of the form part s; causes the Dart +/// system to attempt to compile the contents of the URI that is the value of s. +/// The top-level declarations at that URI are then compiled by the Dart compiler +/// in the scope of the current library. It is a compile-time error if the +/// contents of the URI are not a valid part declaration. +/// @description Checks that it is a compile-time error when names in the +/// included file conflict with top-level definitions in this library. +/// @author rodionov +/// @issue 44990 + +library Parts_test_lib; +part "part_0.dart"; + +var foo; + +main() { + foo = 1; +// ^ +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Parts/compilation_t02.dart b/Language/Libraries_and_Scripts/Parts/compilation_t02.dart index 2dea600f2e..06bda57b5d 100644 --- a/Language/Libraries_and_Scripts/Parts/compilation_t02.dart +++ b/Language/Libraries_and_Scripts/Parts/compilation_t02.dart @@ -1,23 +1,23 @@ -// 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 It is a static warning if the referenced part declaration p names -/// a library other than the current library as the library to which p belongs. -/// @description Checks that it is a static warning if the referenced part names -/// another library, but not a compile-time error and all definitions from such -/// part are available without errors. -/// @description Checks that it is a compile-time error if there're two part -/// directives referencing the same URI. -/// @author rodionov -/// @issue 46998 - -library Parts_test_lib; -part "part_2.dart"; -part "part_2.dart"; -// ^ -// [analyzer] unspecified - -main() { - foo is int; -} +// 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 It is a static warning if the referenced part declaration p names +/// a library other than the current library as the library to which p belongs. +/// @description Checks that it is a static warning if the referenced part names +/// another library, but not a compile-time error and all definitions from such +/// part are available without errors. +/// @description Checks that it is a compile-time error if there're two part +/// directives referencing the same URI. +/// @author rodionov +/// @issue 46998 + +library Parts_test_lib; +part "part_2.dart"; +part "part_2.dart"; +// ^ +// [analyzer] unspecified + +main() { + foo is int; +} diff --git a/Language/Libraries_and_Scripts/Parts/compilation_t07.dart b/Language/Libraries_and_Scripts/Parts/compilation_t07.dart index 990ed8345e..f35672fe58 100644 --- a/Language/Libraries_and_Scripts/Parts/compilation_t07.dart +++ b/Language/Libraries_and_Scripts/Parts/compilation_t07.dart @@ -1,25 +1,25 @@ -// 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 Compiling a part directive of the form part s; causes the Dart -/// system to attempt to compile the contents of the URI that is the value of s. -/// The top-level declarations at that URI are then compiled by the Dart compiler -/// in the scope of the current library. It is a compile-time error if the -/// contents of the URI are not a valid part declaration. -/// @description Checks that it is a compile-time error when the included -/// compilation unit contains a library definition instead of a part declaration. -/// @author rodionov - -library Parts_test_lib; -part "part_9_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - var x = foo; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Compiling a part directive of the form part s; causes the Dart +/// system to attempt to compile the contents of the URI that is the value of s. +/// The top-level declarations at that URI are then compiled by the Dart compiler +/// in the scope of the current library. It is a compile-time error if the +/// contents of the URI are not a valid part declaration. +/// @description Checks that it is a compile-time error when the included +/// compilation unit contains a library definition instead of a part declaration. +/// @author rodionov + +library Parts_test_lib; +part "part_9_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + var x = foo; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Scripts/syntax_t04.dart b/Language/Libraries_and_Scripts/Scripts/syntax_t04.dart index ce863643f8..7540b44240 100644 --- a/Language/Libraries_and_Scripts/Scripts/syntax_t04.dart +++ b/Language/Libraries_and_Scripts/Scripts/syntax_t04.dart @@ -1,24 +1,24 @@ -class C {} -#! scripts tag // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -// 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 script is a library whose exported namespace includes a -/// top-level function main(). -/// -/// libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// @description Checks that it is a compile-time error when a top-level -/// definition (a class declaration) comes before the script tag. -/// @author msyabro - - -main() { - C(); -} +class C {} +#! scripts tag // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +// 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 script is a library whose exported namespace includes a +/// top-level function main(). +/// +/// libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// @description Checks that it is a compile-time error when a top-level +/// definition (a class declaration) comes before the script tag. +/// @author msyabro + + +main() { + C(); +} diff --git a/Language/Libraries_and_Scripts/Scripts/syntax_t07.dart b/Language/Libraries_and_Scripts/Scripts/syntax_t07.dart index 7206b94ff4..2e0cc763e8 100644 --- a/Language/Libraries_and_Scripts/Scripts/syntax_t07.dart +++ b/Language/Libraries_and_Scripts/Scripts/syntax_t07.dart @@ -1,28 +1,28 @@ -#! scripts tag -// 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 script is a library whose exported namespace includes a -/// top-level function main(). -/// -/// libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// @description Checks that it is a compile-time error when a top level -/// definition (an interface declaration) comes before the library name. -/// @author msyabro - - -abstract class I {} -library Script_A01_t09; -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - I(); -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +#! scripts tag +// 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 script is a library whose exported namespace includes a +/// top-level function main(). +/// +/// libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// @description Checks that it is a compile-time error when a top level +/// definition (an interface declaration) comes before the library name. +/// @author msyabro + + +abstract class I {} +library Script_A01_t09; +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + I(); +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Scripts/syntax_t09.dart b/Language/Libraries_and_Scripts/Scripts/syntax_t09.dart index 8000656abf..ebe11657f7 100644 --- a/Language/Libraries_and_Scripts/Scripts/syntax_t09.dart +++ b/Language/Libraries_and_Scripts/Scripts/syntax_t09.dart @@ -1,29 +1,29 @@ -#! scripts tag -// 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 script is a library whose exported namespace includes a -/// top-level function main(). -/// -/// libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// @description Checks that it is a compile-time error when a top level -/// definition (function type alias) comes before an import directive. -/// @author msyabro - - -typedef f(p1, p2); - -import "library1.dart"; -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f func = (p1, p2) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +#! scripts tag +// 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 script is a library whose exported namespace includes a +/// top-level function main(). +/// +/// libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// @description Checks that it is a compile-time error when a top level +/// definition (function type alias) comes before an import directive. +/// @author msyabro + + +typedef f(p1, p2); + +import "library1.dart"; +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f func = (p1, p2) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/Scripts/syntax_t10.dart b/Language/Libraries_and_Scripts/Scripts/syntax_t10.dart index f37a083986..5abc328821 100644 --- a/Language/Libraries_and_Scripts/Scripts/syntax_t10.dart +++ b/Language/Libraries_and_Scripts/Scripts/syntax_t10.dart @@ -1,26 +1,26 @@ -#! scripts tag -// 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 script is a library whose exported namespace includes a -/// top-level function main(). -/// -/// libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// @description Checks that is a compile-time error when a variable -/// declaration comes before a part directive. -/// @author vasya - -library syntax_t10_lib; - -final int script = 1; -part "syntax_t10_lib.dart"; -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(script); -} +#! scripts tag +// 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 script is a library whose exported namespace includes a +/// top-level function main(). +/// +/// libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// @description Checks that is a compile-time error when a variable +/// declaration comes before a part directive. +/// @author vasya + +library syntax_t10_lib; + +final int script = 1; +part "syntax_t10_lib.dart"; +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(script); +} diff --git a/Language/Libraries_and_Scripts/Scripts/top_level_syntax_t15.dart b/Language/Libraries_and_Scripts/Scripts/top_level_syntax_t15.dart index e32896c87d..286e6dadb9 100644 --- a/Language/Libraries_and_Scripts/Scripts/top_level_syntax_t15.dart +++ b/Language/Libraries_and_Scripts/Scripts/top_level_syntax_t15.dart @@ -1,38 +1,38 @@ -// 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 script is a library whose exported namespace includes a -/// top-level function main(). -/// -/// libraryDefinition: -/// scriptTag? libraryName? importOrImport* partDirective* topLevelDefinition* -/// ; -/// topLevelDefinition: -/// classDefinition | -/// enumType | -/// typeAlias | -/// external? functionSignature ‘;’ | -/// external? getterSignature ‘;’ | -/// external? setterSignature ‘;’ | -/// functionSignature functionBody | -/// returnType? get identifier functionBody | -/// returnType? set identifier formalParameterList functionBody | -/// (final | const) type? staticFinalDeclarationList ‘;’ | -/// variableDeclaration ‘;’ -/// ; -/// @description Checks that it is a compile-time error when a comma character -/// is used in place of a top level definition in a script. -/// @author msyabro - - -class C {} -, -//^ -// [analyzer] unspecified -// [cfe] unspecified -class D {} - -main() { - D(); -} +// 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 script is a library whose exported namespace includes a +/// top-level function main(). +/// +/// libraryDefinition: +/// scriptTag? libraryName? importOrImport* partDirective* topLevelDefinition* +/// ; +/// topLevelDefinition: +/// classDefinition | +/// enumType | +/// typeAlias | +/// external? functionSignature ‘;’ | +/// external? getterSignature ‘;’ | +/// external? setterSignature ‘;’ | +/// functionSignature functionBody | +/// returnType? get identifier functionBody | +/// returnType? set identifier formalParameterList functionBody | +/// (final | const) type? staticFinalDeclarationList ‘;’ | +/// variableDeclaration ‘;’ +/// ; +/// @description Checks that it is a compile-time error when a comma character +/// is used in place of a top level definition in a script. +/// @author msyabro + + +class C {} +, +//^ +// [analyzer] unspecified +// [cfe] unspecified +class D {} + +main() { + D(); +} diff --git a/Language/Libraries_and_Scripts/Scripts/top_level_syntax_t16.dart b/Language/Libraries_and_Scripts/Scripts/top_level_syntax_t16.dart index 2a75e290e4..70a383e66a 100644 --- a/Language/Libraries_and_Scripts/Scripts/top_level_syntax_t16.dart +++ b/Language/Libraries_and_Scripts/Scripts/top_level_syntax_t16.dart @@ -1,38 +1,38 @@ -// 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 script is a library whose exported namespace includes a -/// top-level function main(). -/// -/// libraryDefinition: -/// scriptTag? libraryName? importOrImport* partDirective* topLevelDefinition* -/// ; -/// topLevelDefinition: -/// classDefinition | -/// enumType | -/// typeAlias | -/// external? functionSignature ‘;’ | -/// external? getterSignature ‘;’ | -/// external? setterSignature ‘;’ | -/// functionSignature functionBody | -/// returnType? get identifier functionBody | -/// returnType? set identifier formalParameterList functionBody | -/// (final | const) type? staticFinalDeclarationList ‘;’ | -/// variableDeclaration ‘;’ -/// ; -/// @description Checks that it is a compile-time error when a colon character -/// is used in place of a top level definition in a script. -/// @author msyabro - - -f() {} -: -//^ -// [analyzer] unspecified -// [cfe] unspecified -g() {} - -main() { - g(); -} +// 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 script is a library whose exported namespace includes a +/// top-level function main(). +/// +/// libraryDefinition: +/// scriptTag? libraryName? importOrImport* partDirective* topLevelDefinition* +/// ; +/// topLevelDefinition: +/// classDefinition | +/// enumType | +/// typeAlias | +/// external? functionSignature ‘;’ | +/// external? getterSignature ‘;’ | +/// external? setterSignature ‘;’ | +/// functionSignature functionBody | +/// returnType? get identifier functionBody | +/// returnType? set identifier formalParameterList functionBody | +/// (final | const) type? staticFinalDeclarationList ‘;’ | +/// variableDeclaration ‘;’ +/// ; +/// @description Checks that it is a compile-time error when a colon character +/// is used in place of a top level definition in a script. +/// @author msyabro + + +f() {} +: +//^ +// [analyzer] unspecified +// [cfe] unspecified +g() {} + +main() { + g(); +} diff --git a/Language/Libraries_and_Scripts/Scripts/top_level_syntax_t17.dart b/Language/Libraries_and_Scripts/Scripts/top_level_syntax_t17.dart index 5f885153e5..bb1bbee49a 100644 --- a/Language/Libraries_and_Scripts/Scripts/top_level_syntax_t17.dart +++ b/Language/Libraries_and_Scripts/Scripts/top_level_syntax_t17.dart @@ -1,38 +1,38 @@ -// 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 script is a library whose exported namespace includes a -/// top-level function main(). -/// -/// libraryDefinition: -/// scriptTag? libraryName? importOrImport* partDirective* topLevelDefinition* -/// ; -/// topLevelDefinition: -/// classDefinition | -/// enumType | -/// typeAlias | -/// external? functionSignature ‘;’ | -/// external? getterSignature ‘;’ | -/// external? setterSignature ‘;’ | -/// functionSignature functionBody | -/// returnType? get identifier functionBody | -/// returnType? set identifier formalParameterList functionBody | -/// (final | const) type? staticFinalDeclarationList ‘;’ | -/// variableDeclaration ‘;’ -/// ; -/// @description Checks that it is a compile-time error when a backslash -/// character is used in place of a top level definition in a script. -/// @author msyabro - - -final x = 1; -\ -//^ -// [analyzer] unspecified -// [cfe] unspecified -var y = 2; - -main() { - y = 3; -} +// 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 script is a library whose exported namespace includes a +/// top-level function main(). +/// +/// libraryDefinition: +/// scriptTag? libraryName? importOrImport* partDirective* topLevelDefinition* +/// ; +/// topLevelDefinition: +/// classDefinition | +/// enumType | +/// typeAlias | +/// external? functionSignature ‘;’ | +/// external? getterSignature ‘;’ | +/// external? setterSignature ‘;’ | +/// functionSignature functionBody | +/// returnType? get identifier functionBody | +/// returnType? set identifier formalParameterList functionBody | +/// (final | const) type? staticFinalDeclarationList ‘;’ | +/// variableDeclaration ‘;’ +/// ; +/// @description Checks that it is a compile-time error when a backslash +/// character is used in place of a top level definition in a script. +/// @author msyabro + + +final x = 1; +\ +//^ +// [analyzer] unspecified +// [cfe] unspecified +var y = 2; + +main() { + y = 3; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t01.dart b/Language/Libraries_and_Scripts/definition_syntax_t01.dart index b9af111733..8a5888eb11 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t01.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t01.dart @@ -1,31 +1,31 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-time error if a library includes -/// two library definitions with the same identifier. -/// @author vasya -/// @issue 44990 - -import "definition_syntax_t01_lib.dart"; - -main() { - var someVar = 1; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-time error if a library includes +/// two library definitions with the same identifier. +/// @author vasya +/// @issue 44990 + +import "definition_syntax_t01_lib.dart"; + +main() { + var someVar = 1; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t03.dart b/Language/Libraries_and_Scripts/definition_syntax_t03.dart index 59d8aa26bb..18ba95a036 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t03.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t03.dart @@ -1,31 +1,31 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-error if an import declaration -/// comes before the library name. -/// @author msyabro -/// @issue 44990 - -import "definition_syntax_t03_lib.dart"; - -main() { - var someVar = 1; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-error if an import declaration +/// comes before the library name. +/// @author msyabro +/// @issue 44990 + +import "definition_syntax_t03_lib.dart"; + +main() { + var someVar = 1; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t04.dart b/Language/Libraries_and_Scripts/definition_syntax_t04.dart index 1e45fe66f4..b5d39fcf5d 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t04.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t04.dart @@ -1,31 +1,31 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-error if a part directive comes -/// before the library name. -/// @author rodionov -/// @issue 44990 - -import "definition_syntax_t04_lib.dart"; - -main() { - var someVar = 1; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-error if a part directive comes +/// before the library name. +/// @author rodionov +/// @issue 44990 + +import "definition_syntax_t04_lib.dart"; + +main() { + var someVar = 1; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t05.dart b/Language/Libraries_and_Scripts/definition_syntax_t05.dart index 59ef8fc93a..0f5fddb0b2 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t05.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t05.dart @@ -1,35 +1,35 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-error if an import directive -/// comes before the library name. -/// @author msyabro - - -import "definition_syntax_t05_lib.dart"; -library Libraries_and_Scripts_A04_t08; -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - var someVar = 1; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-error if an import directive +/// comes before the library name. +/// @author msyabro + + +import "definition_syntax_t05_lib.dart"; +library Libraries_and_Scripts_A04_t08; +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + var someVar = 1; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t06.dart b/Language/Libraries_and_Scripts/definition_syntax_t06.dart index 8f9c2ba95f..657b04b5c4 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t06.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t06.dart @@ -1,31 +1,31 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-error if a top-level definition -/// comes before the library name. -/// @author msyabro -/// @issue 44990 - -import "definition_syntax_t06_lib.dart"; - -main() { - var someVar = 1; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-error if a top-level definition +/// comes before the library name. +/// @author msyabro +/// @issue 44990 + +import "definition_syntax_t06_lib.dart"; + +main() { + var someVar = 1; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t07.dart b/Language/Libraries_and_Scripts/definition_syntax_t07.dart index afd1733390..a1d79d4b01 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t07.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t07.dart @@ -1,31 +1,31 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-error if a part directive -/// comes before an import directive. -/// @author msyabro -/// @issue 44990 - -import "definition_syntax_t07_lib.dart"; - -main() { - var someVar = 1; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-error if a part directive +/// comes before an import directive. +/// @author msyabro +/// @issue 44990 + +import "definition_syntax_t07_lib.dart"; + +main() { + var someVar = 1; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t08.dart b/Language/Libraries_and_Scripts/definition_syntax_t08.dart index d0999c3009..d8f9a05199 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t08.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t08.dart @@ -1,31 +1,31 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-error if a top-level definition -/// comes before an import directive. -/// @author msyabro -/// @issue 44990 - -import "definition_syntax_t08_lib.dart"; - -main() { - var someVar = 1; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-error if a top-level definition +/// comes before an import directive. +/// @author msyabro +/// @issue 44990 + +import "definition_syntax_t08_lib.dart"; + +main() { + var someVar = 1; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t09.dart b/Language/Libraries_and_Scripts/definition_syntax_t09.dart index 585c5b027c..ddd9d5e726 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t09.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t09.dart @@ -1,31 +1,31 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-error if a top-level definition -/// comes before a part directive. -/// @author msyabro -/// @issue 44990 - -import "definition_syntax_t09_lib.dart"; - -main() { - var someVar = 1; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-error if a top-level definition +/// comes before a part directive. +/// @author msyabro +/// @issue 44990 + +import "definition_syntax_t09_lib.dart"; + +main() { + var someVar = 1; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t10.dart b/Language/Libraries_and_Scripts/definition_syntax_t10.dart index 3e78eb499e..f2552cfb5a 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t10.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t10.dart @@ -1,31 +1,31 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-error if a library contains -/// two library declarations (with different names). -/// @author msyabro -/// @issue 44990 - -import "definition_syntax_t10_lib.dart"; - -main() { - var someVar = 1; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-error if a library contains +/// two library declarations (with different names). +/// @author msyabro +/// @issue 44990 + +import "definition_syntax_t10_lib.dart"; + +main() { + var someVar = 1; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t14.dart b/Language/Libraries_and_Scripts/definition_syntax_t14.dart index 61e7dbe025..471d6cecf3 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t14.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t14.dart @@ -1,30 +1,30 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks valid library definitions with metadata. -/// @author rodionov - - -import "definition_syntax_t14_lib.dart"; - -main() { - var someVar = 1; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks valid library definitions with metadata. +/// @author rodionov + + +import "definition_syntax_t14_lib.dart"; + +main() { + var someVar = 1; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t15.dart b/Language/Libraries_and_Scripts/definition_syntax_t15.dart index 4fe7fc71b7..a4fe3a571a 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t15.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t15.dart @@ -1,31 +1,31 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-time error when the library name is -/// enclosed in parentheses. -/// @author vasya -/// @issue 44990 - -import "definition_syntax_t15_lib.dart"; - -main() { - var someVar = 1; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-time error when the library name is +/// enclosed in parentheses. +/// @author vasya +/// @issue 44990 + +import "definition_syntax_t15_lib.dart"; + +main() { + var someVar = 1; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t17.dart b/Language/Libraries_and_Scripts/definition_syntax_t17.dart index 65dfe5e804..b371800f54 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t17.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t17.dart @@ -1,34 +1,34 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-time error if the library name is -/// a function invocation expression. -/// @author vasya -/// @issue 44990 - -import "definition_syntax_t17_lib.dart"; - -main() { - bar someVar = 1; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-time error if the library name is +/// a function invocation expression. +/// @author vasya +/// @issue 44990 + +import "definition_syntax_t17_lib.dart"; + +main() { + bar someVar = 1; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t18.dart b/Language/Libraries_and_Scripts/definition_syntax_t18.dart index c445b54865..8120b8d424 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t18.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t18.dart @@ -1,31 +1,31 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-time error if the library directive -/// is missing the library name. -/// @author vasya -/// @issue 44990 - -import "definition_syntax_t18_lib.dart"; - -main() { - var someVar = 0; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-time error if the library directive +/// is missing the library name. +/// @author vasya +/// @issue 44990 + +import "definition_syntax_t18_lib.dart"; + +main() { + var someVar = 0; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t19.dart b/Language/Libraries_and_Scripts/definition_syntax_t19.dart index aa74545b7b..7dae308451 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t19.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t19.dart @@ -1,31 +1,31 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-time error when the library name is -/// enclosed in double quotes. -/// @author rodionov -/// @issue 44990 - -import "definition_syntax_t19_lib.dart"; - -main() { - var someVar = 1; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-time error when the library name is +/// enclosed in double quotes. +/// @author rodionov +/// @issue 44990 + +import "definition_syntax_t19_lib.dart"; + +main() { + var someVar = 1; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t20.dart b/Language/Libraries_and_Scripts/definition_syntax_t20.dart index 4f25d5a3ab..f9193122bc 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t20.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t20.dart @@ -1,31 +1,31 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-time error when the library name is -/// enclosed in single quotes. -/// @author rodionov -/// @issue 44990 - -import "definition_syntax_t20_lib.dart"; - -main() { - var someVar = 1; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-time error when the library name is +/// enclosed in single quotes. +/// @author rodionov +/// @issue 44990 + +import "definition_syntax_t20_lib.dart"; + +main() { + var someVar = 1; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t21.dart b/Language/Libraries_and_Scripts/definition_syntax_t21.dart index f46380ce09..c111e4236f 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t21.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t21.dart @@ -1,31 +1,31 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-time error if the library name is -/// an additive expression rather than an identifier. -/// @author msyabro -/// @issue 44990 - -import "definition_syntax_t21_lib.dart"; - -main() { - var someVar = 0; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-time error if the library name is +/// an additive expression rather than an identifier. +/// @author msyabro +/// @issue 44990 + +import "definition_syntax_t21_lib.dart"; + +main() { + var someVar = 0; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t22.dart b/Language/Libraries_and_Scripts/definition_syntax_t22.dart index 1e4a52dfeb..492aa67643 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t22.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t22.dart @@ -1,31 +1,31 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-time error if the library name is -/// enclosed in square brackets. -/// @author msyabro -/// @issue 44990 - -import "definition_syntax_t22_lib.dart"; - -main() { - var someVar = 0; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-time error if the library name is +/// enclosed in square brackets. +/// @author msyabro +/// @issue 44990 + +import "definition_syntax_t22_lib.dart"; + +main() { + var someVar = 0; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t23.dart b/Language/Libraries_and_Scripts/definition_syntax_t23.dart index f131be8c3e..2f1ead910c 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t23.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t23.dart @@ -1,31 +1,31 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-time error if the library name is -/// enclosed in angle brackets. -/// @author msyabro -/// @issue 44990 - -import "definition_syntax_t23_lib.dart"; - -main() { - var someVar = 0; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-time error if the library name is +/// enclosed in angle brackets. +/// @author msyabro +/// @issue 44990 + +import "definition_syntax_t23_lib.dart"; + +main() { + var someVar = 0; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t24.dart b/Language/Libraries_and_Scripts/definition_syntax_t24.dart index ad35552dea..526e3b7788 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t24.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t24.dart @@ -1,31 +1,31 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-time error if the library name is -/// enclosed in curly braces. -/// @author msyabro -/// @issue 44990 - -import "definition_syntax_t24_lib.dart"; - -main() { - var someVar = 0; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-time error if the library name is +/// enclosed in curly braces. +/// @author msyabro +/// @issue 44990 + +import "definition_syntax_t24_lib.dart"; + +main() { + var someVar = 0; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t25.dart b/Language/Libraries_and_Scripts/definition_syntax_t25.dart index 55afe8a8d3..a70e790f84 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t25.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t25.dart @@ -1,31 +1,31 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-time error if the library name -/// is enclosed in triple single quotes. -/// @author rodionov -/// @issue 44990 - -import "definition_syntax_t25_lib.dart"; - -main() { - var someVar = 1; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-time error if the library name +/// is enclosed in triple single quotes. +/// @author rodionov +/// @issue 44990 + +import "definition_syntax_t25_lib.dart"; + +main() { + var someVar = 1; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t26.dart b/Language/Libraries_and_Scripts/definition_syntax_t26.dart index 4dd3fca3f4..1a8864ad04 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t26.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t26.dart @@ -1,31 +1,31 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-time error if the library name -/// is enclosed in triple double quotes. -/// @author rodionov -/// @issue 44990 - -import "definition_syntax_t26_lib.dart"; - -main() { - var someVar = 1; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-time error if the library name +/// is enclosed in triple double quotes. +/// @author rodionov +/// @issue 44990 + +import "definition_syntax_t26_lib.dart"; + +main() { + var someVar = 1; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t27.dart b/Language/Libraries_and_Scripts/definition_syntax_t27.dart index e8f2164674..49d58df722 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t27.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t27.dart @@ -1,31 +1,31 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-time error if the library name -/// is not a valid identifier (starts with a digit). -/// @author rodionov -/// @issue 44990 - -import "definition_syntax_t27_lib.dart"; - -main() { - var someVar = 1; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-time error if the library name +/// is not a valid identifier (starts with a digit). +/// @author rodionov +/// @issue 44990 + +import "definition_syntax_t27_lib.dart"; + +main() { + var someVar = 1; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t28.dart b/Language/Libraries_and_Scripts/definition_syntax_t28.dart index a1d63efc8d..0268e51062 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t28.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t28.dart @@ -1,34 +1,34 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-time error if the library name -/// is not a valid identifier (starts with a digit). -/// @author rodionov - - -library 13_Libraries_and_Scripts_A03_t16_lib; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - var someVar = 1; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-time error if the library name +/// is not a valid identifier (starts with a digit). +/// @author rodionov + + +library 13_Libraries_and_Scripts_A03_t16_lib; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + var someVar = 1; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t29.dart b/Language/Libraries_and_Scripts/definition_syntax_t29.dart index 6999674de6..18cba46b9f 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t29.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t29.dart @@ -1,31 +1,31 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that it is a compile-time error if the library name -/// is not a valid identifier (contains non-latin characters). -/// @author rodionov -/// @issue 44990 - -import "definition_syntax_t29_lib.dart"; - -main() { - var someVar = 1; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that it is a compile-time error if the library name +/// is not a valid identifier (contains non-latin characters). +/// @author rodionov +/// @issue 44990 + +import "definition_syntax_t29_lib.dart"; + +main() { + var someVar = 1; +} diff --git a/Language/Libraries_and_Scripts/definition_syntax_t30.dart b/Language/Libraries_and_Scripts/definition_syntax_t30.dart index c7e0e79d46..c118f03e1a 100644 --- a/Language/Libraries_and_Scripts/definition_syntax_t30.dart +++ b/Language/Libraries_and_Scripts/definition_syntax_t30.dart @@ -1,30 +1,30 @@ -// 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 libraryDefinition: -/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* -/// ; -/// scriptTag: -/// ‘#!’ ( ̃NEWLINE)* NEWLINE -/// ; -/// libraryName: -/// metadata library identifier (‘.’ identifier)* ‘;’ -/// ; -/// importOrExport: -/// libraryImport | -/// libraryExport -/// ; -/// Libraries may be explicitly named or implicitly named. An explicitly named -/// library begins with the word library (possibly prefaced with any applicable -/// metadata annotations), followed by a qualified identifier that gives the -/// name of the library. -/// @description Checks that the library name can be a qualified identifier -/// @author kaigorodov - - -library Libraries.and.Scripts.A03.t18.lib; - -main() { - var someVar = 1; -} +// 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 libraryDefinition: +/// scriptTag? libraryName? importOrExport* partDirective* topLevelDefinition* +/// ; +/// scriptTag: +/// ‘#!’ ( ̃NEWLINE)* NEWLINE +/// ; +/// libraryName: +/// metadata library identifier (‘.’ identifier)* ‘;’ +/// ; +/// importOrExport: +/// libraryImport | +/// libraryExport +/// ; +/// Libraries may be explicitly named or implicitly named. An explicitly named +/// library begins with the word library (possibly prefaced with any applicable +/// metadata annotations), followed by a qualified identifier that gives the +/// name of the library. +/// @description Checks that the library name can be a qualified identifier +/// @author kaigorodov + + +library Libraries.and.Scripts.A03.t18.lib; + +main() { + var someVar = 1; +} diff --git a/Language/Libraries_and_Scripts/top_level_syntax_t02.dart b/Language/Libraries_and_Scripts/top_level_syntax_t02.dart index cfb7087b0c..fb7bd831cd 100644 --- a/Language/Libraries_and_Scripts/top_level_syntax_t02.dart +++ b/Language/Libraries_and_Scripts/top_level_syntax_t02.dart @@ -1,32 +1,32 @@ -// 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 library consists of (a possibly empty) set of imports, a set -/// of exports, and a set of top level declarations. A top level declaration -/// is either a class, a type alias declaration, a function or a variable -/// declaration. The members of a library L are those top level declarations -/// given within L. -/// topLevelDefinition: -/// classDefinition | -/// enumType | -/// typeAlias | -/// external? functionSignature ';' | -/// external? getterSignature ';' | -/// external? setterSignature ';' | -/// functionSignature functionBody | -/// returnType? get identifier functionBody | -/// returnType? set identifier formalParameterList functionBody | -/// (final | const) type? staticFinalDeclarationList ';' | -/// variableDeclaration ';' -/// ; -/// @description Checks that a null literal can't be a top level definition -/// in a library. -/// @author msyabro -/// @issue 44990 - -import "top_level_syntax_t02_lib.dart"; - -main() { - var someVar = ''; -} +// 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 library consists of (a possibly empty) set of imports, a set +/// of exports, and a set of top level declarations. A top level declaration +/// is either a class, a type alias declaration, a function or a variable +/// declaration. The members of a library L are those top level declarations +/// given within L. +/// topLevelDefinition: +/// classDefinition | +/// enumType | +/// typeAlias | +/// external? functionSignature ';' | +/// external? getterSignature ';' | +/// external? setterSignature ';' | +/// functionSignature functionBody | +/// returnType? get identifier functionBody | +/// returnType? set identifier formalParameterList functionBody | +/// (final | const) type? staticFinalDeclarationList ';' | +/// variableDeclaration ';' +/// ; +/// @description Checks that a null literal can't be a top level definition +/// in a library. +/// @author msyabro +/// @issue 44990 + +import "top_level_syntax_t02_lib.dart"; + +main() { + var someVar = ''; +} diff --git a/Language/Libraries_and_Scripts/top_level_syntax_t03.dart b/Language/Libraries_and_Scripts/top_level_syntax_t03.dart index f96e576788..bdae2f2dd2 100644 --- a/Language/Libraries_and_Scripts/top_level_syntax_t03.dart +++ b/Language/Libraries_and_Scripts/top_level_syntax_t03.dart @@ -1,32 +1,32 @@ -// 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 library consists of (a possibly empty) set of imports, a set -/// of exports, and a set of top level declarations. A top level declaration -/// is either a class, a type alias declaration, a function or a variable -/// declaration. The members of a library L are those top level declarations -/// given within L. -/// topLevelDefinition: -/// classDefinition | -/// enumType | -/// typeAlias | -/// external? functionSignature ';' | -/// external? getterSignature ';' | -/// external? setterSignature ';' | -/// functionSignature functionBody | -/// returnType? get identifier functionBody | -/// returnType? set identifier formalParameterList functionBody | -/// (final | const) type? staticFinalDeclarationList ';' | -/// variableDeclaration ';' -/// ; -/// @description Checks that a string literal can't be a top level definition -/// in a library. -/// @author msyabro -/// @issue 44990 - -import 'top_level_syntax_t03_lib.dart'; - -main() { - var someVar = ''; -} +// 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 library consists of (a possibly empty) set of imports, a set +/// of exports, and a set of top level declarations. A top level declaration +/// is either a class, a type alias declaration, a function or a variable +/// declaration. The members of a library L are those top level declarations +/// given within L. +/// topLevelDefinition: +/// classDefinition | +/// enumType | +/// typeAlias | +/// external? functionSignature ';' | +/// external? getterSignature ';' | +/// external? setterSignature ';' | +/// functionSignature functionBody | +/// returnType? get identifier functionBody | +/// returnType? set identifier formalParameterList functionBody | +/// (final | const) type? staticFinalDeclarationList ';' | +/// variableDeclaration ';' +/// ; +/// @description Checks that a string literal can't be a top level definition +/// in a library. +/// @author msyabro +/// @issue 44990 + +import 'top_level_syntax_t03_lib.dart'; + +main() { + var someVar = ''; +} diff --git a/Language/Libraries_and_Scripts/top_level_syntax_t04.dart b/Language/Libraries_and_Scripts/top_level_syntax_t04.dart index c754234bf3..27b25f790e 100644 --- a/Language/Libraries_and_Scripts/top_level_syntax_t04.dart +++ b/Language/Libraries_and_Scripts/top_level_syntax_t04.dart @@ -1,32 +1,32 @@ -// 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 library consists of (a possibly empty) set of imports, a set -/// of exports, and a set of top level declarations. A top level declaration -/// is either a class, a type alias declaration, a function or a variable -/// declaration. The members of a library L are those top level declarations -/// given within L. -/// topLevelDefinition: -/// classDefinition | -/// enumType | -/// typeAlias | -/// external? functionSignature ';' | -/// external? getterSignature ';' | -/// external? setterSignature ';' | -/// functionSignature functionBody | -/// returnType? get identifier functionBody | -/// returnType? set identifier formalParameterList functionBody | -/// (final | const) type? staticFinalDeclarationList ';' | -/// variableDeclaration ';' -/// ; -/// @description Checks that a number literal can't be a top level definition -/// in a library. -/// @author msyabro -/// @issue 44990 - -import 'top_level_syntax_t04_lib.dart'; - -main() { - var someVar = ''; -} +// 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 library consists of (a possibly empty) set of imports, a set +/// of exports, and a set of top level declarations. A top level declaration +/// is either a class, a type alias declaration, a function or a variable +/// declaration. The members of a library L are those top level declarations +/// given within L. +/// topLevelDefinition: +/// classDefinition | +/// enumType | +/// typeAlias | +/// external? functionSignature ';' | +/// external? getterSignature ';' | +/// external? setterSignature ';' | +/// functionSignature functionBody | +/// returnType? get identifier functionBody | +/// returnType? set identifier formalParameterList functionBody | +/// (final | const) type? staticFinalDeclarationList ';' | +/// variableDeclaration ';' +/// ; +/// @description Checks that a number literal can't be a top level definition +/// in a library. +/// @author msyabro +/// @issue 44990 + +import 'top_level_syntax_t04_lib.dart'; + +main() { + var someVar = ''; +} diff --git a/Language/Libraries_and_Scripts/top_level_syntax_t05.dart b/Language/Libraries_and_Scripts/top_level_syntax_t05.dart index cb5ce8b4f8..072a103a30 100644 --- a/Language/Libraries_and_Scripts/top_level_syntax_t05.dart +++ b/Language/Libraries_and_Scripts/top_level_syntax_t05.dart @@ -1,32 +1,32 @@ -// 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 library consists of (a possibly empty) set of imports, a set -/// of exports, and a set of top level declarations. A top level declaration -/// is either a class, a type alias declaration, a function or a variable -/// declaration. The members of a library L are those top level declarations -/// given within L. -/// topLevelDefinition: -/// classDefinition | -/// enumType | -/// typeAlias | -/// external? functionSignature ';' | -/// external? getterSignature ';' | -/// external? setterSignature ';' | -/// functionSignature functionBody | -/// returnType? get identifier functionBody | -/// returnType? set identifier formalParameterList functionBody | -/// (final | const) type? staticFinalDeclarationList ';' | -/// variableDeclaration ';' -/// ; -/// @description Checks that a map literal can't be a top level definition in -/// a library. -/// @author msyabro -/// @issue 44990 - -import 'top_level_syntax_t05_lib.dart'; - -main() { - var someVar = ''; -} +// 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 library consists of (a possibly empty) set of imports, a set +/// of exports, and a set of top level declarations. A top level declaration +/// is either a class, a type alias declaration, a function or a variable +/// declaration. The members of a library L are those top level declarations +/// given within L. +/// topLevelDefinition: +/// classDefinition | +/// enumType | +/// typeAlias | +/// external? functionSignature ';' | +/// external? getterSignature ';' | +/// external? setterSignature ';' | +/// functionSignature functionBody | +/// returnType? get identifier functionBody | +/// returnType? set identifier formalParameterList functionBody | +/// (final | const) type? staticFinalDeclarationList ';' | +/// variableDeclaration ';' +/// ; +/// @description Checks that a map literal can't be a top level definition in +/// a library. +/// @author msyabro +/// @issue 44990 + +import 'top_level_syntax_t05_lib.dart'; + +main() { + var someVar = ''; +} diff --git a/Language/Libraries_and_Scripts/top_level_syntax_t06.dart b/Language/Libraries_and_Scripts/top_level_syntax_t06.dart index da0135bfc0..5c059f924e 100644 --- a/Language/Libraries_and_Scripts/top_level_syntax_t06.dart +++ b/Language/Libraries_and_Scripts/top_level_syntax_t06.dart @@ -1,32 +1,32 @@ -// 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 library consists of (a possibly empty) set of imports, a set -/// of exports, and a set of top level declarations. A top level declaration -/// is either a class, a type alias declaration, a function or a variable -/// declaration. The members of a library L are those top level declarations -/// given within L. -/// topLevelDefinition: -/// classDefinition | -/// enumType | -/// typeAlias | -/// external? functionSignature ';' | -/// external? getterSignature ';' | -/// external? setterSignature ';' | -/// functionSignature functionBody | -/// returnType? get identifier functionBody | -/// returnType? set identifier formalParameterList functionBody | -/// (final | const) type? staticFinalDeclarationList ';' | -/// variableDeclaration ';' -/// ; -/// @description Checks that a function invocation expression can't be a top -/// level definition in a library. -/// @author msyabro -/// @issue 44990 - -import 'top_level_syntax_t06_lib.dart'; - -main() { - var someVar = ''; -} +// 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 library consists of (a possibly empty) set of imports, a set +/// of exports, and a set of top level declarations. A top level declaration +/// is either a class, a type alias declaration, a function or a variable +/// declaration. The members of a library L are those top level declarations +/// given within L. +/// topLevelDefinition: +/// classDefinition | +/// enumType | +/// typeAlias | +/// external? functionSignature ';' | +/// external? getterSignature ';' | +/// external? setterSignature ';' | +/// functionSignature functionBody | +/// returnType? get identifier functionBody | +/// returnType? set identifier formalParameterList functionBody | +/// (final | const) type? staticFinalDeclarationList ';' | +/// variableDeclaration ';' +/// ; +/// @description Checks that a function invocation expression can't be a top +/// level definition in a library. +/// @author msyabro +/// @issue 44990 + +import 'top_level_syntax_t06_lib.dart'; + +main() { + var someVar = ''; +} diff --git a/Language/Libraries_and_Scripts/top_level_syntax_t07.dart b/Language/Libraries_and_Scripts/top_level_syntax_t07.dart index 684a0f310b..e40628405a 100644 --- a/Language/Libraries_and_Scripts/top_level_syntax_t07.dart +++ b/Language/Libraries_and_Scripts/top_level_syntax_t07.dart @@ -1,32 +1,32 @@ -// 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 library consists of (a possibly empty) set of imports, a set -/// of exports, and a set of top level declarations. A top level declaration -/// is either a class, a type alias declaration, a function or a variable -/// declaration. The members of a library L are those top level declarations -/// given within L. -/// topLevelDefinition: -/// classDefinition | -/// enumType | -/// typeAlias | -/// external? functionSignature ';' | -/// external? getterSignature ';' | -/// external? setterSignature ';' | -/// functionSignature functionBody | -/// returnType? get identifier functionBody | -/// returnType? set identifier formalParameterList functionBody | -/// (final | const) type? staticFinalDeclarationList ';' | -/// variableDeclaration ';' -/// ; -/// @description Checks that an expression statement can't be a top level -/// definition in a library. -/// @author msyabro -/// @issue 44990 - -import 'top_level_syntax_t07_lib.dart'; - -main() { - var someVar = ''; -} +// 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 library consists of (a possibly empty) set of imports, a set +/// of exports, and a set of top level declarations. A top level declaration +/// is either a class, a type alias declaration, a function or a variable +/// declaration. The members of a library L are those top level declarations +/// given within L. +/// topLevelDefinition: +/// classDefinition | +/// enumType | +/// typeAlias | +/// external? functionSignature ';' | +/// external? getterSignature ';' | +/// external? setterSignature ';' | +/// functionSignature functionBody | +/// returnType? get identifier functionBody | +/// returnType? set identifier formalParameterList functionBody | +/// (final | const) type? staticFinalDeclarationList ';' | +/// variableDeclaration ';' +/// ; +/// @description Checks that an expression statement can't be a top level +/// definition in a library. +/// @author msyabro +/// @issue 44990 + +import 'top_level_syntax_t07_lib.dart'; + +main() { + var someVar = ''; +} diff --git a/Language/Libraries_and_Scripts/top_level_syntax_t08.dart b/Language/Libraries_and_Scripts/top_level_syntax_t08.dart index 13855f353b..c9401f4723 100644 --- a/Language/Libraries_and_Scripts/top_level_syntax_t08.dart +++ b/Language/Libraries_and_Scripts/top_level_syntax_t08.dart @@ -1,32 +1,32 @@ -// 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 library consists of (a possibly empty) set of imports, a set -/// of exports, and a set of top level declarations. A top level declaration -/// is either a class, a type alias declaration, a function or a variable -/// declaration. The members of a library L are those top level declarations -/// given within L. -/// topLevelDefinition: -/// classDefinition | -/// enumType | -/// typeAlias | -/// external? functionSignature ';' | -/// external? getterSignature ';' | -/// external? setterSignature ';' | -/// functionSignature functionBody | -/// returnType? get identifier functionBody | -/// returnType? set identifier formalParameterList functionBody | -/// (final | const) type? staticFinalDeclarationList ';' | -/// variableDeclaration ';' -/// ; -/// @description Checks that a block statement can't be a top level definition -/// in a library. -/// @author msyabro -/// @issue 44990 - -import 'top_level_syntax_t08_lib.dart'; - -main() { - var someVar = ''; -} +// 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 library consists of (a possibly empty) set of imports, a set +/// of exports, and a set of top level declarations. A top level declaration +/// is either a class, a type alias declaration, a function or a variable +/// declaration. The members of a library L are those top level declarations +/// given within L. +/// topLevelDefinition: +/// classDefinition | +/// enumType | +/// typeAlias | +/// external? functionSignature ';' | +/// external? getterSignature ';' | +/// external? setterSignature ';' | +/// functionSignature functionBody | +/// returnType? get identifier functionBody | +/// returnType? set identifier formalParameterList functionBody | +/// (final | const) type? staticFinalDeclarationList ';' | +/// variableDeclaration ';' +/// ; +/// @description Checks that a block statement can't be a top level definition +/// in a library. +/// @author msyabro +/// @issue 44990 + +import 'top_level_syntax_t08_lib.dart'; + +main() { + var someVar = ''; +} diff --git a/Language/Libraries_and_Scripts/top_level_syntax_t09.dart b/Language/Libraries_and_Scripts/top_level_syntax_t09.dart index 60dadc0031..213851a9a9 100644 --- a/Language/Libraries_and_Scripts/top_level_syntax_t09.dart +++ b/Language/Libraries_and_Scripts/top_level_syntax_t09.dart @@ -1,32 +1,32 @@ -// 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 library consists of (a possibly empty) set of imports, a set -/// of exports, and a set of top level declarations. A top level declaration -/// is either a class, a type alias declaration, a function or a variable -/// declaration. The members of a library L are those top level declarations -/// given within L. -/// topLevelDefinition: -/// classDefinition | -/// enumType | -/// typeAlias | -/// external? functionSignature ';' | -/// external? getterSignature ';' | -/// external? setterSignature ';' | -/// functionSignature functionBody | -/// returnType? get identifier functionBody | -/// returnType? set identifier formalParameterList functionBody | -/// (final | const) type? staticFinalDeclarationList ';' | -/// variableDeclaration ';' -/// ; -/// @description Checks that an if statement can't be a top level definition in -/// a library. -/// @author msyabro -/// @issue 44990 - -import 'top_level_syntax_t09_lib.dart'; - -main() { - var someVar = ''; -} +// 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 library consists of (a possibly empty) set of imports, a set +/// of exports, and a set of top level declarations. A top level declaration +/// is either a class, a type alias declaration, a function or a variable +/// declaration. The members of a library L are those top level declarations +/// given within L. +/// topLevelDefinition: +/// classDefinition | +/// enumType | +/// typeAlias | +/// external? functionSignature ';' | +/// external? getterSignature ';' | +/// external? setterSignature ';' | +/// functionSignature functionBody | +/// returnType? get identifier functionBody | +/// returnType? set identifier formalParameterList functionBody | +/// (final | const) type? staticFinalDeclarationList ';' | +/// variableDeclaration ';' +/// ; +/// @description Checks that an if statement can't be a top level definition in +/// a library. +/// @author msyabro +/// @issue 44990 + +import 'top_level_syntax_t09_lib.dart'; + +main() { + var someVar = ''; +} diff --git a/Language/Libraries_and_Scripts/top_level_syntax_t10.dart b/Language/Libraries_and_Scripts/top_level_syntax_t10.dart index 666c175cfb..6e5485a411 100644 --- a/Language/Libraries_and_Scripts/top_level_syntax_t10.dart +++ b/Language/Libraries_and_Scripts/top_level_syntax_t10.dart @@ -1,32 +1,32 @@ -// 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 library consists of (a possibly empty) set of imports, a set -/// of exports, and a set of top level declarations. A top level declaration -/// is either a class, a type alias declaration, a function or a variable -/// declaration. The members of a library L are those top level declarations -/// given within L. -/// topLevelDefinition: -/// classDefinition | -/// enumType | -/// typeAlias | -/// external? functionSignature ';' | -/// external? getterSignature ';' | -/// external? setterSignature ';' | -/// functionSignature functionBody | -/// returnType? get identifier functionBody | -/// returnType? set identifier formalParameterList functionBody | -/// (final | const) type? staticFinalDeclarationList ';' | -/// variableDeclaration ';' -/// ; -/// @description Checks that a for statement can't be a top level definition in -/// a library. -/// @author msyabro -/// @issue 44990 - -import 'top_level_syntax_t10_lib.dart'; - -main() { - var someVar = ''; -} +// 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 library consists of (a possibly empty) set of imports, a set +/// of exports, and a set of top level declarations. A top level declaration +/// is either a class, a type alias declaration, a function or a variable +/// declaration. The members of a library L are those top level declarations +/// given within L. +/// topLevelDefinition: +/// classDefinition | +/// enumType | +/// typeAlias | +/// external? functionSignature ';' | +/// external? getterSignature ';' | +/// external? setterSignature ';' | +/// functionSignature functionBody | +/// returnType? get identifier functionBody | +/// returnType? set identifier formalParameterList functionBody | +/// (final | const) type? staticFinalDeclarationList ';' | +/// variableDeclaration ';' +/// ; +/// @description Checks that a for statement can't be a top level definition in +/// a library. +/// @author msyabro +/// @issue 44990 + +import 'top_level_syntax_t10_lib.dart'; + +main() { + var someVar = ''; +} diff --git a/Language/Libraries_and_Scripts/top_level_syntax_t11.dart b/Language/Libraries_and_Scripts/top_level_syntax_t11.dart index 964322dfd4..782353bc98 100644 --- a/Language/Libraries_and_Scripts/top_level_syntax_t11.dart +++ b/Language/Libraries_and_Scripts/top_level_syntax_t11.dart @@ -1,32 +1,32 @@ -// 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 library consists of (a possibly empty) set of imports, a set -/// of exports, and a set of top level declarations. A top level declaration -/// is either a class, a type alias declaration, a function or a variable -/// declaration. The members of a library L are those top level declarations -/// given within L. -/// topLevelDefinition: -/// classDefinition | -/// enumType | -/// typeAlias | -/// external? functionSignature ';' | -/// external? getterSignature ';' | -/// external? setterSignature ';' | -/// functionSignature functionBody | -/// returnType? get identifier functionBody | -/// returnType? set identifier formalParameterList functionBody | -/// (final | const) type? staticFinalDeclarationList ';' | -/// variableDeclaration ';' -/// ; -/// @description Checks that a while statement can't be a top level definition -/// in a library. -/// @author msyabro -/// @issue 44990 - -import 'top_level_syntax_t11_lib.dart'; - -main() { - var someVar = ''; -} +// 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 library consists of (a possibly empty) set of imports, a set +/// of exports, and a set of top level declarations. A top level declaration +/// is either a class, a type alias declaration, a function or a variable +/// declaration. The members of a library L are those top level declarations +/// given within L. +/// topLevelDefinition: +/// classDefinition | +/// enumType | +/// typeAlias | +/// external? functionSignature ';' | +/// external? getterSignature ';' | +/// external? setterSignature ';' | +/// functionSignature functionBody | +/// returnType? get identifier functionBody | +/// returnType? set identifier formalParameterList functionBody | +/// (final | const) type? staticFinalDeclarationList ';' | +/// variableDeclaration ';' +/// ; +/// @description Checks that a while statement can't be a top level definition +/// in a library. +/// @author msyabro +/// @issue 44990 + +import 'top_level_syntax_t11_lib.dart'; + +main() { + var someVar = ''; +} diff --git a/Language/Libraries_and_Scripts/top_level_syntax_t12.dart b/Language/Libraries_and_Scripts/top_level_syntax_t12.dart index 2386f09e41..d612b2750d 100644 --- a/Language/Libraries_and_Scripts/top_level_syntax_t12.dart +++ b/Language/Libraries_and_Scripts/top_level_syntax_t12.dart @@ -1,32 +1,32 @@ -// 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 library consists of (a possibly empty) set of imports, a set -/// of exports, and a set of top level declarations. A top level declaration -/// is either a class, a type alias declaration, a function or a variable -/// declaration. The members of a library L are those top level declarations -/// given within L. -/// topLevelDefinition: -/// classDefinition | -/// enumType | -/// typeAlias | -/// external? functionSignature ';' | -/// external? getterSignature ';' | -/// external? setterSignature ';' | -/// functionSignature functionBody | -/// returnType? get identifier functionBody | -/// returnType? set identifier formalParameterList functionBody | -/// (final | const) type? staticFinalDeclarationList ';' | -/// variableDeclaration ';' -/// ; -/// @description Checks that a try statement can't be a top level definition in -/// a library. -/// @author msyabro -/// @issue 44990 - -import 'top_level_syntax_t12_lib.dart'; - -main() { - var someVar = ''; -} +// 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 library consists of (a possibly empty) set of imports, a set +/// of exports, and a set of top level declarations. A top level declaration +/// is either a class, a type alias declaration, a function or a variable +/// declaration. The members of a library L are those top level declarations +/// given within L. +/// topLevelDefinition: +/// classDefinition | +/// enumType | +/// typeAlias | +/// external? functionSignature ';' | +/// external? getterSignature ';' | +/// external? setterSignature ';' | +/// functionSignature functionBody | +/// returnType? get identifier functionBody | +/// returnType? set identifier formalParameterList functionBody | +/// (final | const) type? staticFinalDeclarationList ';' | +/// variableDeclaration ';' +/// ; +/// @description Checks that a try statement can't be a top level definition in +/// a library. +/// @author msyabro +/// @issue 44990 + +import 'top_level_syntax_t12_lib.dart'; + +main() { + var someVar = ''; +} diff --git a/Language/Libraries_and_Scripts/top_level_syntax_t13.dart b/Language/Libraries_and_Scripts/top_level_syntax_t13.dart index 8b7c1c1aa7..45d617f628 100644 --- a/Language/Libraries_and_Scripts/top_level_syntax_t13.dart +++ b/Language/Libraries_and_Scripts/top_level_syntax_t13.dart @@ -1,32 +1,32 @@ -// 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 library consists of (a possibly empty) set of imports, a set -/// of exports, and a set of top level declarations. A top level declaration -/// is either a class, a type alias declaration, a function or a variable -/// declaration. The members of a library L are those top level declarations -/// given within L. -/// topLevelDefinition: -/// classDefinition | -/// enumType | -/// typeAlias | -/// external? functionSignature ';' | -/// external? getterSignature ';' | -/// external? setterSignature ';' | -/// functionSignature functionBody | -/// returnType? get identifier functionBody | -/// returnType? set identifier formalParameterList functionBody | -/// (final | const) type? staticFinalDeclarationList ';' | -/// variableDeclaration ';' -/// ; -/// @description Checks that a return statement can't be a top level definition -/// in a library. -/// @author msyabro -/// @issue 44990 - -import 'top_level_syntax_t13_lib.dart'; - -main() { - var someVar = ''; -} +// 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 library consists of (a possibly empty) set of imports, a set +/// of exports, and a set of top level declarations. A top level declaration +/// is either a class, a type alias declaration, a function or a variable +/// declaration. The members of a library L are those top level declarations +/// given within L. +/// topLevelDefinition: +/// classDefinition | +/// enumType | +/// typeAlias | +/// external? functionSignature ';' | +/// external? getterSignature ';' | +/// external? setterSignature ';' | +/// functionSignature functionBody | +/// returnType? get identifier functionBody | +/// returnType? set identifier formalParameterList functionBody | +/// (final | const) type? staticFinalDeclarationList ';' | +/// variableDeclaration ';' +/// ; +/// @description Checks that a return statement can't be a top level definition +/// in a library. +/// @author msyabro +/// @issue 44990 + +import 'top_level_syntax_t13_lib.dart'; + +main() { + var someVar = ''; +} diff --git a/Language/Libraries_and_Scripts/top_level_syntax_t14.dart b/Language/Libraries_and_Scripts/top_level_syntax_t14.dart index cdec76e29e..85a55a3156 100644 --- a/Language/Libraries_and_Scripts/top_level_syntax_t14.dart +++ b/Language/Libraries_and_Scripts/top_level_syntax_t14.dart @@ -1,32 +1,32 @@ -// 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 library consists of (a possibly empty) set of imports, a set -/// of exports, and a set of top level declarations. A top level declaration -/// is either a class, a type alias declaration, a function or a variable -/// declaration. The members of a library L are those top level declarations -/// given within L. -/// topLevelDefinition: -/// classDefinition | -/// enumType | -/// typeAlias | -/// external? functionSignature ';' | -/// external? getterSignature ';' | -/// external? setterSignature ';' | -/// functionSignature functionBody | -/// returnType? get identifier functionBody | -/// returnType? set identifier formalParameterList functionBody | -/// (final | const) type? staticFinalDeclarationList ';' | -/// variableDeclaration ';' -/// ; -/// @description Checks that a throw statement can't be a top level definition -/// in a library. -/// @author msyabro -/// @issue 44990 - -import 'top_level_syntax_t14_lib.dart'; - -main() { - var someVar = ''; -} +// 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 library consists of (a possibly empty) set of imports, a set +/// of exports, and a set of top level declarations. A top level declaration +/// is either a class, a type alias declaration, a function or a variable +/// declaration. The members of a library L are those top level declarations +/// given within L. +/// topLevelDefinition: +/// classDefinition | +/// enumType | +/// typeAlias | +/// external? functionSignature ';' | +/// external? getterSignature ';' | +/// external? setterSignature ';' | +/// functionSignature functionBody | +/// returnType? get identifier functionBody | +/// returnType? set identifier formalParameterList functionBody | +/// (final | const) type? staticFinalDeclarationList ';' | +/// variableDeclaration ';' +/// ; +/// @description Checks that a throw statement can't be a top level definition +/// in a library. +/// @author msyabro +/// @issue 44990 + +import 'top_level_syntax_t14_lib.dart'; + +main() { + var someVar = ''; +} diff --git a/Language/Libraries_and_Scripts/top_level_syntax_t15.dart b/Language/Libraries_and_Scripts/top_level_syntax_t15.dart index f2a65cc856..7f106017bb 100644 --- a/Language/Libraries_and_Scripts/top_level_syntax_t15.dart +++ b/Language/Libraries_and_Scripts/top_level_syntax_t15.dart @@ -1,32 +1,32 @@ -// 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 library consists of (a possibly empty) set of imports, a set -/// of exports, and a set of top level declarations. A top level declaration -/// is either a class, a type alias declaration, a function or a variable -/// declaration. The members of a library L are those top level declarations -/// given within L. -/// topLevelDefinition: -/// classDefinition | -/// enumType | -/// typeAlias | -/// external? functionSignature ';' | -/// external? getterSignature ';' | -/// external? setterSignature ';' | -/// functionSignature functionBody | -/// returnType? get identifier functionBody | -/// returnType? set identifier formalParameterList functionBody | -/// (final | const) type? staticFinalDeclarationList ';' | -/// variableDeclaration ';' -/// ; -/// @description Checks that a labeled statement (variable declaration) can't -/// be a top level definition in a library. -/// @author msyabro -/// @issue 44990 - -import 'top_level_syntax_t15_lib.dart'; - -main() { - var someVar = ''; -} +// 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 library consists of (a possibly empty) set of imports, a set +/// of exports, and a set of top level declarations. A top level declaration +/// is either a class, a type alias declaration, a function or a variable +/// declaration. The members of a library L are those top level declarations +/// given within L. +/// topLevelDefinition: +/// classDefinition | +/// enumType | +/// typeAlias | +/// external? functionSignature ';' | +/// external? getterSignature ';' | +/// external? setterSignature ';' | +/// functionSignature functionBody | +/// returnType? get identifier functionBody | +/// returnType? set identifier formalParameterList functionBody | +/// (final | const) type? staticFinalDeclarationList ';' | +/// variableDeclaration ';' +/// ; +/// @description Checks that a labeled statement (variable declaration) can't +/// be a top level definition in a library. +/// @author msyabro +/// @issue 44990 + +import 'top_level_syntax_t15_lib.dart'; + +main() { + var someVar = ''; +} diff --git a/Language/Libraries_and_Scripts/top_level_syntax_t16.dart b/Language/Libraries_and_Scripts/top_level_syntax_t16.dart index d59fe5f403..dd3b3729a8 100644 --- a/Language/Libraries_and_Scripts/top_level_syntax_t16.dart +++ b/Language/Libraries_and_Scripts/top_level_syntax_t16.dart @@ -1,32 +1,32 @@ -// 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 library consists of (a possibly empty) set of imports, a set -/// of exports, and a set of top level declarations. A top level declaration -/// is either a class, a type alias declaration, a function or a variable -/// declaration. The members of a library L are those top level declarations -/// given within L. -/// topLevelDefinition: -/// classDefinition | -/// enumType | -/// typeAlias | -/// external? functionSignature ';' | -/// external? getterSignature ';' | -/// external? setterSignature ';' | -/// functionSignature functionBody | -/// returnType? get identifier functionBody | -/// returnType? set identifier formalParameterList functionBody | -/// (final | const) type? staticFinalDeclarationList ';' | -/// variableDeclaration ';' -/// ; -/// @description Checks that a lone comma character can't be a top level -/// definition in a library. -/// @author msyabro -/// @issue 44990 - -import 'top_level_syntax_t16_lib.dart'; - -main() { - var someVar = ''; -} +// 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 library consists of (a possibly empty) set of imports, a set +/// of exports, and a set of top level declarations. A top level declaration +/// is either a class, a type alias declaration, a function or a variable +/// declaration. The members of a library L are those top level declarations +/// given within L. +/// topLevelDefinition: +/// classDefinition | +/// enumType | +/// typeAlias | +/// external? functionSignature ';' | +/// external? getterSignature ';' | +/// external? setterSignature ';' | +/// functionSignature functionBody | +/// returnType? get identifier functionBody | +/// returnType? set identifier formalParameterList functionBody | +/// (final | const) type? staticFinalDeclarationList ';' | +/// variableDeclaration ';' +/// ; +/// @description Checks that a lone comma character can't be a top level +/// definition in a library. +/// @author msyabro +/// @issue 44990 + +import 'top_level_syntax_t16_lib.dart'; + +main() { + var someVar = ''; +} diff --git a/Language/Libraries_and_Scripts/top_level_syntax_t17.dart b/Language/Libraries_and_Scripts/top_level_syntax_t17.dart index 2c8ee410b3..8e8f7df7f7 100644 --- a/Language/Libraries_and_Scripts/top_level_syntax_t17.dart +++ b/Language/Libraries_and_Scripts/top_level_syntax_t17.dart @@ -1,32 +1,32 @@ -// 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 library consists of (a possibly empty) set of imports, a set -/// of exports, and a set of top level declarations. A top level declaration -/// is either a class, a type alias declaration, a function or a variable -/// declaration. The members of a library L are those top level declarations -/// given within L. -/// topLevelDefinition: -/// classDefinition | -/// enumType | -/// typeAlias | -/// external? functionSignature ';' | -/// external? getterSignature ';' | -/// external? setterSignature ';' | -/// functionSignature functionBody | -/// returnType? get identifier functionBody | -/// returnType? set identifier formalParameterList functionBody | -/// (final | const) type? staticFinalDeclarationList ';' | -/// variableDeclaration ';' -/// ; -/// @description Checks that a lone colon character can't be a top level -/// definition in a library. -/// @author msyabro -/// @issue 44990 - -import 'top_level_syntax_t17_lib.dart'; - -main() { - var someVar = ''; -} +// 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 library consists of (a possibly empty) set of imports, a set +/// of exports, and a set of top level declarations. A top level declaration +/// is either a class, a type alias declaration, a function or a variable +/// declaration. The members of a library L are those top level declarations +/// given within L. +/// topLevelDefinition: +/// classDefinition | +/// enumType | +/// typeAlias | +/// external? functionSignature ';' | +/// external? getterSignature ';' | +/// external? setterSignature ';' | +/// functionSignature functionBody | +/// returnType? get identifier functionBody | +/// returnType? set identifier formalParameterList functionBody | +/// (final | const) type? staticFinalDeclarationList ';' | +/// variableDeclaration ';' +/// ; +/// @description Checks that a lone colon character can't be a top level +/// definition in a library. +/// @author msyabro +/// @issue 44990 + +import 'top_level_syntax_t17_lib.dart'; + +main() { + var someVar = ''; +} diff --git a/Language/Libraries_and_Scripts/top_level_syntax_t18.dart b/Language/Libraries_and_Scripts/top_level_syntax_t18.dart index 85a14eb8bc..ec5bbf441c 100644 --- a/Language/Libraries_and_Scripts/top_level_syntax_t18.dart +++ b/Language/Libraries_and_Scripts/top_level_syntax_t18.dart @@ -1,32 +1,32 @@ -// 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 library consists of (a possibly empty) set of imports, a set -/// of exports, and a set of top level declarations. A top level declaration -/// is either a class, a type alias declaration, a function or a variable -/// declaration. The members of a library L are those top level declarations -/// given within L. -/// topLevelDefinition: -/// classDefinition | -/// enumType | -/// typeAlias | -/// external? functionSignature ';' | -/// external? getterSignature ';' | -/// external? setterSignature ';' | -/// functionSignature functionBody | -/// returnType? get identifier functionBody | -/// returnType? set identifier formalParameterList functionBody | -/// (final | const) type? staticFinalDeclarationList ';' | -/// variableDeclaration ';' -/// ; -/// @description Checks that a lone backslash character can't be a top level -/// definition in a library. -/// @author msyabro -/// @issue 44990 - -import 'top_level_syntax_t18_lib.dart'; - -main() { - var someVar = ''; -} +// 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 library consists of (a possibly empty) set of imports, a set +/// of exports, and a set of top level declarations. A top level declaration +/// is either a class, a type alias declaration, a function or a variable +/// declaration. The members of a library L are those top level declarations +/// given within L. +/// topLevelDefinition: +/// classDefinition | +/// enumType | +/// typeAlias | +/// external? functionSignature ';' | +/// external? getterSignature ';' | +/// external? setterSignature ';' | +/// functionSignature functionBody | +/// returnType? get identifier functionBody | +/// returnType? set identifier formalParameterList functionBody | +/// (final | const) type? staticFinalDeclarationList ';' | +/// variableDeclaration ';' +/// ; +/// @description Checks that a lone backslash character can't be a top level +/// definition in a library. +/// @author msyabro +/// @issue 44990 + +import 'top_level_syntax_t18_lib.dart'; + +main() { + var someVar = ''; +} diff --git a/Language/Libraries_and_Scripts/top_level_syntax_t19.dart b/Language/Libraries_and_Scripts/top_level_syntax_t19.dart index 16282c52ff..23adb813c9 100644 --- a/Language/Libraries_and_Scripts/top_level_syntax_t19.dart +++ b/Language/Libraries_and_Scripts/top_level_syntax_t19.dart @@ -1,32 +1,32 @@ -// 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 library consists of (a possibly empty) set of imports, a set -/// of exports, and a set of top level declarations. A top level declaration -/// is either a class, a type alias declaration, a function or a variable -/// declaration. The members of a library L are those top level declarations -/// given within L. -/// topLevelDefinition: -/// classDefinition | -/// enumType | -/// typeAlias | -/// external? functionSignature ';' | -/// external? getterSignature ';' | -/// external? setterSignature ';' | -/// functionSignature functionBody | -/// returnType? get identifier functionBody | -/// returnType? set identifier formalParameterList functionBody | -/// (final | const) type? staticFinalDeclarationList ';' | -/// variableDeclaration ';' -/// ; -/// @description Checks that an arbitrary sequence of symbols (which is not an -/// identifier) can't be a top level definition in a library. -/// @author msyabro -/// @issue 44990 - -import 'top_level_syntax_t19_lib.dart'; - -main() { - var someVar = ''; -} +// 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 library consists of (a possibly empty) set of imports, a set +/// of exports, and a set of top level declarations. A top level declaration +/// is either a class, a type alias declaration, a function or a variable +/// declaration. The members of a library L are those top level declarations +/// given within L. +/// topLevelDefinition: +/// classDefinition | +/// enumType | +/// typeAlias | +/// external? functionSignature ';' | +/// external? getterSignature ';' | +/// external? setterSignature ';' | +/// functionSignature functionBody | +/// returnType? get identifier functionBody | +/// returnType? set identifier formalParameterList functionBody | +/// (final | const) type? staticFinalDeclarationList ';' | +/// variableDeclaration ';' +/// ; +/// @description Checks that an arbitrary sequence of symbols (which is not an +/// identifier) can't be a top level definition in a library. +/// @author msyabro +/// @issue 44990 + +import 'top_level_syntax_t19_lib.dart'; + +main() { + var someVar = ''; +} diff --git a/Language/Overview/Scoping/conflicting_names_t11.dart b/Language/Overview/Scoping/conflicting_names_t11.dart index 5a9be93c58..3a6c3ef70e 100644 --- a/Language/Overview/Scoping/conflicting_names_t11.dart +++ b/Language/Overview/Scoping/conflicting_names_t11.dart @@ -1,26 +1,26 @@ -// 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 It is a compile-time error if there is more than one entity -/// with the same name declared in the same scope. -/// Dart is lexically scoped. Scopes may nest. A name or declaration d is -/// available in scope S if d is in the namespace induced by S or if d is -/// available in the lexically enclosing scope of S. We say that a name or -/// declaration d is in scope if d is available in the current scope. -/// @description Checks that it is a compile-time error if the library scope -/// contains two variables with the same name. -/// @author msyabro - - -var conflictingName; -var conflictingName; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - conflictingName = 42; -// ^ -// [cfe] unspecified -} +// 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 It is a compile-time error if there is more than one entity +/// with the same name declared in the same scope. +/// Dart is lexically scoped. Scopes may nest. A name or declaration d is +/// available in scope S if d is in the namespace induced by S or if d is +/// available in the lexically enclosing scope of S. We say that a name or +/// declaration d is in scope if d is available in the current scope. +/// @description Checks that it is a compile-time error if the library scope +/// contains two variables with the same name. +/// @author msyabro + + +var conflictingName; +var conflictingName; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + conflictingName = 42; +// ^ +// [cfe] unspecified +} diff --git a/Language/Overview/Scoping/conflicting_names_t12.dart b/Language/Overview/Scoping/conflicting_names_t12.dart index cfb189ff5c..3d7a0823eb 100644 --- a/Language/Overview/Scoping/conflicting_names_t12.dart +++ b/Language/Overview/Scoping/conflicting_names_t12.dart @@ -1,26 +1,26 @@ -// 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 It is a compile-time error if there is more than one entity -/// with the same name declared in the same scope. -/// Dart is lexically scoped. Scopes may nest. A name or declaration d is -/// available in scope S if d is in the namespace induced by S or if d is -/// available in the lexically enclosing scope of S. We say that a name or -/// declaration d is in scope if d is available in the current scope. -/// @description Checks that it is a compile-time error if the library scope -/// contains two functions with the same name. -/// @author msyabro - - -void conflictingName() {} -conflictingName() => 42; -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - conflictingName(); -//^ -// [cfe] unspecified -} +// 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 It is a compile-time error if there is more than one entity +/// with the same name declared in the same scope. +/// Dart is lexically scoped. Scopes may nest. A name or declaration d is +/// available in scope S if d is in the namespace induced by S or if d is +/// available in the lexically enclosing scope of S. We say that a name or +/// declaration d is in scope if d is available in the current scope. +/// @description Checks that it is a compile-time error if the library scope +/// contains two functions with the same name. +/// @author msyabro + + +void conflictingName() {} +conflictingName() => 42; +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + conflictingName(); +//^ +// [cfe] unspecified +} diff --git a/Language/Overview/Scoping/conflicting_names_t13.dart b/Language/Overview/Scoping/conflicting_names_t13.dart index 375873abfe..6d6a54a432 100644 --- a/Language/Overview/Scoping/conflicting_names_t13.dart +++ b/Language/Overview/Scoping/conflicting_names_t13.dart @@ -1,26 +1,26 @@ -// 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 It is a compile-time error if there is more than one entity -/// with the same name declared in the same scope. -/// Dart is lexically scoped. Scopes may nest. A name or declaration d is -/// available in scope S if d is in the namespace induced by S or if d is -/// available in the lexically enclosing scope of S. We say that a name or -/// declaration d is in scope if d is available in the current scope. -/// @description Checks that it is a compile-time error if the library scope -/// contains two classes with the same name. -/// @author msyabro - - -class conflictingName {} -class conflictingName implements Map {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new conflictingName(); -// ^ -// [cfe] unspecified -} +// 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 It is a compile-time error if there is more than one entity +/// with the same name declared in the same scope. +/// Dart is lexically scoped. Scopes may nest. A name or declaration d is +/// available in scope S if d is in the namespace induced by S or if d is +/// available in the lexically enclosing scope of S. We say that a name or +/// declaration d is in scope if d is available in the current scope. +/// @description Checks that it is a compile-time error if the library scope +/// contains two classes with the same name. +/// @author msyabro + + +class conflictingName {} +class conflictingName implements Map {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new conflictingName(); +// ^ +// [cfe] unspecified +} diff --git a/Language/Overview/Scoping/conflicting_names_t15.dart b/Language/Overview/Scoping/conflicting_names_t15.dart index 0238bedf64..a74d1f91ba 100644 --- a/Language/Overview/Scoping/conflicting_names_t15.dart +++ b/Language/Overview/Scoping/conflicting_names_t15.dart @@ -1,26 +1,26 @@ -// 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 It is a compile-time error if there is more than one entity -/// with the same name declared in the same scope. -/// Dart is lexically scoped. Scopes may nest. A name or declaration d is -/// available in scope S if d is in the namespace induced by S or if d is -/// available in the lexically enclosing scope of S. We say that a name or -/// declaration d is in scope if d is available in the current scope. -/// @description Checks that it is a compile-time error if the library scope -/// contains two typedef declarations with the same name. -/// @author msyabro - - -typedef conflictingName(); -typedef conflictingName(p1, p2); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - conflictingName func = () {}; -//^ -// [cfe] unspecified -} +// 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 It is a compile-time error if there is more than one entity +/// with the same name declared in the same scope. +/// Dart is lexically scoped. Scopes may nest. A name or declaration d is +/// available in scope S if d is in the namespace induced by S or if d is +/// available in the lexically enclosing scope of S. We say that a name or +/// declaration d is in scope if d is available in the current scope. +/// @description Checks that it is a compile-time error if the library scope +/// contains two typedef declarations with the same name. +/// @author msyabro + + +typedef conflictingName(); +typedef conflictingName(p1, p2); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + conflictingName func = () {}; +//^ +// [cfe] unspecified +} diff --git a/Language/Overview/Scoping/conflicting_names_t16.dart b/Language/Overview/Scoping/conflicting_names_t16.dart index da1c8898e5..eb4779df68 100644 --- a/Language/Overview/Scoping/conflicting_names_t16.dart +++ b/Language/Overview/Scoping/conflicting_names_t16.dart @@ -1,26 +1,26 @@ -// 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 It is a compile-time error if there is more than one entity -/// with the same name declared in the same scope. -/// Dart is lexically scoped. Scopes may nest. A name or declaration d is -/// available in scope S if d is in the namespace induced by S or if d is -/// available in the lexically enclosing scope of S. We say that a name or -/// declaration d is in scope if d is available in the current scope. -/// @description Checks that it is a compile-time error if two variables with -/// the same name are declared in a function scope. -/// @author msyabro - - -func() { - var conflictingName; - var conflictingName; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - func(); -} +// 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 It is a compile-time error if there is more than one entity +/// with the same name declared in the same scope. +/// Dart is lexically scoped. Scopes may nest. A name or declaration d is +/// available in scope S if d is in the namespace induced by S or if d is +/// available in the lexically enclosing scope of S. We say that a name or +/// declaration d is in scope if d is available in the current scope. +/// @description Checks that it is a compile-time error if two variables with +/// the same name are declared in a function scope. +/// @author msyabro + + +func() { + var conflictingName; + var conflictingName; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + func(); +} diff --git a/Language/Overview/Scoping/conflicting_names_t17.dart b/Language/Overview/Scoping/conflicting_names_t17.dart index ec396368ed..7cff6bedfb 100644 --- a/Language/Overview/Scoping/conflicting_names_t17.dart +++ b/Language/Overview/Scoping/conflicting_names_t17.dart @@ -1,26 +1,26 @@ -// 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 It is a compile-time error if there is more than one entity -/// with the same name declared in the same scope. -/// Dart is lexically scoped. Scopes may nest. A name or declaration d is -/// available in scope S if d is in the namespace induced by S or if d is -/// available in the lexically enclosing scope of S. We say that a name or -/// declaration d is in scope if d is available in the current scope. -/// @description Checks that it is a compile-time error if a function body -/// contains two local functions with the same name. -/// @author msyabro - - -func() { - conflictingName() {} - conflictingName(p1) {} -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - func(); -} +// 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 It is a compile-time error if there is more than one entity +/// with the same name declared in the same scope. +/// Dart is lexically scoped. Scopes may nest. A name or declaration d is +/// available in scope S if d is in the namespace induced by S or if d is +/// available in the lexically enclosing scope of S. We say that a name or +/// declaration d is in scope if d is available in the current scope. +/// @description Checks that it is a compile-time error if a function body +/// contains two local functions with the same name. +/// @author msyabro + + +func() { + conflictingName() {} + conflictingName(p1) {} +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + func(); +} diff --git a/Language/Overview/Scoping/conflicting_names_t18.dart b/Language/Overview/Scoping/conflicting_names_t18.dart index a50c09d0c9..19aaea212a 100644 --- a/Language/Overview/Scoping/conflicting_names_t18.dart +++ b/Language/Overview/Scoping/conflicting_names_t18.dart @@ -1,26 +1,26 @@ -// 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 It is a compile-time error if there is more than one entity -/// with the same name declared in the same scope. -/// Dart is lexically scoped. Scopes may nest. A name or declaration d is -/// available in scope S if d is in the namespace induced by S or if d is -/// available in the lexically enclosing scope of S. We say that a name or -/// declaration d is in scope if d is available in the current scope. -/// @description Checks that it is a compile-time error if a function body -/// contains a variable and a function with the same name. -/// @author msyabro - - -func() { - var conflictingName; - conflictingName(p1) {} -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - func(); -} +// 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 It is a compile-time error if there is more than one entity +/// with the same name declared in the same scope. +/// Dart is lexically scoped. Scopes may nest. A name or declaration d is +/// available in scope S if d is in the namespace induced by S or if d is +/// available in the lexically enclosing scope of S. We say that a name or +/// declaration d is in scope if d is available in the current scope. +/// @description Checks that it is a compile-time error if a function body +/// contains a variable and a function with the same name. +/// @author msyabro + + +func() { + var conflictingName; + conflictingName(p1) {} +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + func(); +} diff --git a/Language/Overview/Scoping/conflicting_names_t31.dart b/Language/Overview/Scoping/conflicting_names_t31.dart index 79574b57d1..143f513ddf 100644 --- a/Language/Overview/Scoping/conflicting_names_t31.dart +++ b/Language/Overview/Scoping/conflicting_names_t31.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if there is more than one entity -/// with the same name declared in the same scope. -/// Dart is lexically scoped. Scopes may nest. A name or declaration d is -/// available in scope S if d is in the namespace induced by S or if d is -/// available in the lexically enclosing scope of S. We say that a name or -/// declaration d is in scope if d is available in the current scope. -/// @description Checks that it is a compile-time error if a local function -/// declares two formal parameters with a same name. -/// @author iefremov - - -main() { - f(a, a) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error if there is more than one entity +/// with the same name declared in the same scope. +/// Dart is lexically scoped. Scopes may nest. A name or declaration d is +/// available in scope S if d is in the namespace induced by S or if d is +/// available in the lexically enclosing scope of S. We say that a name or +/// declaration d is in scope if d is available in the current scope. +/// @description Checks that it is a compile-time error if a local function +/// declares two formal parameters with a same name. +/// @author iefremov + + +main() { + f(a, a) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Overview/Scoping/conflicting_names_t32.dart b/Language/Overview/Scoping/conflicting_names_t32.dart index 986f7cc5d8..907bc53f34 100644 --- a/Language/Overview/Scoping/conflicting_names_t32.dart +++ b/Language/Overview/Scoping/conflicting_names_t32.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if there is more than one entity -/// with the same name declared in the same scope. -/// Dart is lexically scoped. Scopes may nest. A name or declaration d is -/// available in scope S if d is in the namespace induced by S or if d is -/// available in the lexically enclosing scope of S. We say that a name or -/// declaration d is in scope if d is available in the current scope. -/// @description Checks that it is a compile-time error if a local function -/// declares a positional and an optional parameters with the same name. -/// @author iefremov - - -main() { - f(a, [a]) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error if there is more than one entity +/// with the same name declared in the same scope. +/// Dart is lexically scoped. Scopes may nest. A name or declaration d is +/// available in scope S if d is in the namespace induced by S or if d is +/// available in the lexically enclosing scope of S. We say that a name or +/// declaration d is in scope if d is available in the current scope. +/// @description Checks that it is a compile-time error if a local function +/// declares a positional and an optional parameters with the same name. +/// @author iefremov + + +main() { + f(a, [a]) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Overview/Scoping/conflicting_names_t33.dart b/Language/Overview/Scoping/conflicting_names_t33.dart index e02d9f5a63..0d67f33fb3 100644 --- a/Language/Overview/Scoping/conflicting_names_t33.dart +++ b/Language/Overview/Scoping/conflicting_names_t33.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if there is more than one entity -/// with the same name declared in the same scope. -/// Dart is lexically scoped. Scopes may nest. A name or declaration d is -/// available in scope S if d is in the namespace induced by S or if d is -/// available in the lexically enclosing scope of S. We say that a name or -/// declaration d is in scope if d is available in the current scope. -/// @description Checks that it is a compile-time error if a local function -/// declares two optional parameters with a same name. -/// @author iefremov - - -main() { - f([a, a]) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error if there is more than one entity +/// with the same name declared in the same scope. +/// Dart is lexically scoped. Scopes may nest. A name or declaration d is +/// available in scope S if d is in the namespace induced by S or if d is +/// available in the lexically enclosing scope of S. We say that a name or +/// declaration d is in scope if d is available in the current scope. +/// @description Checks that it is a compile-time error if a local function +/// declares two optional parameters with a same name. +/// @author iefremov + + +main() { + f([a, a]) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Overview/Scoping/conflicting_names_t34.dart b/Language/Overview/Scoping/conflicting_names_t34.dart index 8f812ffd8d..4694b0243a 100644 --- a/Language/Overview/Scoping/conflicting_names_t34.dart +++ b/Language/Overview/Scoping/conflicting_names_t34.dart @@ -1,27 +1,27 @@ -// 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 It is a compile-time error if there is more than one entity -/// with the same name declared in the same scope. -/// Dart is lexically scoped. Scopes may nest. A name or declaration d is -/// available in scope S if d is in the namespace induced by S or if d is -/// available in the lexically enclosing scope of S. We say that a name or -/// declaration d is in scope if d is available in the current scope. -/// @description Checks that it is a compile-time error if a generic class -/// specifies two type parameters with the same name. -/// @author iefremov - - -class G { -// ^ -// [analyzer] unspecified -// [cfe] unspecified - G() { - "" is T; - } -} - -main() { - new G(); -} +// 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 It is a compile-time error if there is more than one entity +/// with the same name declared in the same scope. +/// Dart is lexically scoped. Scopes may nest. A name or declaration d is +/// available in scope S if d is in the namespace induced by S or if d is +/// available in the lexically enclosing scope of S. We say that a name or +/// declaration d is in scope if d is available in the current scope. +/// @description Checks that it is a compile-time error if a generic class +/// specifies two type parameters with the same name. +/// @author iefremov + + +class G { +// ^ +// [analyzer] unspecified +// [cfe] unspecified + G() { + "" is T; + } +} + +main() { + new G(); +} diff --git a/Language/Overview/Scoping/conflicting_names_t35.dart b/Language/Overview/Scoping/conflicting_names_t35.dart index e8675c718a..c2ed037fca 100644 --- a/Language/Overview/Scoping/conflicting_names_t35.dart +++ b/Language/Overview/Scoping/conflicting_names_t35.dart @@ -1,23 +1,23 @@ -// 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 It is a compile-time error if there is more than one entity -/// with the same name declared in the same scope. -/// Dart is lexically scoped. Scopes may nest. A name or declaration d is -/// available in scope S if d is in the namespace induced by S or if d is -/// available in the lexically enclosing scope of S. We say that a name or -/// declaration d is in scope if d is available in the current scope. -/// @description Checks that it is a compile-time error if a generic typedef -/// specifies two type parameters with the same name. -/// @author iefremov - - -typedef f(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f foo = () {}; -} +// 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 It is a compile-time error if there is more than one entity +/// with the same name declared in the same scope. +/// Dart is lexically scoped. Scopes may nest. A name or declaration d is +/// available in scope S if d is in the namespace induced by S or if d is +/// available in the lexically enclosing scope of S. We say that a name or +/// declaration d is in scope if d is available in the current scope. +/// @description Checks that it is a compile-time error if a generic typedef +/// specifies two type parameters with the same name. +/// @author iefremov + + +typedef f(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f foo = () {}; +} diff --git a/Language/Overview/Scoping/conflicting_names_t37.dart b/Language/Overview/Scoping/conflicting_names_t37.dart index f9d719c513..456dcab651 100644 --- a/Language/Overview/Scoping/conflicting_names_t37.dart +++ b/Language/Overview/Scoping/conflicting_names_t37.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if there is more than one entity -/// with the same name declared in the same scope. -/// Dart is lexically scoped. Scopes may nest. A name or declaration d is -/// available in scope S if d is in the namespace induced by S or if d is -/// available in the lexically enclosing scope of S. We say that a name or -/// declaration d is in scope if d is available in the current scope. -/// @description Checks that it is a compile-time error if a variable -/// declaration statement declares two identically named variables. -/// @author iefremov - - -main() { - int i, i; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error if there is more than one entity +/// with the same name declared in the same scope. +/// Dart is lexically scoped. Scopes may nest. A name or declaration d is +/// available in scope S if d is in the namespace induced by S or if d is +/// available in the lexically enclosing scope of S. We say that a name or +/// declaration d is in scope if d is available in the current scope. +/// @description Checks that it is a compile-time error if a variable +/// declaration statement declares two identically named variables. +/// @author iefremov + + +main() { + int i, i; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Overview/Scoping/conflicting_names_t38.dart b/Language/Overview/Scoping/conflicting_names_t38.dart index 94da014683..6524b3cb3f 100644 --- a/Language/Overview/Scoping/conflicting_names_t38.dart +++ b/Language/Overview/Scoping/conflicting_names_t38.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if there is more than one entity -/// with the same name declared in the same scope. -/// Dart is lexically scoped. Scopes may nest. A name or declaration d is -/// available in scope S if d is in the namespace induced by S or if d is -/// available in the lexically enclosing scope of S. We say that a name or -/// declaration d is in scope if d is available in the current scope. -/// @description Checks that it is a compile-time error when a variable -/// declaration statement in a for loop declares two identically named variables. -/// @author iefremov - - -main() { - for (int i, i; i < 10; ++i) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error if there is more than one entity +/// with the same name declared in the same scope. +/// Dart is lexically scoped. Scopes may nest. A name or declaration d is +/// available in scope S if d is in the namespace induced by S or if d is +/// available in the lexically enclosing scope of S. We say that a name or +/// declaration d is in scope if d is available in the current scope. +/// @description Checks that it is a compile-time error when a variable +/// declaration statement in a for loop declares two identically named variables. +/// @author iefremov + + +main() { + for (int i, i; i < 10; ++i) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Overview/Scoping/conflicting_names_t39.dart b/Language/Overview/Scoping/conflicting_names_t39.dart index b2418196fe..6d52fd0f29 100644 --- a/Language/Overview/Scoping/conflicting_names_t39.dart +++ b/Language/Overview/Scoping/conflicting_names_t39.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if there is more than one entity -/// with the same name declared in the same scope. -/// Dart is lexically scoped. Scopes may nest. A name or declaration d is -/// available in scope S if d is in the namespace induced by S or if d is -/// available in the lexically enclosing scope of S. We say that a name or -/// declaration d is in scope if d is available in the current scope. -/// @description Checks that it is a compile-time error if a typedef declaration -/// declares two identically named optional parameters. -/// @author iefremov - -typedef f([x, x]); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(f); -} +// 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 It is a compile-time error if there is more than one entity +/// with the same name declared in the same scope. +/// Dart is lexically scoped. Scopes may nest. A name or declaration d is +/// available in scope S if d is in the namespace induced by S or if d is +/// available in the lexically enclosing scope of S. We say that a name or +/// declaration d is in scope if d is available in the current scope. +/// @description Checks that it is a compile-time error if a typedef declaration +/// declares two identically named optional parameters. +/// @author iefremov + +typedef f([x, x]); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(f); +} diff --git a/Language/Overview/Scoping/conflicting_names_t41.dart b/Language/Overview/Scoping/conflicting_names_t41.dart index df8f37b8b1..b6c1fae162 100644 --- a/Language/Overview/Scoping/conflicting_names_t41.dart +++ b/Language/Overview/Scoping/conflicting_names_t41.dart @@ -1,23 +1,23 @@ -// 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 It is a compile-time error if there is more than one entity -/// with the same name declared in the same scope. -/// Dart is lexically scoped. Scopes may nest. A name or declaration d is -/// available in scope S if d is in the namespace induced by S or if d is -/// available in the lexically enclosing scope of S. We say that a name or -/// declaration d is in scope if d is available in the current scope. -/// @description Checks that it is a compile-time error if a typedef declaration -/// declares two identically named parameters. -/// @author iefremov - - -typedef f(x, x); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f foo = (x, y) {}; -} +// 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 It is a compile-time error if there is more than one entity +/// with the same name declared in the same scope. +/// Dart is lexically scoped. Scopes may nest. A name or declaration d is +/// available in scope S if d is in the namespace induced by S or if d is +/// available in the lexically enclosing scope of S. We say that a name or +/// declaration d is in scope if d is available in the current scope. +/// @description Checks that it is a compile-time error if a typedef declaration +/// declares two identically named parameters. +/// @author iefremov + + +typedef f(x, x); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f foo = (x, y) {}; +} diff --git a/Language/Overview/Scoping/conflicting_names_t45.dart b/Language/Overview/Scoping/conflicting_names_t45.dart index 4da124c641..d9d7fd8afa 100644 --- a/Language/Overview/Scoping/conflicting_names_t45.dart +++ b/Language/Overview/Scoping/conflicting_names_t45.dart @@ -1,25 +1,25 @@ -// 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 It is a compile-time error if there is more than one entity -/// with the same name declared in the same scope. -/// Dart is lexically scoped. Scopes may nest. A name or declaration d is -/// available in scope S if d is in the namespace induced by S or if d is -/// available in the lexically enclosing scope of S. We say that a name or -/// declaration d is in scope if d is available in the current scope. -/// @description Checks that it is a compile-time error if a class declares an -/// instance method and an abstract method with the same name. -/// @author iefremov - -class A { - f() {} - f(); -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A().f(); -} +// 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 It is a compile-time error if there is more than one entity +/// with the same name declared in the same scope. +/// Dart is lexically scoped. Scopes may nest. A name or declaration d is +/// available in scope S if d is in the namespace induced by S or if d is +/// available in the lexically enclosing scope of S. We say that a name or +/// declaration d is in scope if d is available in the current scope. +/// @description Checks that it is a compile-time error if a class declares an +/// instance method and an abstract method with the same name. +/// @author iefremov + +class A { + f() {} + f(); +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A().f(); +} diff --git a/Language/Overview/Scoping/conflicting_names_t46.dart b/Language/Overview/Scoping/conflicting_names_t46.dart index 8d948deecc..f67eabc4a7 100644 --- a/Language/Overview/Scoping/conflicting_names_t46.dart +++ b/Language/Overview/Scoping/conflicting_names_t46.dart @@ -1,28 +1,28 @@ -// 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 It is a compile-time error if there is more than one entity -/// with the same name declared in the same scope. -/// Dart is lexically scoped. Scopes may nest. A name or declaration d is -/// available in scope S if d is in the namespace induced by S or if d is -/// available in the lexically enclosing scope of S. We say that a name or -/// declaration d is in scope if d is available in the current scope. -/// @description Checks that it is a compile-time error if a class declares two -/// identically named constructors. -/// @author iefremov - - -class A { - A() {} - A() {} -//^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new A(); -// ^ -// [cfe] unspecified -} +// 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 It is a compile-time error if there is more than one entity +/// with the same name declared in the same scope. +/// Dart is lexically scoped. Scopes may nest. A name or declaration d is +/// available in scope S if d is in the namespace induced by S or if d is +/// available in the lexically enclosing scope of S. We say that a name or +/// declaration d is in scope if d is available in the current scope. +/// @description Checks that it is a compile-time error if a class declares two +/// identically named constructors. +/// @author iefremov + + +class A { + A() {} + A() {} +//^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new A(); +// ^ +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/assert_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/assert_t01.dart index 8c4b0227fe..68e484295a 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/assert_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/assert_t01.dart @@ -1,23 +1,23 @@ -// 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 "assert" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "assert" is used as a class name. -/// @author rodionov - - -class assert { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is assert; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "assert" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "assert" is used as a class name. +/// @author rodionov + + +class assert { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is assert; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/assert_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/assert_t03.dart index 4b74a34857..103fd45fbd 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/assert_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/assert_t03.dart @@ -1,23 +1,23 @@ -// 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 "assert" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "assert" is used as a function type alias name. -/// @author rodionov - - -typedef void assert(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is assert; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "assert" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "assert" is used as a function type alias name. +/// @author rodionov + + +typedef void assert(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is assert; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/assert_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/assert_t04.dart index e644d2a091..dbca0132d7 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/assert_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/assert_t04.dart @@ -1,25 +1,25 @@ -// 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 "assert" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "assert" is used as a class member (field) name. -/// @author rodionov - - -class C { - int assert = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().assert is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "assert" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "assert" is used as a class member (field) name. +/// @author rodionov + + +class C { + int assert = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().assert is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/assert_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/assert_t07.dart index 46f9c46885..42e52909b9 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/assert_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/assert_t07.dart @@ -1,25 +1,25 @@ -// 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 "assert" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "assert" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void assert() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.assert(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "assert" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "assert" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void assert() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.assert(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/assert_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/assert_t08.dart index b6eb8a417b..f4b3ee5160 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/assert_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/assert_t08.dart @@ -1,20 +1,20 @@ -// 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 "assert" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "assert" is used as a function parameter name. -/// @author rodionov - - -void f(var assert) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(f); -} +// 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 "assert" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "assert" is used as a function parameter name. +/// @author rodionov + + +void f(var assert) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(f); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/assert_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/assert_t10.dart index 22e244f7fb..2956aba4b9 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/assert_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/assert_t10.dart @@ -1,18 +1,18 @@ -// 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 "assert" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "assert" is used as a library name. -/// @author rodionov - -library assert; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "assert" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "assert" is used as a library name. +/// @author rodionov + +library assert; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/assert_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/assert_t11.dart index 11c4581d37..8996421f50 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/assert_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/assert_t11.dart @@ -1,19 +1,19 @@ -// 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 "assert" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "assert" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as assert; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "assert" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "assert" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as assert; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/assert_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/assert_t12.dart index 47ae34c2ea..e5dda7e5e5 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/assert_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/assert_t12.dart @@ -1,19 +1,19 @@ -// 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 "assert" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "assert" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "assert_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "assert" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "assert" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "assert_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/break_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/break_t01.dart index cae3269fb6..fd3543275d 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/break_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/break_t01.dart @@ -1,23 +1,23 @@ -// 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 "break" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "break" is used as a class name. -/// @author vasya - - -class break { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is break; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "break" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "break" is used as a class name. +/// @author vasya + + +class break { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is break; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/break_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/break_t03.dart index 0f5f875de0..161eaecc0c 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/break_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/break_t03.dart @@ -1,23 +1,23 @@ -// 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 "break" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "break" is used as a function type alias name. -/// @author rodionov - - -typedef void break(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is break; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "break" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "break" is used as a function type alias name. +/// @author rodionov + + +typedef void break(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is break; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/break_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/break_t04.dart index 693402d3a4..63c2ed4dfc 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/break_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/break_t04.dart @@ -1,25 +1,25 @@ -// 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 "break" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "break" is used as a class member (field) name. -/// @author rodionov - - -class C { - int break = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().break is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "break" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "break" is used as a class member (field) name. +/// @author rodionov + + +class C { + int break = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().break is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/break_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/break_t07.dart index e6db628410..019b87d89b 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/break_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/break_t07.dart @@ -1,25 +1,25 @@ -// 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 "break" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "break" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void break() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.break(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "break" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "break" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void break() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.break(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/break_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/break_t08.dart index c55aa35d62..b609f5a8d3 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/break_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/break_t08.dart @@ -1,20 +1,20 @@ -// 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 "break" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "break" is used as a function parameter name. -/// @author rodionov - - -void f(var break) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(f); -} +// 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 "break" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "break" is used as a function parameter name. +/// @author rodionov + + +void f(var break) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(f); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/break_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/break_t10.dart index fa1083ccf2..8d9d70cd0c 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/break_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/break_t10.dart @@ -1,18 +1,18 @@ -// 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 "break" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "break" is used as a library name. -/// @author rodionov - -library break; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "break" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "break" is used as a library name. +/// @author rodionov + +library break; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/break_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/break_t11.dart index b4f49fdad1..09b8b1a1a6 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/break_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/break_t11.dart @@ -1,19 +1,19 @@ -// 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 "break" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "break" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as break; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "break" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "break" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as break; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/break_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/break_t12.dart index 15623d8f72..2df3bd79ce 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/break_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/break_t12.dart @@ -1,19 +1,19 @@ -// 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 "break" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "break" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "break_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "break" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "break" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "break_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/case_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/case_t01.dart index 2ada23e724..b144af3146 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/case_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/case_t01.dart @@ -1,23 +1,23 @@ -// 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 "case" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "case" is used as a class name. -/// @author vasya - - -class case { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is case; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "case" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "case" is used as a class name. +/// @author vasya + + +class case { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is case; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/case_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/case_t03.dart index 3665c0ae2d..ee4dca42ff 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/case_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/case_t03.dart @@ -1,23 +1,23 @@ -// 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 "case" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "case" is used as a function type alias name. -/// @author rodionov - - -typedef void case(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is case; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "case" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "case" is used as a function type alias name. +/// @author rodionov + + +typedef void case(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is case; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/case_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/case_t04.dart index 065c3f02ba..32a73a218a 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/case_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/case_t04.dart @@ -1,25 +1,25 @@ -// 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 "case" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "case" is used as a class member (field) name. -/// @author rodionov - - -class C { - int case = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().case is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "case" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "case" is used as a class member (field) name. +/// @author rodionov + + +class C { + int case = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().case is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/case_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/case_t07.dart index 8c7ef06fbd..2e8684a0bc 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/case_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/case_t07.dart @@ -1,25 +1,25 @@ -// 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 "case" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "case" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void case() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.case(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "case" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "case" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void case() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.case(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/case_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/case_t08.dart index 2ccbf82207..b68a837662 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/case_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/case_t08.dart @@ -1,20 +1,20 @@ -// 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 "case" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "case" is used as a function parameter name. -/// @author rodionov - - -void f(var case) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -} +// 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 "case" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "case" is used as a function parameter name. +/// @author rodionov + + +void f(var case) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/case_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/case_t10.dart index 2f8e65bb77..86b1cf573a 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/case_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/case_t10.dart @@ -1,18 +1,18 @@ -// 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 "case" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "case" is used as a library name. -/// @author rodionov - -library case; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "case" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "case" is used as a library name. +/// @author rodionov + +library case; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/case_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/case_t11.dart index b5567bf37b..f299cc68f8 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/case_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/case_t11.dart @@ -1,19 +1,19 @@ -// 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 "case" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "case" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as case; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "case" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "case" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as case; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/case_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/case_t12.dart index f2a6d6018c..ef7dc3f07a 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/case_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/case_t12.dart @@ -1,19 +1,19 @@ -// 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 "case" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "case" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "case_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "case" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "case" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "case_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/catch_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/catch_t01.dart index c798f935bf..59d6e1bd31 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/catch_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/catch_t01.dart @@ -1,23 +1,23 @@ -// 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 "catch" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "catch" is used as a class name. -/// @author vasya - - -class catch { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is catch; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "catch" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "catch" is used as a class name. +/// @author vasya + + +class catch { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is catch; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/catch_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/catch_t03.dart index 100e093820..ed072f71d2 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/catch_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/catch_t03.dart @@ -1,23 +1,23 @@ -// 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 "catch" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "catch" is used as a function type alias name. -/// @author rodionov - - -typedef void catch(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is catch; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "catch" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "catch" is used as a function type alias name. +/// @author rodionov + + +typedef void catch(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is catch; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/catch_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/catch_t04.dart index e00e17e8b4..a3d07eda5e 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/catch_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/catch_t04.dart @@ -1,25 +1,25 @@ -// 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 "catch" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "catch" is used as a class member (field) name. -/// @author rodionov - - -class C { - int catch = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().catch is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "catch" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "catch" is used as a class member (field) name. +/// @author rodionov + + +class C { + int catch = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().catch is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/catch_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/catch_t07.dart index f162d64a76..d0c6fca044 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/catch_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/catch_t07.dart @@ -1,25 +1,25 @@ -// 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 "catch" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "catch" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void catch() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.catch(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "catch" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "catch" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void catch() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.catch(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/catch_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/catch_t08.dart index 4e03d23669..cafa64963e 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/catch_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/catch_t08.dart @@ -1,20 +1,20 @@ -// 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 "catch" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "catch" is used as a function parameter name. -/// @author rodionov - - -void f(var catch) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -} +// 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 "catch" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "catch" is used as a function parameter name. +/// @author rodionov + + +void f(var catch) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/catch_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/catch_t10.dart index 2d1ea0ff54..d24b85c9b0 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/catch_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/catch_t10.dart @@ -1,18 +1,18 @@ -// 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 "catch" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "catch" is used as a library name. -/// @author rodionov - -library catch; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "catch" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "catch" is used as a library name. +/// @author rodionov + +library catch; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/catch_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/catch_t11.dart index 7fd0cddb20..ad6387e472 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/catch_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/catch_t11.dart @@ -1,19 +1,19 @@ -// 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 "catch" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "catch" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as catch; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "catch" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "catch" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as catch; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/catch_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/catch_t12.dart index 12b5bdf24f..848772fca1 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/catch_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/catch_t12.dart @@ -1,19 +1,19 @@ -// 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 "catch" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "catch" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "catch_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "catch" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "catch" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "catch_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/class_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/class_t01.dart index 72333c8795..f70df6d599 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/class_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/class_t01.dart @@ -1,23 +1,23 @@ -// 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 "class" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "class" is used as a class name. -/// @author vasya - - -class class {} // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is class; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "class" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "class" is used as a class name. +/// @author vasya + + +class class {} // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is class; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/class_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/class_t03.dart index 4514c1318a..2e7577895f 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/class_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/class_t03.dart @@ -1,23 +1,23 @@ -// 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 "class" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "class" is used as a function type alias name. -/// @author rodionov - - -typedef void class(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is class; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "class" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "class" is used as a function type alias name. +/// @author rodionov + + +typedef void class(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is class; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/class_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/class_t04.dart index 09954079fa..e6cddbc694 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/class_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/class_t04.dart @@ -1,25 +1,25 @@ -// 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 "class" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "class" is used as a class member (field) name. -/// @author rodionov - - -class C { - int class = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().class is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "class" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "class" is used as a class member (field) name. +/// @author rodionov + + +class C { + int class = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().class is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/class_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/class_t07.dart index 86e43943e4..d4020b2a22 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/class_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/class_t07.dart @@ -1,25 +1,25 @@ -// 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 "class" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "class" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void class() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.class(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "class" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "class" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void class() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.class(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/class_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/class_t08.dart index a00fb87ea5..9661e23fa8 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/class_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/class_t08.dart @@ -1,20 +1,20 @@ -// 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 "class" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "class" is used as a function parameter name. -/// @author rodionov - - -void f(var class) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -} +// 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 "class" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "class" is used as a function parameter name. +/// @author rodionov + + +void f(var class) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/class_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/class_t10.dart index 376661fcc0..b92bed2655 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/class_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/class_t10.dart @@ -1,18 +1,18 @@ -// 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 "class" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "class" is used as a library name. -/// @author rodionov - -library class; -// ^^^^^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "class" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "class" is used as a library name. +/// @author rodionov + +library class; +// ^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/class_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/class_t11.dart index 5cc232946f..9bc4993327 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/class_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/class_t11.dart @@ -1,19 +1,19 @@ -// 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 "class" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "class" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as class; -// ^^^^^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "class" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "class" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as class; +// ^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/class_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/class_t12.dart index 2c7cb0a9aa..e4bfa38c43 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/class_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/class_t12.dart @@ -1,19 +1,19 @@ -// 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 "class" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "class" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "class_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "class" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "class" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "class_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/const_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/const_t01.dart index 6cb456af6c..7bb12c0532 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/const_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/const_t01.dart @@ -1,23 +1,23 @@ -// 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 "const" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "const" is used as a class name. -/// @author vasya - - -class const { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is const; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "const" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "const" is used as a class name. +/// @author vasya + + +class const { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is const; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/const_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/const_t03.dart index e6789dadb3..b4a0edcc81 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/const_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/const_t03.dart @@ -1,23 +1,23 @@ -// 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 "const" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "const" is used as a function type alias name. -/// @author rodionov - - -typedef void const(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is const; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "const" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "const" is used as a function type alias name. +/// @author rodionov + + +typedef void const(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is const; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/const_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/const_t04.dart index a743da801b..ff4b9299f9 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/const_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/const_t04.dart @@ -1,25 +1,25 @@ -// 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 "const" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "const" is used as a class member (field) name. -/// @author rodionov - - -class C { - int const = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().const is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "const" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "const" is used as a class member (field) name. +/// @author rodionov + + +class C { + int const = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().const is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/const_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/const_t07.dart index eacaaeec74..27a2052e8d 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/const_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/const_t07.dart @@ -1,25 +1,25 @@ -// 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 "const" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "const" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void const() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.const(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "const" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "const" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void const() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.const(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/const_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/const_t08.dart index c40a6e74db..f7e08fe4a5 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/const_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/const_t08.dart @@ -1,22 +1,22 @@ -// 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 "const" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "const" is used as a function parameter name. -/// @author rodionov - - -void f(var const) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -// ^ -// [cfe] unspecified -} +// 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 "const" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "const" is used as a function parameter name. +/// @author rodionov + + +void f(var const) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +// ^ +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/const_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/const_t10.dart index 7e3d0ddc46..95e1a26b65 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/const_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/const_t10.dart @@ -1,18 +1,18 @@ -// 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 "const" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "const" is used as a library name. -/// @author rodionov - -library const; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "const" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "const" is used as a library name. +/// @author rodionov + +library const; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/const_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/const_t11.dart index 8a048cd437..2433c59802 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/const_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/const_t11.dart @@ -1,19 +1,19 @@ -// 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 "const" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "const" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as const; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "const" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "const" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as const; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/const_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/const_t12.dart index 7602a90968..0faa30deb4 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/const_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/const_t12.dart @@ -1,19 +1,19 @@ -// 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 "const" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "const" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "const_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "const" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "const" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "const_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/continue_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/continue_t01.dart index 8c0a893c38..0aaa539241 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/continue_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/continue_t01.dart @@ -1,23 +1,23 @@ -// 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 "continue" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "continue" is used as a class name. -/// @author vasya - - -class continue { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is continue; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "continue" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "continue" is used as a class name. +/// @author vasya + + +class continue { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is continue; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/continue_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/continue_t03.dart index e8fae806a9..acf754545d 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/continue_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/continue_t03.dart @@ -1,23 +1,23 @@ -// 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 "continue" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "continue" is used as a function type alias name. -/// @author rodionov - - -typedef void continue(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is continue; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "continue" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "continue" is used as a function type alias name. +/// @author rodionov + + +typedef void continue(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is continue; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/continue_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/continue_t04.dart index 0018457d58..359da119d6 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/continue_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/continue_t04.dart @@ -1,25 +1,25 @@ -// 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 "continue" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "continue" is used as a class member (field) name. -/// @author rodionov - - -class C { - int continue = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().continue is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "continue" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "continue" is used as a class member (field) name. +/// @author rodionov + + +class C { + int continue = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().continue is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/continue_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/continue_t07.dart index b925b8b334..785dfb19b3 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/continue_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/continue_t07.dart @@ -1,25 +1,25 @@ -// 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 "continue" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "continue" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void continue() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.continue(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "continue" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "continue" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void continue() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.continue(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/continue_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/continue_t08.dart index 4adef19159..6d3efee7d8 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/continue_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/continue_t08.dart @@ -1,20 +1,20 @@ -// 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 "continue" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "continue" is used as a function parameter name. -/// @author rodionov - - -void f(var continue) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(f); -} +// 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 "continue" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "continue" is used as a function parameter name. +/// @author rodionov + + +void f(var continue) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(f); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/continue_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/continue_t10.dart index 0460769961..2840d2e06d 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/continue_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/continue_t10.dart @@ -1,18 +1,18 @@ -// 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 "continue" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "continue" is used as a library name. -/// @author rodionov - -library continue; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "continue" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "continue" is used as a library name. +/// @author rodionov + +library continue; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/continue_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/continue_t11.dart index 273f6565a4..a7c22a43ac 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/continue_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/continue_t11.dart @@ -1,19 +1,19 @@ -// 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 "continue" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "continue" is used as an identifier following a 'show' combinator in an -/// import directive. -/// @author rodionov - -import "lib.dart" as continue; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "continue" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "continue" is used as an identifier following a 'show' combinator in an +/// import directive. +/// @author rodionov + +import "lib.dart" as continue; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/continue_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/continue_t12.dart index 59d79ae429..36b676f2bf 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/continue_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/continue_t12.dart @@ -1,19 +1,19 @@ -// 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 "continue" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "continue" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "continue_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "continue" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "continue" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "continue_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/default_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/default_t01.dart index 8370fab2e4..969ca29328 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/default_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/default_t01.dart @@ -1,23 +1,23 @@ -// 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 "default" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "default" is used as a class name. -/// @author vasya - - -class default { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is default; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "default" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "default" is used as a class name. +/// @author vasya + + +class default { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is default; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/default_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/default_t03.dart index 2262daef8c..2a9b3fb0a4 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/default_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/default_t03.dart @@ -1,23 +1,23 @@ -// 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 "default" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "default" is used as a function type alias name. -/// @author rodionov - - -typedef void default(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is default; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "default" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "default" is used as a function type alias name. +/// @author rodionov + + +typedef void default(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is default; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/default_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/default_t04.dart index 4637d6662c..57607064f4 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/default_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/default_t04.dart @@ -1,25 +1,25 @@ -// 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 "default" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "default" is used as a class member (field) name. -/// @author rodionov - - -class C { - int default = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().default is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "default" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "default" is used as a class member (field) name. +/// @author rodionov + + +class C { + int default = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().default is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/default_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/default_t07.dart index a97a2575d0..bbb3519bc7 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/default_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/default_t07.dart @@ -1,25 +1,25 @@ -// 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 "default" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "default" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void default() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.default(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "default" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "default" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void default() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.default(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/default_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/default_t08.dart index 666f6be0a9..97b5d3d138 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/default_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/default_t08.dart @@ -1,20 +1,20 @@ -// 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 "default" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "default" is used as a function parameter name. -/// @author rodionov - - -void f(var default) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -} +// 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 "default" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "default" is used as a function parameter name. +/// @author rodionov + + +void f(var default) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/default_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/default_t10.dart index 1d9609f8a4..39b7829723 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/default_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/default_t10.dart @@ -1,18 +1,18 @@ -// 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 "default" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "default" is used as a library name. -/// @author rodionov - -library default; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "default" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "default" is used as a library name. +/// @author rodionov + +library default; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/default_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/default_t11.dart index 5184cc0a58..cde8693b08 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/default_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/default_t11.dart @@ -1,19 +1,19 @@ -// 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 "default" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "default" is used as an identifier following a 'show' combinator in an -/// import directive. -/// @author rodionov - -import "lib.dart" as default; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "default" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "default" is used as an identifier following a 'show' combinator in an +/// import directive. +/// @author rodionov + +import "lib.dart" as default; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/default_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/default_t12.dart index c5e89ce8a3..79f29db876 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/default_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/default_t12.dart @@ -1,19 +1,19 @@ -// 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 "default" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "default" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "default_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "default" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "default" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "default_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/do_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/do_t01.dart index a73a870507..e350e9d38a 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/do_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/do_t01.dart @@ -1,26 +1,26 @@ -// 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 "do" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "do" -/// is used as a class name. -/// @author vasya - - -class do { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is do; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} -//^ -// [analyzer] unspecified -// [cfe] unspecified +// 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 "do" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "do" +/// is used as a class name. +/// @author vasya + + +class do { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is do; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} +//^ +// [analyzer] unspecified +// [cfe] unspecified diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/do_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/do_t03.dart index 50d6eb4a58..5125824dff 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/do_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/do_t03.dart @@ -1,26 +1,26 @@ -// 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 "do" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "do" -/// is used as a function type alias name. -/// @author rodionov - - -typedef void do(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is do; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} -//^ -// [analyzer] unspecified -// [cfe] unspecified +// 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 "do" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "do" +/// is used as a function type alias name. +/// @author rodionov + + +typedef void do(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is do; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} +//^ +// [analyzer] unspecified +// [cfe] unspecified diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/do_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/do_t04.dart index 6a641a472c..64f2405e0b 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/do_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/do_t04.dart @@ -1,28 +1,28 @@ -// 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 "do" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "do" -/// is used as a class member (field) name. -/// @author rodionov - - -class C { - int do = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().do is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} -//^ -// [analyzer] unspecified -// [cfe] unspecified +// 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 "do" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "do" +/// is used as a class member (field) name. +/// @author rodionov + + +class C { + int do = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().do is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} +//^ +// [analyzer] unspecified +// [cfe] unspecified diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/do_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/do_t07.dart index 740eb7034f..615525aeab 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/do_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/do_t07.dart @@ -1,28 +1,28 @@ -// 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 "do" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "do" -/// is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void do() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.do(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} -//^ -// [analyzer] unspecified -// [cfe] unspecified +// 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 "do" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "do" +/// is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void do() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.do(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} +//^ +// [analyzer] unspecified +// [cfe] unspecified diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/do_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/do_t08.dart index 25c67f27db..33d38b5419 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/do_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/do_t08.dart @@ -1,20 +1,20 @@ -// 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 "do" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "do" -/// is used as a function parameter name. -/// @author rodionov - - -void f(var do) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(f); -} +// 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 "do" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "do" +/// is used as a function parameter name. +/// @author rodionov + + +void f(var do) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(f); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/do_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/do_t10.dart index 341c3994be..bddf23ea1c 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/do_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/do_t10.dart @@ -1,18 +1,18 @@ -// 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 "do" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "do" -/// is used as a library name. -/// @author rodionov - -library do; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "do" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "do" +/// is used as a library name. +/// @author rodionov + +library do; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/do_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/do_t11.dart index 11974efdb9..b658282cc7 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/do_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/do_t11.dart @@ -1,18 +1,18 @@ -// 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 "do" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "do" -/// is used as an identifier following a 'show' combinator in an import directive. -/// @author rodionov - -import "lib.dart" as do; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "do" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "do" +/// is used as an identifier following a 'show' combinator in an import directive. +/// @author rodionov + +import "lib.dart" as do; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/do_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/do_t12.dart index 6effec7bb0..c683dc49ae 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/do_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/do_t12.dart @@ -1,19 +1,19 @@ -// 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 "do" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "do" -/// is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "do_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "do" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "do" +/// is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "do_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/else_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/else_t01.dart index caf5985802..d42c71ef08 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/else_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/else_t01.dart @@ -1,23 +1,23 @@ -// 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 "else" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "else" is used as a class name. -/// @author vasya - - -class else { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is else; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "else" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "else" is used as a class name. +/// @author vasya + + +class else { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is else; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/else_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/else_t03.dart index d290e2af5f..24e1d6f4dd 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/else_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/else_t03.dart @@ -1,23 +1,23 @@ -// 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 "else" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "else" is used as a function type alias name. -/// @author rodionov - - -typedef void else(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is else; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "else" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "else" is used as a function type alias name. +/// @author rodionov + + +typedef void else(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is else; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/else_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/else_t04.dart index cde7755d77..d70a9ae732 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/else_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/else_t04.dart @@ -1,25 +1,25 @@ -// 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 "else" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "else" is used as a class member (field) name. -/// @author rodionov - - -class C { - int else = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().else is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "else" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "else" is used as a class member (field) name. +/// @author rodionov + + +class C { + int else = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().else is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/else_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/else_t07.dart index ed6eb2b6e5..2f201e76fd 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/else_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/else_t07.dart @@ -1,25 +1,25 @@ -// 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 "else" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "else" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void else() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.else(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "else" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "else" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void else() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.else(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/else_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/else_t08.dart index 0f234fe373..46c9834506 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/else_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/else_t08.dart @@ -1,20 +1,20 @@ -// 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 "else" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "else" is used as a function parameter name. -/// @author rodionov - - -void f(var else) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(f); -} +// 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 "else" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "else" is used as a function parameter name. +/// @author rodionov + + +void f(var else) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(f); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/else_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/else_t10.dart index 665fad3ef2..515ccd2f85 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/else_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/else_t10.dart @@ -1,18 +1,18 @@ -// 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 "else" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "else" is used as a library name. -/// @author rodionov - -library else; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "else" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "else" is used as a library name. +/// @author rodionov + +library else; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/else_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/else_t11.dart index 81b19f8c33..08ba7d3c66 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/else_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/else_t11.dart @@ -1,19 +1,19 @@ -// 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 "else" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "else" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as else; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "else" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "else" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as else; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/else_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/else_t12.dart index 69346b2779..d551d9bf6e 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/else_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/else_t12.dart @@ -1,19 +1,19 @@ -// 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 "else" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "else" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "else_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "else" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "else" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "else_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/enum_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/enum_t01.dart index b15661e974..c1192ab053 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/enum_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/enum_t01.dart @@ -1,23 +1,23 @@ -// Copyright (c) 2016, 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 "enum" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "enum" is used as a class name. -/// @author ngl@unipro.ru - - -class enum { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is enum; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// Copyright (c) 2016, 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 "enum" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "enum" is used as a class name. +/// @author ngl@unipro.ru + + +class enum { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is enum; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/enum_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/enum_t03.dart index 8b86dd27dd..51bbd5a0fe 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/enum_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/enum_t03.dart @@ -1,23 +1,23 @@ -// Copyright (c) 2016, 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 "enum" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "enum" is used as a function type alias name. -/// @author ngl@unipro.ru - - -typedef void enum(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is enum; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// Copyright (c) 2016, 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 "enum" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "enum" is used as a function type alias name. +/// @author ngl@unipro.ru + + +typedef void enum(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is enum; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/enum_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/enum_t04.dart index 6389bbafa0..6f47b0a59c 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/enum_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/enum_t04.dart @@ -1,25 +1,25 @@ -// Copyright (c) 2016, 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 "enum" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "enum" is used as a class member (field) name. -/// @author ngl@unipro.ru - - -class C { - int enum = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().enum is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// Copyright (c) 2016, 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 "enum" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "enum" is used as a class member (field) name. +/// @author ngl@unipro.ru + + +class C { + int enum = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().enum is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/enum_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/enum_t07.dart index b104574b92..955a082e61 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/enum_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/enum_t07.dart @@ -1,25 +1,25 @@ -// Copyright (c) 2016, 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 "enum" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "enum" is used as a static class member (function) name. -/// @author ngl@unipro.ru - - -class C { - static void enum() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.enum(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// Copyright (c) 2016, 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 "enum" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "enum" is used as a static class member (function) name. +/// @author ngl@unipro.ru + + +class C { + static void enum() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.enum(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/enum_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/enum_t08.dart index 2d293c76eb..c1c0ff2459 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/enum_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/enum_t08.dart @@ -1,20 +1,20 @@ -// Copyright (c) 2016, 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 "enum" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "enum" is used as a function parameter name. -/// @author ngl@unipro.ru - - -void f(var enum) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -} +// Copyright (c) 2016, 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 "enum" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "enum" is used as a function parameter name. +/// @author ngl@unipro.ru + + +void f(var enum) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/enum_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/enum_t10.dart index fb27b0d06e..0396247816 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/enum_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/enum_t10.dart @@ -1,18 +1,18 @@ -// Copyright (c) 2016, 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 "enum" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "enum" is used as a library name. -/// @author ngl@unipro.ru - -library enum; -// ^^^^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2016, 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 "enum" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "enum" is used as a library name. +/// @author ngl@unipro.ru + +library enum; +// ^^^^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/enum_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/enum_t11.dart index 1c984ca827..e0a61dd263 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/enum_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/enum_t11.dart @@ -1,19 +1,19 @@ -// Copyright (c) 2016, 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 "enum" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "enum" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author ngl@unipro.ru - -import "lib.dart" as enum; -// ^^^^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2016, 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 "enum" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "enum" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author ngl@unipro.ru + +import "lib.dart" as enum; +// ^^^^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/enum_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/enum_t12.dart index fc6a0b886d..189572df25 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/enum_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/enum_t12.dart @@ -1,19 +1,19 @@ -// Copyright (c) 2016, 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 "enum" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "enum" is used as an identifier in a part declaration. -/// @author ngl@unipro.ru -/// @issue 44990 - -part "enum_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// Copyright (c) 2016, 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 "enum" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "enum" is used as an identifier in a part declaration. +/// @author ngl@unipro.ru +/// @issue 44990 + +part "enum_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/extends_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/extends_t01.dart index 4c05d459e9..f6be2220a1 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/extends_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/extends_t01.dart @@ -1,23 +1,23 @@ -// 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 "extends" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "extends" is used as a class name. -/// @author vasya - - -class extends {} // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is extends; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "extends" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "extends" is used as a class name. +/// @author vasya + + +class extends {} // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is extends; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/extends_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/extends_t03.dart index 2f53bda9b6..708aea285b 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/extends_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/extends_t03.dart @@ -1,23 +1,23 @@ -// 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 "extends" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "extends" is used as a function type alias name. -/// @author rodionov - - -typedef void extends(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is extends; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "extends" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "extends" is used as a function type alias name. +/// @author rodionov + + +typedef void extends(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is extends; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/extends_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/extends_t04.dart index 80f1fb91a2..b508cb3c33 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/extends_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/extends_t04.dart @@ -1,25 +1,25 @@ -// 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 "extends" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "extends" is used as a class member (field) name. -/// @author rodionov - - -class C { - int extends = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().extends is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "extends" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "extends" is used as a class member (field) name. +/// @author rodionov + + +class C { + int extends = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().extends is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/extends_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/extends_t07.dart index e588fd326f..434b3eb6e3 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/extends_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/extends_t07.dart @@ -1,25 +1,25 @@ -// 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 "extends" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "extends" sis used as a static class member (function) name. -/// @author rodionov - - -class C { - static void extends() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.extends(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "extends" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "extends" sis used as a static class member (function) name. +/// @author rodionov + + +class C { + static void extends() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.extends(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/extends_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/extends_t08.dart index f1382c25ee..2f91bbaf87 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/extends_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/extends_t08.dart @@ -1,20 +1,20 @@ -// 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 "extends" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "extends" is used as a function parameter name. -/// @author rodionov - - -void f(var extends) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -} +// 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 "extends" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "extends" is used as a function parameter name. +/// @author rodionov + + +void f(var extends) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/extends_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/extends_t10.dart index 3e15a821ba..f2941cc513 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/extends_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/extends_t10.dart @@ -1,18 +1,18 @@ -// 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 "extends" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "extends" is used as a library name. -/// @author rodionov - -library extends; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "extends" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "extends" is used as a library name. +/// @author rodionov + +library extends; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/extends_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/extends_t11.dart index 60f838d092..8e51a3316f 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/extends_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/extends_t11.dart @@ -1,19 +1,19 @@ -// 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 "extends" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "extends" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as extends; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "extends" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "extends" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as extends; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/extends_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/extends_t12.dart index 918e7d65c4..e936436384 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/extends_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/extends_t12.dart @@ -1,19 +1,19 @@ -// 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 "extends" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "extends" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "extends_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "extends" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "extends" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "extends_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/false_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/false_t01.dart index 67911825f6..db650ece4a 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/false_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/false_t01.dart @@ -1,23 +1,23 @@ -// 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 "false" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "false" is used as a class name. -/// @author vasya - - -class false { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is false; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "false" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "false" is used as a class name. +/// @author vasya + + +class false { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is false; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/false_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/false_t03.dart index cc02b72d7f..3c9d8ff5c9 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/false_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/false_t03.dart @@ -1,23 +1,23 @@ -// 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 "false" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "false" is used as a function type alias name. -/// @author rodionov - - -typedef void false(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is false; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "false" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "false" is used as a function type alias name. +/// @author rodionov + + +typedef void false(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is false; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/false_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/false_t04.dart index 0b828ff21d..78ce5b1226 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/false_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/false_t04.dart @@ -1,25 +1,25 @@ -// 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 "false" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "false" is used as a class member (field) name. -/// @author rodionov - - -class C { - int false = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().false is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "false" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "false" is used as a class member (field) name. +/// @author rodionov + + +class C { + int false = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().false is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/false_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/false_t07.dart index 785e7e0285..62001190e4 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/false_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/false_t07.dart @@ -1,25 +1,25 @@ -// 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 "false" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "false" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void false() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.false(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "false" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "false" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void false() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.false(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/false_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/false_t08.dart index de0c586a23..c532ea3516 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/false_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/false_t08.dart @@ -1,20 +1,20 @@ -// 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 "false" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "false" is used as a function parameter name. -/// @author rodionov - - -void f(var false) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -} +// 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 "false" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "false" is used as a function parameter name. +/// @author rodionov + + +void f(var false) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/false_t09.dart b/Language/Reference/Lexical_Rules/Reserved_Words/false_t09.dart index ff321f17e5..4ed09ee48f 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/false_t09.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/false_t09.dart @@ -1,20 +1,20 @@ -// 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 "false" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "false" is used as an identifier in a catch clause. -/// @author rodionov - - -main() { - try { - int x = 0; - } catch (false) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "false" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "false" is used as an identifier in a catch clause. +/// @author rodionov + + +main() { + try { + int x = 0; + } catch (false) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/false_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/false_t10.dart index be62bf1106..6e607b9f81 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/false_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/false_t10.dart @@ -1,18 +1,18 @@ -// 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 "false" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "false" is used as a library name. -/// @author rodionov - -library false; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "false" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "false" is used as a library name. +/// @author rodionov + +library false; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/false_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/false_t11.dart index 3afc3983a9..6e62bc25d6 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/false_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/false_t11.dart @@ -1,19 +1,19 @@ -// 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 "false" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "false" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as false; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "false" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "false" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as false; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/false_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/false_t12.dart index acf0b1dfd8..54d1012357 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/false_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/false_t12.dart @@ -1,19 +1,19 @@ -// 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 "false" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "false" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "false_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "false" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "false" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "false_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/final_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/final_t01.dart index d3252ef39f..96b1c4acf2 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/final_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/final_t01.dart @@ -1,23 +1,23 @@ -// 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 "final" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "final" is used as a class name. -/// @author vasya - - -class final { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is final; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "final" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "final" is used as a class name. +/// @author vasya + + +class final { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is final; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/final_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/final_t03.dart index 2b568670c6..e4974eb50c 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/final_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/final_t03.dart @@ -1,23 +1,23 @@ -// 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 "final" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "final" is used as a function type alias name. -/// @author rodionov - - -typedef void final(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is final; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "final" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "final" is used as a function type alias name. +/// @author rodionov + + +typedef void final(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is final; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/final_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/final_t04.dart index 6a5c4d3e07..11645f5a7a 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/final_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/final_t04.dart @@ -1,25 +1,25 @@ -// 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 "final" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "final" is used as a class member (field) name. -/// @author rodionov - - -class C { - int final = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().final is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "final" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "final" is used as a class member (field) name. +/// @author rodionov + + +class C { + int final = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().final is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/final_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/final_t07.dart index 1439a3f2cb..ca9ea22b9e 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/final_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/final_t07.dart @@ -1,25 +1,25 @@ -// 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 "final" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "final" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void final() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.final(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "final" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "final" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void final() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.final(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/final_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/final_t08.dart index b433f5db45..0a5112e930 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/final_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/final_t08.dart @@ -1,22 +1,22 @@ -// 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 "final" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "final" is used as a function parameter name. -/// @author rodionov - - -void f(var final) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -// ^ -// [cfe] unspecified -} +// 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 "final" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "final" is used as a function parameter name. +/// @author rodionov + + +void f(var final) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +// ^ +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/final_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/final_t10.dart index af598f3776..f88fc3ebd8 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/final_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/final_t10.dart @@ -1,18 +1,18 @@ -// 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 "final" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "final" is used as a library name. -/// @author rodionov - -library final; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "final" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "final" is used as a library name. +/// @author rodionov + +library final; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/final_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/final_t11.dart index 2213de45ee..cdde52e86e 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/final_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/final_t11.dart @@ -1,19 +1,19 @@ -// 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 "final" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "final" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as final; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "final" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "final" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as final; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/final_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/final_t12.dart index 7dfde98afc..90ff204806 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/final_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/final_t12.dart @@ -1,19 +1,19 @@ -// 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 "final" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "final" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "final_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "final" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "final" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "final_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/finally_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/finally_t01.dart index 804513f836..26d7d57d41 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/finally_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/finally_t01.dart @@ -1,23 +1,23 @@ -// 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 "finally" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "finally" is used as a class name. -/// @author vasya - - -class finally { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is finally; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "finally" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "finally" is used as a class name. +/// @author vasya + + +class finally { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is finally; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/finally_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/finally_t03.dart index 546a2c83d8..18a2340ce0 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/finally_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/finally_t03.dart @@ -1,23 +1,23 @@ -// 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 "finally" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "finally" is used as a function type alias name. -/// @author rodionov - - -typedef void finally(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is finally; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "finally" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "finally" is used as a function type alias name. +/// @author rodionov + + +typedef void finally(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is finally; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/finally_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/finally_t04.dart index 714470960f..b357d78118 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/finally_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/finally_t04.dart @@ -1,25 +1,25 @@ -// 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 "finally" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "finally" is used as a class member (field) name. -/// @author rodionov - - -class C { - int finally = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().finally is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "finally" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "finally" is used as a class member (field) name. +/// @author rodionov + + +class C { + int finally = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().finally is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/finally_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/finally_t07.dart index 12cc3e4a9c..973fda5ef0 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/finally_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/finally_t07.dart @@ -1,25 +1,25 @@ -// 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 "finally" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "finally" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void finally() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.finally(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "finally" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "finally" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void finally() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.finally(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/finally_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/finally_t08.dart index bd8e8bb34f..c453fbf9cd 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/finally_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/finally_t08.dart @@ -1,20 +1,20 @@ -// 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 "finally" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "finally" is used as a function parameter name. -/// @author rodionov - - -void f(var finally) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -} +// 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 "finally" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "finally" is used as a function parameter name. +/// @author rodionov + + +void f(var finally) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/finally_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/finally_t10.dart index ef7865ba57..83a766643f 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/finally_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/finally_t10.dart @@ -1,18 +1,18 @@ -// 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 "finally" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "finally" is used as a library name. -/// @author rodionov - -library finally; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "finally" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "finally" is used as a library name. +/// @author rodionov + +library finally; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/finally_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/finally_t11.dart index 0986963453..5cdf0aeaa9 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/finally_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/finally_t11.dart @@ -1,19 +1,19 @@ -// 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 "finally" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "finally" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as finally; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "finally" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "finally" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as finally; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/finally_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/finally_t12.dart index be46bc6f2e..77cfa4bce8 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/finally_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/finally_t12.dart @@ -1,19 +1,19 @@ -// 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 "finally" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "finally" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "finally_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "finally" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "finally" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "finally_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/for_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/for_t01.dart index ab914efce3..1623fb3090 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/for_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/for_t01.dart @@ -1,23 +1,23 @@ -// 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 "for" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "for" is used as a class name. -/// @author vasya - - -class for { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is for; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "for" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "for" is used as a class name. +/// @author vasya + + +class for { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is for; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/for_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/for_t03.dart index c5ddbf366c..4beda250d2 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/for_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/for_t03.dart @@ -1,23 +1,23 @@ -// 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 "for" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "for" is used as a function type alias name. -/// @author rodionov - - -typedef void for(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is for; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "for" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "for" is used as a function type alias name. +/// @author rodionov + + +typedef void for(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is for; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/for_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/for_t04.dart index 138233c2ad..8edd426d34 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/for_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/for_t04.dart @@ -1,25 +1,25 @@ -// 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 "for" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "for" is used as a class member (field) name. -/// @author rodionov - - -class C { - int for = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().for is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "for" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "for" is used as a class member (field) name. +/// @author rodionov + + +class C { + int for = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().for is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/for_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/for_t07.dart index 8bc107e2b4..e307a34bfd 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/for_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/for_t07.dart @@ -1,25 +1,25 @@ -// 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 "for" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "for" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void for() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.for(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "for" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "for" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void for() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.for(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/for_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/for_t08.dart index a00bc522b4..6c3de5d70c 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/for_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/for_t08.dart @@ -1,20 +1,20 @@ -// 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 "for" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "for" is used as a function parameter name. -/// @author rodionov - - -void f(var for) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(f); -} +// 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 "for" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "for" is used as a function parameter name. +/// @author rodionov + + +void f(var for) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(f); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/for_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/for_t10.dart index 9a536b5539..9aefe4157f 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/for_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/for_t10.dart @@ -1,18 +1,18 @@ -// 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 "for" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "for" is used as a library name. -/// @author rodionov - -library for; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "for" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "for" is used as a library name. +/// @author rodionov + +library for; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/for_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/for_t11.dart index 25a926b350..44933ddf3e 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/for_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/for_t11.dart @@ -1,19 +1,19 @@ -// 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 "for" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "for" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as for; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "for" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "for" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as for; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/for_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/for_t12.dart index cfb282906f..3197b6a4e9 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/for_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/for_t12.dart @@ -1,19 +1,19 @@ -// 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 "for" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "for" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "for_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "for" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "for" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "for_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/if_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/if_t01.dart index 25e6ccbd9b..5ccce4ae53 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/if_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/if_t01.dart @@ -1,23 +1,23 @@ -// 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 "if" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "if" -/// is used as a class name. -/// @author vasya - - -class if { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is if; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "if" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "if" +/// is used as a class name. +/// @author vasya + + +class if { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is if; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/if_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/if_t03.dart index 6f2741ccec..d725a483a7 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/if_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/if_t03.dart @@ -1,23 +1,23 @@ -// 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 "if" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "if" -/// is used as a function type alias name. -/// @author rodionov - - -typedef void if(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is if; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "if" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "if" +/// is used as a function type alias name. +/// @author rodionov + + +typedef void if(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is if; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/if_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/if_t04.dart index c05c72815f..6c23d9ffba 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/if_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/if_t04.dart @@ -1,24 +1,24 @@ -// 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 "if" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "if" -/// is used as a class member (field) name. -/// @author rodionov - -class C { - int if = 42; -// ^^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().if is int; -// ^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "if" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "if" +/// is used as a class member (field) name. +/// @author rodionov + +class C { + int if = 42; +// ^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().if is int; +// ^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/if_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/if_t07.dart index b8bcc34ea3..b6a09aa62c 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/if_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/if_t07.dart @@ -1,25 +1,25 @@ -// 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 "if" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "if" -/// is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void if() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.if(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "if" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "if" +/// is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void if() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.if(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/if_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/if_t08.dart index 1d9ed50519..cf2b07a9c1 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/if_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/if_t08.dart @@ -1,20 +1,20 @@ -// 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 "if" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "if" -/// is used as a function parameter name. -/// @author rodionov - - -void f(var if) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(f); -} +// 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 "if" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "if" +/// is used as a function parameter name. +/// @author rodionov + + +void f(var if) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(f); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/if_t09.dart b/Language/Reference/Lexical_Rules/Reserved_Words/if_t09.dart index 280cc57ffc..c67db87a7c 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/if_t09.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/if_t09.dart @@ -1,20 +1,20 @@ -// 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 "if" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "if" -/// is used as an identifier in a catch clause. -/// @author rodionov - - -main() { - try { - int x = 0; - } catch (if) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "if" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "if" +/// is used as an identifier in a catch clause. +/// @author rodionov + + +main() { + try { + int x = 0; + } catch (if) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/if_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/if_t10.dart index 46bb37c078..a8f2cbe7da 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/if_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/if_t10.dart @@ -1,18 +1,18 @@ -// 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 "if" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "if" -/// is used as a library name. -/// @author rodionov - -library if; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "if" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "if" +/// is used as a library name. +/// @author rodionov + +library if; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/if_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/if_t11.dart index 92d8f330f2..dd2baef0c3 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/if_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/if_t11.dart @@ -1,18 +1,18 @@ -// 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 "if" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "if" -/// is used as an identifier following a 'show' combinator in an import directive. -/// @author rodionov - -import "lib.dart" as if; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "if" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "if" +/// is used as an identifier following a 'show' combinator in an import directive. +/// @author rodionov + +import "lib.dart" as if; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/if_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/if_t12.dart index c0e6f46d71..25733b3559 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/if_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/if_t12.dart @@ -1,19 +1,19 @@ -// 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 "if" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "if" -/// is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "if_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "if" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "if" +/// is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "if_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/in_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/in_t01.dart index ce42e8b488..180153fb04 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/in_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/in_t01.dart @@ -1,23 +1,23 @@ -// 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 "in" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "in" -/// is used as a class name. -/// @author vasya - - -class in { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is in; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "in" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "in" +/// is used as a class name. +/// @author vasya + + +class in { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is in; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/in_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/in_t03.dart index d288e57206..b87ce0be8c 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/in_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/in_t03.dart @@ -1,23 +1,23 @@ -// 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 "in" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "in" -/// is used as a function type alias name. -/// @author rodionov - - -typedef void in(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is in; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "in" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "in" +/// is used as a function type alias name. +/// @author rodionov + + +typedef void in(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is in; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/in_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/in_t04.dart index 27e13a7d5a..9384d531c8 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/in_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/in_t04.dart @@ -1,25 +1,25 @@ -// 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 "in" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "in" -/// is used as a class member (field) name. -/// @author rodionov - - -class C { - int in = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().in is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "in" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "in" +/// is used as a class member (field) name. +/// @author rodionov + + +class C { + int in = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().in is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/in_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/in_t07.dart index c9ee8b4422..468d9fc3e4 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/in_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/in_t07.dart @@ -1,25 +1,25 @@ -// 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 "in" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "in" -/// is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void in() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.in(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "in" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "in" +/// is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void in() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.in(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/in_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/in_t08.dart index 375976659a..56c4b72f65 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/in_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/in_t08.dart @@ -1,20 +1,20 @@ -// 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 "in" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "in" -/// is used as a function parameter name. -/// @author rodionov - - -void f(var in) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -} +// 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 "in" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "in" +/// is used as a function parameter name. +/// @author rodionov + + +void f(var in) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/in_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/in_t10.dart index 73cca284cf..c7c882e184 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/in_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/in_t10.dart @@ -1,18 +1,18 @@ -// 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 "in" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "in" -/// is used as a library name. -/// @author rodionov - -library in; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "in" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "in" +/// is used as a library name. +/// @author rodionov + +library in; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/in_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/in_t11.dart index 7b58e51843..9cb1e41455 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/in_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/in_t11.dart @@ -1,18 +1,18 @@ -// 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 "in" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "in" -/// is used as an identifier following a 'show' combinator in an import directive. -/// @author rodionov - -import "lib.dart" as in; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "in" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "in" +/// is used as an identifier following a 'show' combinator in an import directive. +/// @author rodionov + +import "lib.dart" as in; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/in_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/in_t12.dart index cf1205b543..d3b5a9c72d 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/in_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/in_t12.dart @@ -1,19 +1,19 @@ -// 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 "in" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "in" -/// is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "in_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "in" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "in" +/// is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "in_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/is_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/is_t01.dart index baa59f8d4f..6747826c3f 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/is_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/is_t01.dart @@ -1,23 +1,23 @@ -// 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 "is" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "is" -/// is used as a class name. -/// @author vasya - - -class is { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is is; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "is" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "is" +/// is used as a class name. +/// @author vasya + + +class is { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is is; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/is_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/is_t03.dart index 654b93f436..a159fe2bcb 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/is_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/is_t03.dart @@ -1,23 +1,23 @@ -// 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 "is" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "is" -/// is used as a function type alias name. -/// @author rodionov - - -typedef void is(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is is; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "is" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "is" +/// is used as a function type alias name. +/// @author rodionov + + +typedef void is(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is is; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/is_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/is_t04.dart index 20b65952b5..85e192d727 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/is_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/is_t04.dart @@ -1,25 +1,25 @@ -// 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 "is" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "is" -/// is used as a class member (field) name. -/// @author rodionov - - -class C { - int is = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().is is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "is" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "is" +/// is used as a class member (field) name. +/// @author rodionov + + +class C { + int is = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().is is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/is_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/is_t07.dart index 9f13d0e292..eea996c1ea 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/is_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/is_t07.dart @@ -1,25 +1,25 @@ -// 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 "is" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "is" -/// is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void is() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.is(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "is" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "is" +/// is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void is() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.is(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/is_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/is_t08.dart index 90b99b8509..fb389ffe73 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/is_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/is_t08.dart @@ -1,20 +1,20 @@ -// 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 "is" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "is" -/// is used as a function parameter name. -/// @author rodionov - - -void f(var is) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -} +// 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 "is" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "is" +/// is used as a function parameter name. +/// @author rodionov + + +void f(var is) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/is_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/is_t10.dart index eb590d25e1..24b790edaa 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/is_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/is_t10.dart @@ -1,18 +1,18 @@ -// 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 "is" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "is" -/// is used as a library name. -/// @author rodionov - -library is; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "is" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "is" +/// is used as a library name. +/// @author rodionov + +library is; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/is_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/is_t11.dart index 560ebbb548..001856b77c 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/is_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/is_t11.dart @@ -1,18 +1,18 @@ -// 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 "is" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "is" -/// is used as an identifier following a 'show' combinator in an import directive. -/// @author rodionov - -import "lib.dart" as is; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "is" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "is" +/// is used as an identifier following a 'show' combinator in an import directive. +/// @author rodionov + +import "lib.dart" as is; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/is_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/is_t12.dart index 83240821d3..bb3330daa0 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/is_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/is_t12.dart @@ -1,19 +1,19 @@ -// 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 "is" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word "is" -/// is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "is_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "is" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word "is" +/// is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "is_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/lib.dart b/Language/Reference/Lexical_Rules/Reserved_Words/lib.dart index 98ece1e0db..5e37b110e2 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/lib.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/lib.dart @@ -1,5 +1,5 @@ -// 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. - -library Reserved_words; +// 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. + +library Reserved_words; diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/new_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/new_t01.dart index 373f90698c..9321fc97f9 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/new_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/new_t01.dart @@ -1,23 +1,23 @@ -// 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 "new" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "new" is used as a class name. -/// @author vasya - - -class new { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is new; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "new" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "new" is used as a class name. +/// @author vasya + + +class new { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is new; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/new_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/new_t03.dart index a402c7e37a..8312761553 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/new_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/new_t03.dart @@ -1,23 +1,23 @@ -// 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 "new" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "new" is used as a function type alias name. -/// @author rodionov - - -typedef void new(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is new; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "new" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "new" is used as a function type alias name. +/// @author rodionov + + +typedef void new(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is new; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/new_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/new_t04.dart index e4b68a2937..e210acdcc9 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/new_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/new_t04.dart @@ -1,25 +1,25 @@ -// 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 "new" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "new" is used as a class member (field) name. -/// @author rodionov - - -class C { - int new = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().new is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "new" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "new" is used as a class member (field) name. +/// @author rodionov + + +class C { + int new = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().new is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/new_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/new_t07.dart index 69f0510499..51e4e24e1c 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/new_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/new_t07.dart @@ -1,26 +1,26 @@ -// 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 "new" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "new" is used as a static class member (function) name. -/// @author rodionov - -// @dart=2.14 - -class C { - static void new() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.new(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "new" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "new" is used as a static class member (function) name. +/// @author rodionov + +// @dart=2.14 + +class C { + static void new() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.new(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/new_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/new_t08.dart index ced9432cc7..3995425758 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/new_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/new_t08.dart @@ -1,20 +1,20 @@ -// 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 "new" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "new" is used as a function parameter name. -/// @author rodionov - - -void f(var new) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -} +// 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 "new" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "new" is used as a function parameter name. +/// @author rodionov + + +void f(var new) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/new_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/new_t10.dart index 99a34102d3..1d28de6244 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/new_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/new_t10.dart @@ -1,18 +1,18 @@ -// 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 "new" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "new" is used as a library name. -/// @author rodionov - -library new; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "new" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "new" is used as a library name. +/// @author rodionov + +library new; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/new_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/new_t11.dart index 4af2149346..0bc27d7d40 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/new_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/new_t11.dart @@ -1,19 +1,19 @@ -// 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 "new" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "new" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as new; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "new" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "new" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as new; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/new_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/new_t12.dart index 04bbbb2eef..e25ce90285 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/new_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/new_t12.dart @@ -1,19 +1,19 @@ -// 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 "new" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "new" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "new_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "new" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "new" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "new_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/null_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/null_t01.dart index 9d8dbbef7a..944507c26d 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/null_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/null_t01.dart @@ -1,23 +1,23 @@ -// 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 "null" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "null" is used as a class name. -/// @author vasya - - -class null { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is null; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "null" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "null" is used as a class name. +/// @author vasya + + +class null { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is null; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/null_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/null_t03.dart index adc309af0e..b4938da1d6 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/null_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/null_t03.dart @@ -1,23 +1,23 @@ -// 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 "null" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "null" is used as a function type alias name. -/// @author rodionov - - -typedef void null(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is null; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "null" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "null" is used as a function type alias name. +/// @author rodionov + + +typedef void null(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is null; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/null_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/null_t04.dart index 7214c92fb1..36d2fb886d 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/null_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/null_t04.dart @@ -1,24 +1,24 @@ -// 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 "null" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "null" is used as a function type alias name. -/// @author rodionov - -class C { - int null = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().null is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "null" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "null" is used as a function type alias name. +/// @author rodionov + +class C { + int null = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().null is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/null_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/null_t07.dart index c616c278a9..4a95bfedc9 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/null_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/null_t07.dart @@ -1,25 +1,25 @@ -// 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 "null" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "null" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void null() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.null(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "null" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "null" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void null() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.null(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/null_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/null_t08.dart index cf3e7e677a..38aee1bb53 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/null_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/null_t08.dart @@ -1,20 +1,20 @@ -// 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 "null" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "null" is used as a function parameter name. -/// @author rodionov - - -void f(var null) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -} +// 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 "null" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "null" is used as a function parameter name. +/// @author rodionov + + +void f(var null) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/null_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/null_t10.dart index eeebfd8d7d..1ca7e534d6 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/null_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/null_t10.dart @@ -1,18 +1,18 @@ -// 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 "null" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "null" is used as a library name. -/// @author rodionov - -library null; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "null" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "null" is used as a library name. +/// @author rodionov + +library null; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/null_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/null_t11.dart index 2795f70dbc..d28601befb 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/null_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/null_t11.dart @@ -1,19 +1,19 @@ -// 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 "null" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "null" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as null; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "null" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "null" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as null; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/null_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/null_t12.dart index f6f14266ae..1671bc255a 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/null_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/null_t12.dart @@ -1,19 +1,19 @@ -// 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 "null" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "null" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "null_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "null" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "null" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "null_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t01.dart index ddebbe23bd..00626c1327 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t01.dart @@ -1,23 +1,23 @@ -// 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 "rethrow" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "rethrow" is used as a class name. -/// @author rodionov - - -class rethrow { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is rethrow; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "rethrow" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "rethrow" is used as a class name. +/// @author rodionov + + +class rethrow { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is rethrow; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t03.dart index 8bf501d370..aacf677e0c 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t03.dart @@ -1,23 +1,23 @@ -// 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 "rethrow" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "rethrow" is used as a function type alias name. -/// @author rodionov - - -typedef void rethrow(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is rethrow; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "rethrow" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "rethrow" is used as a function type alias name. +/// @author rodionov + + +typedef void rethrow(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is rethrow; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t04.dart index 6e8085def5..198908c532 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t04.dart @@ -1,25 +1,25 @@ -// 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 "rethrow" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "rethrow" is used as a class member (field) name. -/// @author rodionov - - -class C { - int rethrow = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().rethrow is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "rethrow" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "rethrow" is used as a class member (field) name. +/// @author rodionov + + +class C { + int rethrow = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().rethrow is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t07.dart index 0f7b3c390e..cb57d02055 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t07.dart @@ -1,25 +1,25 @@ -// 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 "rethrow" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "rethrow" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void rethrow() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.rethrow(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "rethrow" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "rethrow" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void rethrow() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.rethrow(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t08.dart index ce16d8da12..7bf0eb38ca 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t08.dart @@ -1,20 +1,20 @@ -// 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 "rethrow" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "rethrow" is used as a function parameter name. -/// @author rodionov - - -void f(var rethrow) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -} +// 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 "rethrow" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "rethrow" is used as a function parameter name. +/// @author rodionov + + +void f(var rethrow) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t10.dart index 827d73eabe..8f60515c1d 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t10.dart @@ -1,18 +1,18 @@ -// 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 "rethrow" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "rethrow" is used as a library name. -/// @author rodionov - -library rethrow; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "rethrow" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "rethrow" is used as a library name. +/// @author rodionov + +library rethrow; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t11.dart index db3249e0e1..84f23e8ba2 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t11.dart @@ -1,19 +1,19 @@ -// 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 "rethrow" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "rethrow" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as rethrow; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "rethrow" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "rethrow" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as rethrow; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t12.dart index f3412a537b..6ff55544a8 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/rethrow_t12.dart @@ -1,19 +1,19 @@ -// 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 "rethrow" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "rethrow" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "rethrow_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "rethrow" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "rethrow" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "rethrow_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/return_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/return_t01.dart index 5c9e4383fb..7d95a602eb 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/return_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/return_t01.dart @@ -1,23 +1,23 @@ -// 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 "return" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "return" is used as a class name. -/// @author vasya - - -class return { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is return; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "return" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "return" is used as a class name. +/// @author vasya + + +class return { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is return; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/return_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/return_t03.dart index 3d63e67485..be314168a3 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/return_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/return_t03.dart @@ -1,26 +1,26 @@ -// 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 "return" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "return" is used as a function type alias name. -/// @author rodionov - - -typedef void return(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is return;} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} -//^ -// [analyzer] unspecified -// [cfe] unspecified +// 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 "return" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "return" is used as a function type alias name. +/// @author rodionov + + +typedef void return(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is return;} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} +//^ +// [analyzer] unspecified +// [cfe] unspecified diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/return_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/return_t04.dart index c799b89281..354d4205df 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/return_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/return_t04.dart @@ -1,25 +1,25 @@ -// 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 "return" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "return" is used as a class member (field) name. -/// @author rodionov - - -class C { - int return = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().return is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "return" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "return" is used as a class member (field) name. +/// @author rodionov + + +class C { + int return = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().return is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/return_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/return_t07.dart index 097526e804..489761e61e 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/return_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/return_t07.dart @@ -1,25 +1,25 @@ -// 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 "return" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "return" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void return() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.return(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "return" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "return" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void return() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.return(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/return_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/return_t08.dart index 7386c8b3dd..1e9a7863c8 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/return_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/return_t08.dart @@ -1,20 +1,20 @@ -// 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 "return" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "return" is used as a function parameter name. -/// @author rodionov - - -void f(var return) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(f); -} +// 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 "return" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "return" is used as a function parameter name. +/// @author rodionov + + +void f(var return) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(f); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/return_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/return_t10.dart index 0f2dcde459..731ec759c3 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/return_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/return_t10.dart @@ -1,18 +1,18 @@ -// 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 "return" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "return" is used as a library name. -/// @author rodionov - -library return; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "return" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "return" is used as a library name. +/// @author rodionov + +library return; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/return_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/return_t11.dart index 8b06bf0744..2070cefe2c 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/return_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/return_t11.dart @@ -1,19 +1,19 @@ -// 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 "return" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "return" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as return; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "return" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "return" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as return; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/return_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/return_t12.dart index 3b3512ab61..9e1314b874 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/return_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/return_t12.dart @@ -1,19 +1,19 @@ -// 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 "return" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "return" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "return_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "return" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "return" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "return_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/super_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/super_t01.dart index f9a24e71a5..26315136ea 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/super_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/super_t01.dart @@ -1,23 +1,23 @@ -// 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 "super" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "super" is used as a class name. -/// @author vasya - - -class super { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is super; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "super" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "super" is used as a class name. +/// @author vasya + + +class super { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is super; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/super_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/super_t03.dart index 30c3aec407..c98d684bc9 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/super_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/super_t03.dart @@ -1,23 +1,23 @@ -// 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 "super" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "super is used as a function type alias name. -/// @author rodionov - - -typedef void super(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is super; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "super" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "super is used as a function type alias name. +/// @author rodionov + + +typedef void super(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is super; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/super_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/super_t04.dart index 350bf2a27c..52d48c8530 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/super_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/super_t04.dart @@ -1,25 +1,25 @@ -// 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 "super" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "super" is used as a class member (field) name. -/// @author rodionov - - -class C { - int super = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().super is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "super" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "super" is used as a class member (field) name. +/// @author rodionov + + +class C { + int super = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().super is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/super_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/super_t07.dart index f10352a62e..1cb12fd94f 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/super_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/super_t07.dart @@ -1,25 +1,25 @@ -// 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 "super" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "super" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void super() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.super(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "super" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "super" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void super() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.super(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/super_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/super_t08.dart index ac0f57dc5c..59c22a91ab 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/super_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/super_t08.dart @@ -1,20 +1,20 @@ -// 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 "super" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "super" is used as a function parameter name. -/// @author rodionov - - -void f(var super) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -} +// 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 "super" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "super" is used as a function parameter name. +/// @author rodionov + + +void f(var super) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/super_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/super_t10.dart index 60a8f32cad..13089244ac 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/super_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/super_t10.dart @@ -1,18 +1,18 @@ -// 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 "super" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "super" is used as a library name. -/// @author rodionov - -library super; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "super" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "super" is used as a library name. +/// @author rodionov + +library super; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/super_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/super_t11.dart index e948a2f06f..373410d498 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/super_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/super_t11.dart @@ -1,19 +1,19 @@ -// 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 "super" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "super" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as super; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "super" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "super" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as super; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/super_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/super_t12.dart index 8cbae64645..9c195d583f 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/super_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/super_t12.dart @@ -1,19 +1,19 @@ -// 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 "super" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "super" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "super_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "super" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "super" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "super_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/switch_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/switch_t01.dart index ef83daf77a..83b25423d9 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/switch_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/switch_t01.dart @@ -1,23 +1,23 @@ -// 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 "switch" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "switch" is used as a class name. -/// @author vasya - - -class switch { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is switch; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "switch" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "switch" is used as a class name. +/// @author vasya + + +class switch { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is switch; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/switch_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/switch_t03.dart index 17dc9bb110..04687ffb4e 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/switch_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/switch_t03.dart @@ -1,23 +1,23 @@ -// 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 "switch" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "switch" is used as a function type alias name. -/// @author rodionov - - -typedef void switch(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is switch; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "switch" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "switch" is used as a function type alias name. +/// @author rodionov + + +typedef void switch(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is switch; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/switch_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/switch_t04.dart index 4a1ef24417..aa492740d1 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/switch_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/switch_t04.dart @@ -1,25 +1,25 @@ -// 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 "switch" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "switch" is used as a class member (field) name. -/// @author rodionov - - -class C { - int switch = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().switch is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "switch" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "switch" is used as a class member (field) name. +/// @author rodionov + + +class C { + int switch = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().switch is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/switch_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/switch_t07.dart index d130c528d7..96a7d5cddf 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/switch_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/switch_t07.dart @@ -1,25 +1,25 @@ -// 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 "switch" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "switch" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void switch() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.switch(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "switch" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "switch" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void switch() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.switch(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/switch_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/switch_t08.dart index ae125cbd70..ad147fc952 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/switch_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/switch_t08.dart @@ -1,20 +1,20 @@ -// 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 "switch" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "switch" is used as a function parameter name. -/// @author rodionov - - -void f(var switch) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(f); -} +// 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 "switch" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "switch" is used as a function parameter name. +/// @author rodionov + + +void f(var switch) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(f); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/switch_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/switch_t10.dart index a53fef97e4..2e519ed6e1 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/switch_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/switch_t10.dart @@ -1,18 +1,18 @@ -// 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 "switch" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "switch" is used as a library name. -/// @author rodionov - -library switch; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "switch" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "switch" is used as a library name. +/// @author rodionov + +library switch; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/switch_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/switch_t11.dart index 63549bb89d..947494e9ee 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/switch_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/switch_t11.dart @@ -1,19 +1,19 @@ -// 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 "switch" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "switch" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as switch; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "switch" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "switch" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as switch; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/switch_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/switch_t12.dart index 22129ca634..e090cb73bc 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/switch_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/switch_t12.dart @@ -1,19 +1,19 @@ -// 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 "switch" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "switch" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "switch_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "switch" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "switch" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "switch_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/this_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/this_t01.dart index e64473f21d..1e9a6f579a 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/this_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/this_t01.dart @@ -1,23 +1,23 @@ -// 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 "this" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "this" is used as a class name. -/// @author vasya - - -class this { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is this; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "this" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "this" is used as a class name. +/// @author vasya + + +class this { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is this; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/this_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/this_t03.dart index 69a55815d9..eea153716c 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/this_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/this_t03.dart @@ -1,23 +1,23 @@ -// 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 "this" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "this" is used as a function type alias name. -/// @author rodionov - - -typedef void this(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is this; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "this" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "this" is used as a function type alias name. +/// @author rodionov + + +typedef void this(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is this; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/this_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/this_t04.dart index e4be3cb548..1c18861ba8 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/this_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/this_t04.dart @@ -1,25 +1,25 @@ -// 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 "this" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "this" is used as a class member (field) name. -/// @author rodionov - - -class C { - int this = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().this is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "this" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "this" is used as a class member (field) name. +/// @author rodionov + + +class C { + int this = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().this is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/this_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/this_t07.dart index 112c66fac0..fcd20b630d 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/this_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/this_t07.dart @@ -1,25 +1,25 @@ -// 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 "this" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "this" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void this() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.this(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "this" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "this" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void this() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.this(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/this_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/this_t08.dart index 7f4cc36c98..17a213dc00 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/this_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/this_t08.dart @@ -1,20 +1,20 @@ -// 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 "this" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "this" is used as a function parameter name. -/// @author rodionov - - -void f(var this) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(f); -} +// 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 "this" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "this" is used as a function parameter name. +/// @author rodionov + + +void f(var this) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(f); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/this_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/this_t10.dart index 7f1020ddd2..053f05c649 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/this_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/this_t10.dart @@ -1,18 +1,18 @@ -// 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 "this" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "this" is used as a library name. -/// @author rodionov - -library this; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "this" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "this" is used as a library name. +/// @author rodionov + +library this; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/this_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/this_t11.dart index e0f22676e9..4cc99943ac 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/this_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/this_t11.dart @@ -1,19 +1,19 @@ -// 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 "this" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "this" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as this; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "this" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "this" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as this; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/this_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/this_t12.dart index b6371143aa..3ca11e7dcc 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/this_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/this_t12.dart @@ -1,19 +1,19 @@ -// 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 "this" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "this" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "this_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "this" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "this" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "this_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/throw_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/throw_t01.dart index b1ce9134e0..3647119e70 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/throw_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/throw_t01.dart @@ -1,23 +1,23 @@ -// 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 "throw" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "throw" is used as a class name. -/// @author vasya - - -class throw { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is throw; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "throw" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "throw" is used as a class name. +/// @author vasya + + +class throw { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is throw; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/throw_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/throw_t03.dart index 8c90414d54..27e0fcbf77 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/throw_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/throw_t03.dart @@ -1,23 +1,23 @@ -// 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 "throw" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "throw" is used as a function type alias name. -/// @author rodionov - - -typedef void throw(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is throw; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "throw" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "throw" is used as a function type alias name. +/// @author rodionov + + +typedef void throw(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is throw; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/throw_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/throw_t04.dart index 8e6b6829fd..9e61692f73 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/throw_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/throw_t04.dart @@ -1,25 +1,25 @@ -// 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 "throw" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "throw" is used as a class member (field) name. -/// @author rodionov - - -class C { - int throw = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().throw is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "throw" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "throw" is used as a class member (field) name. +/// @author rodionov + + +class C { + int throw = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().throw is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/throw_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/throw_t07.dart index 205aa3dd1d..441769dcfc 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/throw_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/throw_t07.dart @@ -1,25 +1,25 @@ -// 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 "throw" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "throw" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void throw() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.throw(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "throw" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "throw" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void throw() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.throw(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/throw_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/throw_t08.dart index b98905eeda..ec5d1e2eb0 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/throw_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/throw_t08.dart @@ -1,20 +1,20 @@ -// 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 "throw" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "throw" is used as a function parameter name. -/// @author rodionov - - -void f(var throw) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -} +// 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 "throw" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "throw" is used as a function parameter name. +/// @author rodionov + + +void f(var throw) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/throw_t09.dart b/Language/Reference/Lexical_Rules/Reserved_Words/throw_t09.dart index 546fb29fce..3462835b70 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/throw_t09.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/throw_t09.dart @@ -1,20 +1,20 @@ -// 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 "throw" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "throw" is used as an identifier in a catch clause. -/// @author rodionov - - -main() { - try { - int x = 0; - } catch (throw) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "throw" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "throw" is used as an identifier in a catch clause. +/// @author rodionov + + +main() { + try { + int x = 0; + } catch (throw) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/throw_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/throw_t10.dart index b96d164807..bff9471285 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/throw_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/throw_t10.dart @@ -1,18 +1,18 @@ -// 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 "throw" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "throw" is used as a library name. -/// @author rodionov - -library throw; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "throw" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "throw" is used as a library name. +/// @author rodionov + +library throw; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/throw_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/throw_t11.dart index c3da0df330..a8cc31434b 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/throw_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/throw_t11.dart @@ -1,19 +1,19 @@ -// 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 "throw" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "throw" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as throw; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "throw" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "throw" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as throw; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/throw_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/throw_t12.dart index af29414e92..1ce3fba6cb 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/throw_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/throw_t12.dart @@ -1,19 +1,19 @@ -// 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 "throw" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "throw" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "throw_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "throw" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "throw" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "throw_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/true_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/true_t01.dart index 5ffc7945b9..a3278d5182 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/true_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/true_t01.dart @@ -1,23 +1,23 @@ -// 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 "true" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "true" is used as a class name. -/// @author vasya - - -class true { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is true; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "true" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "true" is used as a class name. +/// @author vasya + + +class true { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is true; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/true_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/true_t03.dart index efea492344..b0f741833d 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/true_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/true_t03.dart @@ -1,23 +1,23 @@ -// 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 "true" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "true" is used as a function type alias name. -/// @author rodionov - - -typedef void true(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is true; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "true" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "true" is used as a function type alias name. +/// @author rodionov + + +typedef void true(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is true; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/true_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/true_t04.dart index a6034fc90f..4c05c341fa 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/true_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/true_t04.dart @@ -1,25 +1,25 @@ -// 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 "true" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "true" is used as a class member (field) name. -/// @author rodionov - - -class C { - int true = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().true is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "true" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "true" is used as a class member (field) name. +/// @author rodionov + + +class C { + int true = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().true is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/true_t05.dart b/Language/Reference/Lexical_Rules/Reserved_Words/true_t05.dart index 4d2858b82c..a92fdd03e4 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/true_t05.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/true_t05.dart @@ -1,22 +1,22 @@ -// 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 "true" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "true" is used as a local function name. -/// @author rodionov - - -main() { - void true() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - true(); -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "true" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "true" is used as a local function name. +/// @author rodionov + + +main() { + void true() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + true(); +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/true_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/true_t07.dart index b60425bf40..dff6369f3a 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/true_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/true_t07.dart @@ -1,25 +1,25 @@ -// 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 "true" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "true" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void true() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.true(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "true" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "true" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void true() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.true(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/true_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/true_t08.dart index d04bb884a2..31469d9f87 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/true_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/true_t08.dart @@ -1,20 +1,20 @@ -// 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 "true" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "true" is used as a function parameter name. -/// @author rodionov - - -void f(var true) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -} +// 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 "true" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "true" is used as a function parameter name. +/// @author rodionov + + +void f(var true) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/true_t09.dart b/Language/Reference/Lexical_Rules/Reserved_Words/true_t09.dart index 40e9260dcf..731ca9a7da 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/true_t09.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/true_t09.dart @@ -1,20 +1,20 @@ -// 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 "true" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "true" is used as an identifier in a catch clause. -/// @author rodionov - - -main() { - try { - int x = 0; - } catch (true) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "true" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "true" is used as an identifier in a catch clause. +/// @author rodionov + + +main() { + try { + int x = 0; + } catch (true) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/true_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/true_t10.dart index 60de2d674c..ce5843ac60 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/true_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/true_t10.dart @@ -1,18 +1,18 @@ -// 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 "true" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "true" is used as a library name. -/// @author rodionov - -library true; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "true" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "true" is used as a library name. +/// @author rodionov + +library true; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/true_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/true_t11.dart index 420ed325a0..218fd81542 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/true_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/true_t11.dart @@ -1,19 +1,19 @@ -// 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 "true" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "true" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as true; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "true" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "true" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as true; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/true_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/true_t12.dart index 983c0a28e3..84b56c9e62 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/true_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/true_t12.dart @@ -1,19 +1,19 @@ -// 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 "true" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "true" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "true_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "true" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "true" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "true_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/try_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/try_t01.dart index 2e97fcc42e..cecde0d5de 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/try_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/try_t01.dart @@ -1,23 +1,23 @@ -// 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 "try" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "try" is used as a class name. -/// @author vasya - - -class try { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is try; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "try" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "try" is used as a class name. +/// @author vasya + + +class try { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is try; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/try_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/try_t03.dart index 860ce6fd8d..b400b50a3c 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/try_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/try_t03.dart @@ -1,23 +1,23 @@ -// 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 "try" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "try" is used as a function type alias name. -/// @author rodionov - - -typedef void try(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is try; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "try" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "try" is used as a function type alias name. +/// @author rodionov + + +typedef void try(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is try; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/try_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/try_t04.dart index 34df396d25..8ce3eda752 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/try_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/try_t04.dart @@ -1,25 +1,25 @@ -// 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 "try" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "try" is used as a class member (field) name. -/// @author rodionov - - -class C { - int try = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().try is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "try" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "try" is used as a class member (field) name. +/// @author rodionov + + +class C { + int try = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().try is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/try_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/try_t07.dart index 92e3956f67..232cf540c4 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/try_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/try_t07.dart @@ -1,25 +1,25 @@ -// 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 "try" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "try" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void try() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.try(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "try" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "try" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void try() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.try(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/try_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/try_t08.dart index c0ef8bfdc8..0067e33519 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/try_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/try_t08.dart @@ -1,20 +1,20 @@ -// 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 "try" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "try" is used as a function parameter name. -/// @author rodionov - - -void f(var try) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(f); -} +// 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 "try" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "try" is used as a function parameter name. +/// @author rodionov + + +void f(var try) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(f); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/try_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/try_t10.dart index 030ea4b2e9..14cf3332cd 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/try_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/try_t10.dart @@ -1,18 +1,18 @@ -// 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 "try" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "try" is used as a library name. -/// @author rodionov - -library try; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "try" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "try" is used as a library name. +/// @author rodionov + +library try; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/try_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/try_t11.dart index fa0004f81b..7f86637a04 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/try_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/try_t11.dart @@ -1,19 +1,19 @@ -// 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 "try" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "try" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as try; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "try" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "try" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as try; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/try_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/try_t12.dart index 36c6d19e39..7b16a482a3 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/try_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/try_t12.dart @@ -1,19 +1,19 @@ -// 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 "try" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "try" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "try_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "try" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "try" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "try_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/var_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/var_t01.dart index 90e026ed39..e446c04548 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/var_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/var_t01.dart @@ -1,23 +1,23 @@ -// 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 "var" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "var" is used as a class name. -/// @author vasya - - -class var { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is var; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "var" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "var" is used as a class name. +/// @author vasya + + +class var { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is var; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/var_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/var_t03.dart index 1b6da7a3d7..69f96ec6a8 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/var_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/var_t03.dart @@ -1,23 +1,23 @@ -// 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 "var" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "var" is used as a function type alias name. -/// @author rodionov - - -typedef void var(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is var; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "var" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "var" is used as a function type alias name. +/// @author rodionov + + +typedef void var(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is var; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/var_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/var_t04.dart index e99f34d609..08de9e3573 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/var_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/var_t04.dart @@ -1,25 +1,25 @@ -// 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 "var" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "var" is used as a class member (field) name. -/// @author rodionov - - -class C { - int var = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().var is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "var" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "var" is used as a class member (field) name. +/// @author rodionov + + +class C { + int var = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().var is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/var_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/var_t07.dart index 7f12b887e6..41f00d51cd 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/var_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/var_t07.dart @@ -1,25 +1,25 @@ -// 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 "var" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "var" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void var() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.var(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "var" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "var" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void var() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.var(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/var_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/var_t08.dart index b78d298513..48dc8776be 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/var_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/var_t08.dart @@ -1,22 +1,22 @@ -// 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 "var" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "var" is used as a function parameter name. -/// @author rodionov - - -void f(var var) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -// ^ -// [cfe] unspecified -} +// 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 "var" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "var" is used as a function parameter name. +/// @author rodionov + + +void f(var var) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +// ^ +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/var_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/var_t10.dart index dd0a86b1fe..64fe503c41 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/var_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/var_t10.dart @@ -1,18 +1,18 @@ -// 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 "var" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "var" is used as a library name. -/// @author rodionov - -library var; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "var" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "var" is used as a library name. +/// @author rodionov + +library var; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/var_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/var_t11.dart index 80b22fd9ed..a17223ce10 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/var_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/var_t11.dart @@ -1,19 +1,19 @@ -// 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 "var" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "var" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as var; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "var" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "var" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as var; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/var_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/var_t12.dart index d4c176cddf..36691ced56 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/var_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/var_t12.dart @@ -1,19 +1,19 @@ -// 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 "var" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "var" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "var_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "var" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "var" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "var_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/void_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/void_t01.dart index 06e479c9a2..131a595209 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/void_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/void_t01.dart @@ -1,23 +1,23 @@ -// 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 "void" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "void" is used as a class name. -/// @author vasya - - -class void { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is void; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "void" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "void" is used as a class name. +/// @author vasya + + +class void { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is void; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/void_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/void_t03.dart index 6669486171..4278b17087 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/void_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/void_t03.dart @@ -1,23 +1,23 @@ -// 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 "void" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "void" is used as a function type alias name. -/// @author rodionov - - -typedef void void(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is void; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "void" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "void" is used as a function type alias name. +/// @author rodionov + + +typedef void void(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is void; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/void_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/void_t04.dart index 65456875fc..03ecedf437 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/void_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/void_t04.dart @@ -1,25 +1,25 @@ -// 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 "void" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "void" is used as a class member (field) name. -/// @author rodionov - - -class C { - int void = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().void is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "void" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "void" is used as a class member (field) name. +/// @author rodionov + + +class C { + int void = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().void is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/void_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/void_t07.dart index f25aaaff2b..7013b2a2f7 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/void_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/void_t07.dart @@ -1,25 +1,25 @@ -// 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 "void" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "void" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void void() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.void(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "void" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "void" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void void() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.void(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/void_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/void_t08.dart index af6724f8f3..2bcd2fc64d 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/void_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/void_t08.dart @@ -1,22 +1,22 @@ -// 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 "void" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "void" is used as a function parameter name. -/// @author rodionov - - -void f(var void) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -// ^ -// [cfe] unspecified -} +// 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 "void" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "void" is used as a function parameter name. +/// @author rodionov + + +void f(var void) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +// ^ +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/void_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/void_t10.dart index fb46f4beca..41a52d8841 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/void_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/void_t10.dart @@ -1,18 +1,18 @@ -// 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 "void" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "void" is used as a library name. -/// @author rodionov - -library void; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "void" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "void" is used as a library name. +/// @author rodionov + +library void; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/void_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/void_t11.dart index 05811ba9ac..910825c961 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/void_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/void_t11.dart @@ -1,19 +1,19 @@ -// 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 "void" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "void" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as void; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "void" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "void" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as void; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/void_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/void_t12.dart index f508bc1979..e41ee36b1d 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/void_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/void_t12.dart @@ -1,19 +1,19 @@ -// 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 "void" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "void" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "void_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "void" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "void" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "void_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/while_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/while_t01.dart index b3cca8131d..5c7c1e0775 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/while_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/while_t01.dart @@ -1,23 +1,23 @@ -// 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 "while" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "while" is used as a class name. -/// @author vasya - - -class while { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is while; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "while" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "while" is used as a class name. +/// @author vasya + + +class while { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is while; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/while_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/while_t03.dart index 5100fc1df5..fbaaf714cf 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/while_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/while_t03.dart @@ -1,23 +1,23 @@ -// 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 "while" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "while" is used as a function type alias name. -/// @author rodionov - - -typedef void while(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is while; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "while" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "while" is used as a function type alias name. +/// @author rodionov + + +typedef void while(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is while; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/while_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/while_t04.dart index 6f44532d79..cda4d7661d 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/while_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/while_t04.dart @@ -1,25 +1,25 @@ -// 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 "while" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "while" is used as a class member (field) name. -/// @author rodionov - - -class C { - int while = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().while is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "while" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "while" is used as a class member (field) name. +/// @author rodionov + + +class C { + int while = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().while is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/while_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/while_t07.dart index f64290cad0..bb6c0a2cee 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/while_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/while_t07.dart @@ -1,25 +1,25 @@ -// 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 "while" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "while" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void while() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.while(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "while" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "while" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void while() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.while(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/while_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/while_t08.dart index 0eaff2fd40..19f294d29d 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/while_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/while_t08.dart @@ -1,20 +1,20 @@ -// 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 "while" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "while" is used as a function parameter name. -/// @author rodionov - - -void f(var while) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(f); -} +// 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 "while" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "while" is used as a function parameter name. +/// @author rodionov + + +void f(var while) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(f); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/while_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/while_t10.dart index 485ef4a91a..34e3b67dfc 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/while_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/while_t10.dart @@ -1,18 +1,18 @@ -// 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 "while" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "while" is used as a library name. -/// @author rodionov - -library while; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "while" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "while" is used as a library name. +/// @author rodionov + +library while; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/while_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/while_t11.dart index 6156171635..1dda14c260 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/while_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/while_t11.dart @@ -1,19 +1,19 @@ -// 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 "while" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "while" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as while; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "while" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "while" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as while; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/while_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/while_t12.dart index 9932246268..528e70f7a6 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/while_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/while_t12.dart @@ -1,19 +1,19 @@ -// 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 "while" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "while" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "while_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "while" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "while" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "while_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/whitespace_t02.dart b/Language/Reference/Lexical_Rules/Reserved_Words/whitespace_t02.dart index 998e7249e6..db3a8deb06 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/whitespace_t02.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/whitespace_t02.dart @@ -1,18 +1,18 @@ -// 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 WHITESPACE: -/// ('\t' | ' ' | NEWLINE)+ -/// ;. -/// @description Checks that other Unicode whitespaces are not allowed: -/// check VERTICAL TAB (U+000B) -/// @author hlodvig - - -main() { - var x = 1 ; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 WHITESPACE: +/// ('\t' | ' ' | NEWLINE)+ +/// ;. +/// @description Checks that other Unicode whitespaces are not allowed: +/// check VERTICAL TAB (U+000B) +/// @author hlodvig + + +main() { + var x = 1 ; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/with_t01.dart b/Language/Reference/Lexical_Rules/Reserved_Words/with_t01.dart index b5a396bd01..2e3ddc9cec 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/with_t01.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/with_t01.dart @@ -1,23 +1,23 @@ -// 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 "with" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "with" is used as a class name. -/// @author rodionov - - -class with { } // error -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is with; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "with" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "with" is used as a class name. +/// @author rodionov + + +class with { } // error +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is with; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/with_t03.dart b/Language/Reference/Lexical_Rules/Reserved_Words/with_t03.dart index 94f1b8ae4d..4e0ea23707 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/with_t03.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/with_t03.dart @@ -1,23 +1,23 @@ -// 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 "with" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "with" is used as a function type alias name. -/// @author rodionov - - -typedef void with(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is with; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "with" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "with" is used as a function type alias name. +/// @author rodionov + + +typedef void with(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is with; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/with_t04.dart b/Language/Reference/Lexical_Rules/Reserved_Words/with_t04.dart index 3c67bbd5a4..05c2a03729 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/with_t04.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/with_t04.dart @@ -1,25 +1,25 @@ -// 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 "with" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "with" is used as a class member (field) name. -/// @author rodionov - - -class C { - int with = 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C().with is int; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "with" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "with" is used as a class member (field) name. +/// @author rodionov + + +class C { + int with = 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C().with is int; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/with_t07.dart b/Language/Reference/Lexical_Rules/Reserved_Words/with_t07.dart index d669e6698a..394eeb1749 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/with_t07.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/with_t07.dart @@ -1,25 +1,25 @@ -// 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 "with" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "with" is used as a static class member (function) name. -/// @author rodionov - - -class C { - static void with() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - C.with(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 "with" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "with" is used as a static class member (function) name. +/// @author rodionov + + +class C { + static void with() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + C.with(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/with_t08.dart b/Language/Reference/Lexical_Rules/Reserved_Words/with_t08.dart index 6f4dd51c6d..07f842ecf2 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/with_t08.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/with_t08.dart @@ -1,20 +1,20 @@ -// 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 "with" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "with" is used as a function parameter name. -/// @author rodionov - - -void f(var with) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - f(null); -} +// 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 "with" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "with" is used as a function parameter name. +/// @author rodionov + + +void f(var with) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + f(null); +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/with_t10.dart b/Language/Reference/Lexical_Rules/Reserved_Words/with_t10.dart index 1a3c611a83..db15e6e5a3 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/with_t10.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/with_t10.dart @@ -1,18 +1,18 @@ -// 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 "with" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "with" is used as a library name. -/// @author rodionov - -library with; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "with" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "with" is used as a library name. +/// @author rodionov + +library with; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/with_t11.dart b/Language/Reference/Lexical_Rules/Reserved_Words/with_t11.dart index ac763629ae..af6c12f503 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/with_t11.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/with_t11.dart @@ -1,19 +1,19 @@ -// 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 "with" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "with" is used as an identifier following a 'show' combinator in an import -/// directive. -/// @author rodionov - -import "lib.dart" as with; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 "with" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "with" is used as an identifier following a 'show' combinator in an import +/// directive. +/// @author rodionov + +import "lib.dart" as with; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Reference/Lexical_Rules/Reserved_Words/with_t12.dart b/Language/Reference/Lexical_Rules/Reserved_Words/with_t12.dart index c4085c2425..985484ddde 100644 --- a/Language/Reference/Lexical_Rules/Reserved_Words/with_t12.dart +++ b/Language/Reference/Lexical_Rules/Reserved_Words/with_t12.dart @@ -1,19 +1,19 @@ -// 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 "with" is a reserved word. -/// A reserved word may not be used as an identifier; it is a compile-time error -/// if a reserved word is used where an identifier is expected. -/// @description Checks that it is a compile-time error when a reserved word -/// "with" is used as an identifier in a part declaration. -/// @author rodionov -/// @issue 44990 - -part "with_lib.dart"; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -void main() { -} +// 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 "with" is a reserved word. +/// A reserved word may not be used as an identifier; it is a compile-time error +/// if a reserved word is used where an identifier is expected. +/// @description Checks that it is a compile-time error when a reserved word +/// "with" is used as an identifier in a part declaration. +/// @author rodionov +/// @issue 44990 + +part "with_lib.dart"; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +void main() { +} diff --git a/Language/Statements/Assert/syntax_t01.dart b/Language/Statements/Assert/syntax_t01.dart index 74b237384d..a6cbcdfd24 100644 --- a/Language/Statements/Assert/syntax_t01.dart +++ b/Language/Statements/Assert/syntax_t01.dart @@ -1,20 +1,20 @@ -// 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 An assert statement is used to disrupt normal execution if a -/// given boolean condition does not hold. -/// assertStatement: -/// assert '(' conditionalExpression ')' ';' -/// ; -/// @description Checks that it is a compile-time error when the assert statement -/// does not end with a semicolon. -/// @author vasya - - -main() { - assert (false) -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An assert statement is used to disrupt normal execution if a +/// given boolean condition does not hold. +/// assertStatement: +/// assert '(' conditionalExpression ')' ';' +/// ; +/// @description Checks that it is a compile-time error when the assert statement +/// does not end with a semicolon. +/// @author vasya + + +main() { + assert (false) +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/Assert/syntax_t02.dart b/Language/Statements/Assert/syntax_t02.dart index 143e085e29..8d18a5fda6 100644 --- a/Language/Statements/Assert/syntax_t02.dart +++ b/Language/Statements/Assert/syntax_t02.dart @@ -1,20 +1,20 @@ -// 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 An assert statement is used to disrupt normal execution if a -/// given boolean condition does not hold. -/// assertStatement: -/// assert '(' conditionalExpression ')' ';' -/// ; -/// @description Checks that it is a compile-time error when the parentheses -/// surrounding the assert expression are missing. -/// @author vasya - - -main() { - assert false ; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An assert statement is used to disrupt normal execution if a +/// given boolean condition does not hold. +/// assertStatement: +/// assert '(' conditionalExpression ')' ';' +/// ; +/// @description Checks that it is a compile-time error when the parentheses +/// surrounding the assert expression are missing. +/// @author vasya + + +main() { + assert false ; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/Assert/syntax_t03.dart b/Language/Statements/Assert/syntax_t03.dart index 8ae47e892c..7dd52753da 100644 --- a/Language/Statements/Assert/syntax_t03.dart +++ b/Language/Statements/Assert/syntax_t03.dart @@ -1,20 +1,20 @@ -// 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 An assert statement is used to disrupt normal execution if a -/// given boolean condition does not hold. -/// assertStatement: -/// assert '(' conditionalExpression ')' ';' -/// ; -/// @description Checks that it is a compile-time error when the assert -/// expression is empty. -/// @author vasya - - -main() { - assert (); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An assert statement is used to disrupt normal execution if a +/// given boolean condition does not hold. +/// assertStatement: +/// assert '(' conditionalExpression ')' ';' +/// ; +/// @description Checks that it is a compile-time error when the assert +/// expression is empty. +/// @author vasya + + +main() { + assert (); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/Assert/syntax_t04.dart b/Language/Statements/Assert/syntax_t04.dart index cbc3d3e2ed..32fb371b83 100644 --- a/Language/Statements/Assert/syntax_t04.dart +++ b/Language/Statements/Assert/syntax_t04.dart @@ -1,20 +1,20 @@ -// 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 An assert statement is used to disrupt normal execution if a -/// given boolean condition does not hold. -/// assertStatement: -/// assert '(' conditionalExpression ')' ';' -/// ; -/// @description Checks that it is a compile-time error when there are more than -/// two arguments in the assert statement -/// @author vasya - - -main() { - assert(true, "", ""); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An assert statement is used to disrupt normal execution if a +/// given boolean condition does not hold. +/// assertStatement: +/// assert '(' conditionalExpression ')' ';' +/// ; +/// @description Checks that it is a compile-time error when there are more than +/// two arguments in the assert statement +/// @author vasya + + +main() { + assert(true, "", ""); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/Assert/syntax_t05.dart b/Language/Statements/Assert/syntax_t05.dart index f2f954bf19..bd7da464dd 100644 --- a/Language/Statements/Assert/syntax_t05.dart +++ b/Language/Statements/Assert/syntax_t05.dart @@ -1,20 +1,20 @@ -// 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 An assert statement is used to disrupt normal execution if a -/// given boolean condition does not hold. -/// assertStatement: -/// assert '(' conditionalExpression ')' ';' -/// ; -/// @description Checks that it is a compile-time error when both the conditional -/// expression and the parentheses are omitted in an assert statement. -/// @author rodionov - - -main() { - assert; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 An assert statement is used to disrupt normal execution if a +/// given boolean condition does not hold. +/// assertStatement: +/// assert '(' conditionalExpression ')' ';' +/// ; +/// @description Checks that it is a compile-time error when both the conditional +/// expression and the parentheses are omitted in an assert statement. +/// @author rodionov + + +main() { + assert; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/Break/syntax_t02.dart b/Language/Statements/Break/syntax_t02.dart index 6e19d80279..d5989f8c9d 100644 --- a/Language/Statements/Break/syntax_t02.dart +++ b/Language/Statements/Break/syntax_t02.dart @@ -1,19 +1,19 @@ -// 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 The break statement consists of the reserved word break and an -/// optional label. -/// breakStatement: -/// break identifier? ';' -/// ; -/// @description Checks that a break statement can reference its own label. -/// @author kaigorodov - - - -main() { - try { - L: break L; - } catch (x) {} -} +// 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 The break statement consists of the reserved word break and an +/// optional label. +/// breakStatement: +/// break identifier? ';' +/// ; +/// @description Checks that a break statement can reference its own label. +/// @author kaigorodov + + + +main() { + try { + L: break L; + } catch (x) {} +} diff --git a/Language/Statements/Continue/label_t15.dart b/Language/Statements/Continue/label_t15.dart index af68e0c481..a08f8d5b62 100644 --- a/Language/Statements/Continue/label_t15.dart +++ b/Language/Statements/Continue/label_t15.dart @@ -1,25 +1,25 @@ -// 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 Let sc be a continue statement. If sc is of the form continue L;, -/// then let sE be the innermost labeled do, for or while statement or case -/// clause with label L enclosing sc. If sc is of the form continue; then let sE -/// be the innermost do, for or while statement enclosing sc. -/// It is a compile-time error if no such statement or case clause sE exists -/// within the innermost function in which sc occurs. -/// @description Checks that it is a compile-time error if a 'continue;' -/// statement occurs in a block of try statement and there is no inclosing loop -/// statement. -/// @author iefremov - - - -main() { - try { - continue; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } catch (x) {} -} +// 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 Let sc be a continue statement. If sc is of the form continue L;, +/// then let sE be the innermost labeled do, for or while statement or case +/// clause with label L enclosing sc. If sc is of the form continue; then let sE +/// be the innermost do, for or while statement enclosing sc. +/// It is a compile-time error if no such statement or case clause sE exists +/// within the innermost function in which sc occurs. +/// @description Checks that it is a compile-time error if a 'continue;' +/// statement occurs in a block of try statement and there is no inclosing loop +/// statement. +/// @author iefremov + + + +main() { + try { + continue; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } catch (x) {} +} diff --git a/Language/Statements/For/syntax_t01.dart b/Language/Statements/For/syntax_t01.dart index 431c22d346..e3f77e76a9 100644 --- a/Language/Statements/For/syntax_t01.dart +++ b/Language/Statements/For/syntax_t01.dart @@ -1,28 +1,28 @@ -// 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 The for statement supports iteration. -/// forStatement: -/// await? for '(' forLoopParts ')' statement -/// ; -/// forLoopParts: -/// forInitializerStatement expression? ';' expressionList? | -/// declaredIdentifier in expression | -/// identifier in expression -/// ; -/// forInitializerStatement: -/// localVariableDeclaration | -/// expression? ';' -/// ; -/// @description Checks that it is a compile-time error if the loop parts are -/// missing entirely. -/// @author vasya - - -main() { - for () {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The for statement supports iteration. +/// forStatement: +/// await? for '(' forLoopParts ')' statement +/// ; +/// forLoopParts: +/// forInitializerStatement expression? ';' expressionList? | +/// declaredIdentifier in expression | +/// identifier in expression +/// ; +/// forInitializerStatement: +/// localVariableDeclaration | +/// expression? ';' +/// ; +/// @description Checks that it is a compile-time error if the loop parts are +/// missing entirely. +/// @author vasya + + +main() { + for () {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/For/syntax_t02.dart b/Language/Statements/For/syntax_t02.dart index d73d6cb53d..cfc02479c5 100644 --- a/Language/Statements/For/syntax_t02.dart +++ b/Language/Statements/For/syntax_t02.dart @@ -1,28 +1,28 @@ -// 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 The for statement supports iteration. -/// forStatement: -/// await? for '(' forLoopParts ')' statement -/// ; -/// forLoopParts: -/// forInitializerStatement expression? ';' expressionList? | -/// declaredIdentifier in expression | -/// identifier in expression -/// ; -/// forInitializerStatement: -/// localVariableDeclaration | -/// expression? ';' -/// ; -/// @description Checks that it is a compile-time error if the opening bracket -/// enclosing the loop parts is missing. -/// @author vasya - - -main() { - for ; ; ) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The for statement supports iteration. +/// forStatement: +/// await? for '(' forLoopParts ')' statement +/// ; +/// forLoopParts: +/// forInitializerStatement expression? ';' expressionList? | +/// declaredIdentifier in expression | +/// identifier in expression +/// ; +/// forInitializerStatement: +/// localVariableDeclaration | +/// expression? ';' +/// ; +/// @description Checks that it is a compile-time error if the opening bracket +/// enclosing the loop parts is missing. +/// @author vasya + + +main() { + for ; ; ) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/For/syntax_t03.dart b/Language/Statements/For/syntax_t03.dart index 35eae3b268..1031c30c00 100644 --- a/Language/Statements/For/syntax_t03.dart +++ b/Language/Statements/For/syntax_t03.dart @@ -1,30 +1,30 @@ -// 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 The for statement supports iteration. -/// forStatement: -/// await? for '(' forLoopParts ')' statement -/// ; -/// forLoopParts: -/// forInitializerStatement expression? ';' expressionList? | -/// declaredIdentifier in expression | -/// identifier in expression -/// ; -/// forInitializerStatement: -/// localVariableDeclaration | -/// expression? ';' -/// ; -/// @description Checks that it is a compile-time error if the closing bracket -/// enclosing the loop parts is missing. -/// @author vasya - -main() { - for (; ; {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} -//^ -// [analyzer] unspecified -// [cfe] unspecified +// 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 The for statement supports iteration. +/// forStatement: +/// await? for '(' forLoopParts ')' statement +/// ; +/// forLoopParts: +/// forInitializerStatement expression? ';' expressionList? | +/// declaredIdentifier in expression | +/// identifier in expression +/// ; +/// forInitializerStatement: +/// localVariableDeclaration | +/// expression? ';' +/// ; +/// @description Checks that it is a compile-time error if the closing bracket +/// enclosing the loop parts is missing. +/// @author vasya + +main() { + for (; ; {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} +//^ +// [analyzer] unspecified +// [cfe] unspecified diff --git a/Language/Statements/For/syntax_t04.dart b/Language/Statements/For/syntax_t04.dart index f743e2f411..e987bf1085 100644 --- a/Language/Statements/For/syntax_t04.dart +++ b/Language/Statements/For/syntax_t04.dart @@ -1,28 +1,28 @@ -// 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 The for statement supports iteration. -/// forStatement: -/// await? for '(' forLoopParts ')' statement -/// ; -/// forLoopParts: -/// forInitializerStatement expression? ';' expressionList? | -/// declaredIdentifier in expression | -/// identifier in expression -/// ; -/// forInitializerStatement: -/// localVariableDeclaration | -/// expression? ';' -/// ; -/// @description Checks that it is a compile-time error if the loop parts are -/// enclosed in curly braces instead of parentheses. -/// @author rodionov - - -main() { - for {;;} {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The for statement supports iteration. +/// forStatement: +/// await? for '(' forLoopParts ')' statement +/// ; +/// forLoopParts: +/// forInitializerStatement expression? ';' expressionList? | +/// declaredIdentifier in expression | +/// identifier in expression +/// ; +/// forInitializerStatement: +/// localVariableDeclaration | +/// expression? ';' +/// ; +/// @description Checks that it is a compile-time error if the loop parts are +/// enclosed in curly braces instead of parentheses. +/// @author rodionov + + +main() { + for {;;} {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/For/syntax_t05.dart b/Language/Statements/For/syntax_t05.dart index ae755b9010..a4720dd70d 100644 --- a/Language/Statements/For/syntax_t05.dart +++ b/Language/Statements/For/syntax_t05.dart @@ -1,28 +1,28 @@ -// 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 The for statement supports iteration. -/// forStatement: -/// await? for '(' forLoopParts ')' statement -/// ; -/// forLoopParts: -/// forInitializerStatement expression? ';' expressionList? | -/// declaredIdentifier in expression | -/// identifier in expression -/// ; -/// forInitializerStatement: -/// localVariableDeclaration | -/// expression? ';' -/// ; -/// @description Checks that it is a compile-time error if the loop parts are -/// not separated by semicolons. -/// @author vasya - - -main() { - for (var i = 0 i < 1 ++i) { } -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The for statement supports iteration. +/// forStatement: +/// await? for '(' forLoopParts ')' statement +/// ; +/// forLoopParts: +/// forInitializerStatement expression? ';' expressionList? | +/// declaredIdentifier in expression | +/// identifier in expression +/// ; +/// forInitializerStatement: +/// localVariableDeclaration | +/// expression? ';' +/// ; +/// @description Checks that it is a compile-time error if the loop parts are +/// not separated by semicolons. +/// @author vasya + + +main() { + for (var i = 0 i < 1 ++i) { } +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/For/syntax_t06.dart b/Language/Statements/For/syntax_t06.dart index 50879dd692..03c132896e 100644 --- a/Language/Statements/For/syntax_t06.dart +++ b/Language/Statements/For/syntax_t06.dart @@ -1,31 +1,31 @@ -// 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 The for statement supports iteration. -/// forStatement: -/// await? for '(' forLoopParts ')' statement -/// ; -/// forLoopParts: -/// forInitializerStatement expression? ';' expressionList? | -/// declaredIdentifier in expression | -/// identifier in expression -/// ; -/// forInitializerStatement: -/// localVariableDeclaration | -/// expression? ';' -/// ; -/// @description Checks that it is a compile-time error if the statement inside -/// the for statement does not end with a semicolon, even if empty. -/// @author vasya - - -main() { - for ( ; ; ) -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} -//^ -// [analyzer] unspecified -// [cfe] unspecified +// 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 The for statement supports iteration. +/// forStatement: +/// await? for '(' forLoopParts ')' statement +/// ; +/// forLoopParts: +/// forInitializerStatement expression? ';' expressionList? | +/// declaredIdentifier in expression | +/// identifier in expression +/// ; +/// forInitializerStatement: +/// localVariableDeclaration | +/// expression? ';' +/// ; +/// @description Checks that it is a compile-time error if the statement inside +/// the for statement does not end with a semicolon, even if empty. +/// @author vasya + + +main() { + for ( ; ; ) +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} +//^ +// [analyzer] unspecified +// [cfe] unspecified diff --git a/Language/Statements/For/syntax_t08.dart b/Language/Statements/For/syntax_t08.dart index 84f6b99121..77a3fea27b 100644 --- a/Language/Statements/For/syntax_t08.dart +++ b/Language/Statements/For/syntax_t08.dart @@ -1,27 +1,27 @@ -// 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 The for statement supports iteration. -/// forStatement: -/// await? for '(' forLoopParts ')' statement -/// ; -/// forLoopParts: -/// forInitializerStatement expression? ';' expressionList? | -/// declaredIdentifier in expression | -/// identifier in expression -/// ; -/// forInitializerStatement: -/// initializedVariableDeclaration | -/// expression? ';' -/// ; -/// @description Checks that it is a compile-time error if the 'forLoopParts' -/// in a 'id in expression' loop variety ends with a semicolon. -/// @author vasya - -main() { - for ( var l in [1, 2, 3]; ) break; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The for statement supports iteration. +/// forStatement: +/// await? for '(' forLoopParts ')' statement +/// ; +/// forLoopParts: +/// forInitializerStatement expression? ';' expressionList? | +/// declaredIdentifier in expression | +/// identifier in expression +/// ; +/// forInitializerStatement: +/// initializedVariableDeclaration | +/// expression? ';' +/// ; +/// @description Checks that it is a compile-time error if the 'forLoopParts' +/// in a 'id in expression' loop variety ends with a semicolon. +/// @author vasya + +main() { + for ( var l in [1, 2, 3]; ) break; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/For/syntax_t09.dart b/Language/Statements/For/syntax_t09.dart index 02d02c64da..482a282e87 100644 --- a/Language/Statements/For/syntax_t09.dart +++ b/Language/Statements/For/syntax_t09.dart @@ -1,29 +1,29 @@ -// 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 The for statement supports iteration. -/// forStatement: -/// await? for '(' forLoopParts ')' statement -/// ; -/// forLoopParts: -/// forInitializerStatement expression? ';' expressionList? | -/// declaredIdentifier in expression | -/// identifier in expression -/// ; -/// forInitializerStatement: -/// initializedVariableDeclaration | -/// expression? ';' -/// ; -/// @description Checks that it is a compile-time error if the loop parts -/// in a 'id in expression' loop variety contain more than one identifier. -/// @author vasya - - -main() { - for ( var x, y in List.filled(10, "") ) break; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// 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 The for statement supports iteration. +/// forStatement: +/// await? for '(' forLoopParts ')' statement +/// ; +/// forLoopParts: +/// forInitializerStatement expression? ';' expressionList? | +/// declaredIdentifier in expression | +/// identifier in expression +/// ; +/// forInitializerStatement: +/// initializedVariableDeclaration | +/// expression? ';' +/// ; +/// @description Checks that it is a compile-time error if the loop parts +/// in a 'id in expression' loop variety contain more than one identifier. +/// @author vasya + + +main() { + for ( var x, y in List.filled(10, "") ) break; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Statements/For/syntax_t10.dart b/Language/Statements/For/syntax_t10.dart index b57e415d3f..55148df4f0 100644 --- a/Language/Statements/For/syntax_t10.dart +++ b/Language/Statements/For/syntax_t10.dart @@ -1,28 +1,28 @@ -// 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 The for statement supports iteration. -/// forStatement: -/// await? for '(' forLoopParts ')' statement -/// ; -/// forLoopParts: -/// forInitializerStatement expression? ';' expressionList? | -/// declaredIdentifier in expression | -/// identifier in expression -/// ; -/// forInitializerStatement: -/// initializedVariableDeclaration | -/// expression? ';' -/// ; -/// @description Checks that it is a compile-time error if the expression is -/// missing in a 'id in expression' of for-in statement. -/// @author iefremov - - -main() { - for ( var x in ) break; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The for statement supports iteration. +/// forStatement: +/// await? for '(' forLoopParts ')' statement +/// ; +/// forLoopParts: +/// forInitializerStatement expression? ';' expressionList? | +/// declaredIdentifier in expression | +/// identifier in expression +/// ; +/// forInitializerStatement: +/// initializedVariableDeclaration | +/// expression? ';' +/// ; +/// @description Checks that it is a compile-time error if the expression is +/// missing in a 'id in expression' of for-in statement. +/// @author iefremov + + +main() { + for ( var x in ) break; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/For/syntax_t12.dart b/Language/Statements/For/syntax_t12.dart index 7ae0e2588a..0d9fc65458 100644 --- a/Language/Statements/For/syntax_t12.dart +++ b/Language/Statements/For/syntax_t12.dart @@ -1,28 +1,28 @@ -// 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 The for statement supports iteration. -/// forStatement: -/// await? for '(' forLoopParts ')' statement -/// ; -/// forLoopParts: -/// forInitializerStatement expression? ';' expressionList? | -/// declaredIdentifier in expression | -/// identifier in expression -/// ; -/// forInitializerStatement: -/// initializedVariableDeclaration | -/// expression? ';' -/// ; -/// @description Checks that it is a compile-time error if the loop variable -/// in a 'id in expression' includes initializer. -/// @author kaigorodov - - -main() { - for (var l = 1 in List.filled(100, 0)) break; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The for statement supports iteration. +/// forStatement: +/// await? for '(' forLoopParts ')' statement +/// ; +/// forLoopParts: +/// forInitializerStatement expression? ';' expressionList? | +/// declaredIdentifier in expression | +/// identifier in expression +/// ; +/// forInitializerStatement: +/// initializedVariableDeclaration | +/// expression? ';' +/// ; +/// @description Checks that it is a compile-time error if the loop variable +/// in a 'id in expression' includes initializer. +/// @author kaigorodov + + +main() { + for (var l = 1 in List.filled(100, 0)) break; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/For/syntax_t14.dart b/Language/Statements/For/syntax_t14.dart index 2c2821da95..4df6acdd0d 100644 --- a/Language/Statements/For/syntax_t14.dart +++ b/Language/Statements/For/syntax_t14.dart @@ -1,28 +1,28 @@ -// 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 The for statement supports iteration. -/// forStatement: -/// await? for '(' forLoopParts ')' statement -/// ; -/// forLoopParts: -/// forInitializerStatement expression? ';' expressionList? | -/// declaredIdentifier in expression | -/// identifier in expression -/// ; -/// forInitializerStatement: -/// localVariableDeclaration | -/// expression? ';' -/// ; -/// @description Checks that it is a compile-time error if the loop parts are -/// missing entirely in asynchronous for-in statement. -/// @author a.semenov@unipro.ru - - -main() async { - await for () {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The for statement supports iteration. +/// forStatement: +/// await? for '(' forLoopParts ')' statement +/// ; +/// forLoopParts: +/// forInitializerStatement expression? ';' expressionList? | +/// declaredIdentifier in expression | +/// identifier in expression +/// ; +/// forInitializerStatement: +/// localVariableDeclaration | +/// expression? ';' +/// ; +/// @description Checks that it is a compile-time error if the loop parts are +/// missing entirely in asynchronous for-in statement. +/// @author a.semenov@unipro.ru + + +main() async { + await for () {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/For/syntax_t15.dart b/Language/Statements/For/syntax_t15.dart index fb7b8715a0..a8efe1a8bd 100644 --- a/Language/Statements/For/syntax_t15.dart +++ b/Language/Statements/For/syntax_t15.dart @@ -1,29 +1,29 @@ -// 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 The for statement supports iteration. -/// forStatement: -/// await? for '(' forLoopParts ')' statement -/// ; -/// forLoopParts: -/// forInitializerStatement expression? ';' expressionList? | -/// declaredIdentifier in expression | -/// identifier in expression -/// ; -/// forInitializerStatement: -/// initializedVariableDeclaration | -/// expression? ';' -/// ; -/// @description Checks that it is a compile-time error if the loop parts -/// in an asynchronous loop form 'id in expression' end with a semicolon. -/// @author a.semenov@unipro.ru - -import 'dart:async'; - -main() async { - await for (var l in new Stream.fromIterable(List.filled(100, 0));) break; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The for statement supports iteration. +/// forStatement: +/// await? for '(' forLoopParts ')' statement +/// ; +/// forLoopParts: +/// forInitializerStatement expression? ';' expressionList? | +/// declaredIdentifier in expression | +/// identifier in expression +/// ; +/// forInitializerStatement: +/// initializedVariableDeclaration | +/// expression? ';' +/// ; +/// @description Checks that it is a compile-time error if the loop parts +/// in an asynchronous loop form 'id in expression' end with a semicolon. +/// @author a.semenov@unipro.ru + +import 'dart:async'; + +main() async { + await for (var l in new Stream.fromIterable(List.filled(100, 0));) break; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/For/syntax_t16.dart b/Language/Statements/For/syntax_t16.dart index 30ce2c8a6e..c24ba3364e 100644 --- a/Language/Statements/For/syntax_t16.dart +++ b/Language/Statements/For/syntax_t16.dart @@ -1,30 +1,30 @@ -// 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 The for statement supports iteration. -/// forStatement: -/// await? for '(' forLoopParts ')' statement -/// ; -/// forLoopParts: -/// forInitializerStatement expression? ';' expressionList? | -/// declaredIdentifier in expression | -/// identifier in expression -/// ; -/// forInitializerStatement: -/// initializedVariableDeclaration | -/// expression? ';' -/// ; -/// @description Checks that it is a compile-time error if the loop parts -/// in an asynchronous loop form 'id in expression' contain more than one -/// identifier. -/// @author a.semenov@unipro.ru - -import 'dart:async'; - -main() async { - await for (var x, y in new Stream.fromIterable(List.filled(100, 0))) break; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The for statement supports iteration. +/// forStatement: +/// await? for '(' forLoopParts ')' statement +/// ; +/// forLoopParts: +/// forInitializerStatement expression? ';' expressionList? | +/// declaredIdentifier in expression | +/// identifier in expression +/// ; +/// forInitializerStatement: +/// initializedVariableDeclaration | +/// expression? ';' +/// ; +/// @description Checks that it is a compile-time error if the loop parts +/// in an asynchronous loop form 'id in expression' contain more than one +/// identifier. +/// @author a.semenov@unipro.ru + +import 'dart:async'; + +main() async { + await for (var x, y in new Stream.fromIterable(List.filled(100, 0))) break; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/For/syntax_t17.dart b/Language/Statements/For/syntax_t17.dart index 97caf96c8b..64c29bfd37 100644 --- a/Language/Statements/For/syntax_t17.dart +++ b/Language/Statements/For/syntax_t17.dart @@ -1,28 +1,28 @@ -// 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 The for statement supports iteration. -/// forStatement: -/// await? for '(' forLoopParts ')' statement -/// ; -/// forLoopParts: -/// forInitializerStatement expression? ';' expressionList? | -/// declaredIdentifier in expression | -/// identifier in expression -/// ; -/// forInitializerStatement: -/// initializedVariableDeclaration | -/// expression? ';' -/// ; -/// @description Checks that it is a compile-time error if expression is -/// missing in the loop parts in an asynchronous loop form 'id in expression'. -/// @author a.semenov@unipro.ru - - -main() async { - await for (var i in ) break; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The for statement supports iteration. +/// forStatement: +/// await? for '(' forLoopParts ')' statement +/// ; +/// forLoopParts: +/// forInitializerStatement expression? ';' expressionList? | +/// declaredIdentifier in expression | +/// identifier in expression +/// ; +/// forInitializerStatement: +/// initializedVariableDeclaration | +/// expression? ';' +/// ; +/// @description Checks that it is a compile-time error if expression is +/// missing in the loop parts in an asynchronous loop form 'id in expression'. +/// @author a.semenov@unipro.ru + + +main() async { + await for (var i in ) break; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/For/syntax_t19.dart b/Language/Statements/For/syntax_t19.dart index c460aaf871..b7c0732dd3 100644 --- a/Language/Statements/For/syntax_t19.dart +++ b/Language/Statements/For/syntax_t19.dart @@ -1,29 +1,29 @@ -// 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 The for statement supports iteration. -/// forStatement: -/// await? for '(' forLoopParts ')' statement -/// ; -/// forLoopParts: -/// forInitializerStatement expression? ';' expressionList? | -/// declaredIdentifier in expression | -/// identifier in expression -/// ; -/// forInitializerStatement: -/// initializedVariableDeclaration | -/// expression? ';' -/// ; -/// @description Checks that it is a compile-time error if the loop variable -/// in an asynchronous form of 'id in expression' includes initializer. -/// @author a.semenov@unipro.ru - -import 'dart:async'; - -main() async { - await for (var x = 1 in new Stream.fromIterable([1,2])) break; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The for statement supports iteration. +/// forStatement: +/// await? for '(' forLoopParts ')' statement +/// ; +/// forLoopParts: +/// forInitializerStatement expression? ';' expressionList? | +/// declaredIdentifier in expression | +/// identifier in expression +/// ; +/// forInitializerStatement: +/// initializedVariableDeclaration | +/// expression? ';' +/// ; +/// @description Checks that it is a compile-time error if the loop variable +/// in an asynchronous form of 'id in expression' includes initializer. +/// @author a.semenov@unipro.ru + +import 'dart:async'; + +main() async { + await for (var x = 1 in new Stream.fromIterable([1,2])) break; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/Labels/syntax_t02.dart b/Language/Statements/Labels/syntax_t02.dart index 7818b383dc..555d23afaf 100644 --- a/Language/Statements/Labels/syntax_t02.dart +++ b/Language/Statements/Labels/syntax_t02.dart @@ -1,24 +1,24 @@ -// 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 label is an identifier followed by a colon. A labeled statement -/// is a statement prefixed by a label L. A labeled case clause is a case clause -/// within a switch statement prefixed by a label L. -/// The sole role of labels is to provide targets for the break and continue -/// statements. -/// label: -/// identifier ':' -/// ; -/// @description Checks that it is a compile-time error if the label is used -/// without the colon character. -/// @author vasya - - - -main() { - L while (true) { break L; } -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 label is an identifier followed by a colon. A labeled statement +/// is a statement prefixed by a label L. A labeled case clause is a case clause +/// within a switch statement prefixed by a label L. +/// The sole role of labels is to provide targets for the break and continue +/// statements. +/// label: +/// identifier ':' +/// ; +/// @description Checks that it is a compile-time error if the label is used +/// without the colon character. +/// @author vasya + + + +main() { + L while (true) { break L; } +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/Labels/syntax_t04.dart b/Language/Statements/Labels/syntax_t04.dart index 5bb6c6de96..086f8f48b3 100644 --- a/Language/Statements/Labels/syntax_t04.dart +++ b/Language/Statements/Labels/syntax_t04.dart @@ -1,25 +1,25 @@ -// 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 label is an identifier followed by a colon. A labeled statement -/// is a statement prefixed by a label L. A labeled case clause is a case clause -/// within a switch statement prefixed by a label L. -/// The sole role of labels is to provide targets for the break and continue -/// statements. -/// label: -/// identifier ':' -/// ; -/// @description Checks that it is a compile-time error if the label identifier -/// is empty. -/// @author vasya - -main() { -// ^ -// [analyzer] unspecified -// [cfe] unspecified - : while (true) { break L; } -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 label is an identifier followed by a colon. A labeled statement +/// is a statement prefixed by a label L. A labeled case clause is a case clause +/// within a switch statement prefixed by a label L. +/// The sole role of labels is to provide targets for the break and continue +/// statements. +/// label: +/// identifier ':' +/// ; +/// @description Checks that it is a compile-time error if the label identifier +/// is empty. +/// @author vasya + +main() { +// ^ +// [analyzer] unspecified +// [cfe] unspecified + : while (true) { break L; } +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/Labels/syntax_t07.dart b/Language/Statements/Labels/syntax_t07.dart index 43a5445d72..a34b84fa26 100644 --- a/Language/Statements/Labels/syntax_t07.dart +++ b/Language/Statements/Labels/syntax_t07.dart @@ -1,26 +1,26 @@ -// 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 label is an identifier followed by a colon. A labeled statement -/// is a statement prefixed by a label L. A labeled case clause is a case clause -/// within a switch statement prefixed by a label L. -/// The sole role of labels is to provide targets for the break and continue -/// statements. -/// label: -/// identifier ':' -/// ; -/// @description Checks that it is a compile-time error if a label is used in a -/// wrong context (next to a class member declaration). -/// @author rodionov - - -class C { - Label: C() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { -} +// 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 label is an identifier followed by a colon. A labeled statement +/// is a statement prefixed by a label L. A labeled case clause is a case clause +/// within a switch statement prefixed by a label L. +/// The sole role of labels is to provide targets for the break and continue +/// statements. +/// label: +/// identifier ':' +/// ; +/// @description Checks that it is a compile-time error if a label is used in a +/// wrong context (next to a class member declaration). +/// @author rodionov + + +class C { + Label: C() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { +} diff --git a/Language/Statements/Labels/syntax_t08.dart b/Language/Statements/Labels/syntax_t08.dart index c9f28acf60..282eca899e 100644 --- a/Language/Statements/Labels/syntax_t08.dart +++ b/Language/Statements/Labels/syntax_t08.dart @@ -1,28 +1,28 @@ -// 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 label is an identifier followed by a colon. A labeled statement -/// is a statement prefixed by a label L. A labeled case clause is a case clause -/// within a switch statement prefixed by a label L. -/// The sole role of labels is to provide targets for the break and continue -/// statements. -/// label: -/// identifier ':' -/// ; -/// @description Checks that it is a compile-time error if a label is used in a -/// wrong context (next to a class member declaration). -/// @author rodionov - - -class C { - C() {} -//^ -// [analyzer] unspecified - Label: int i; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() {} +// 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 label is an identifier followed by a colon. A labeled statement +/// is a statement prefixed by a label L. A labeled case clause is a case clause +/// within a switch statement prefixed by a label L. +/// The sole role of labels is to provide targets for the break and continue +/// statements. +/// label: +/// identifier ':' +/// ; +/// @description Checks that it is a compile-time error if a label is used in a +/// wrong context (next to a class member declaration). +/// @author rodionov + + +class C { + C() {} +//^ +// [analyzer] unspecified + Label: int i; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() {} diff --git a/Language/Statements/Local_Function_Declaration/reference_before_declaration_t01.dart b/Language/Statements/Local_Function_Declaration/reference_before_declaration_t01.dart index 50ca156d5b..2b09e3ea40 100644 --- a/Language/Statements/Local_Function_Declaration/reference_before_declaration_t01.dart +++ b/Language/Statements/Local_Function_Declaration/reference_before_declaration_t01.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error to reference a local function -/// before its declaration. -/// @description Checks that it is a compile-error to reference a local function -/// before its declaration. -/// @author kaigorodov -/// @note renamed from 04_Local_Function_Declaration_A02_t02 - - -main() { - func(); -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 It is a compile-time error to reference a local function +/// before its declaration. +/// @description Checks that it is a compile-error to reference a local function +/// before its declaration. +/// @author kaigorodov +/// @note renamed from 04_Local_Function_Declaration_A02_t02 + + +main() { + func(); +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/Local_Function_Declaration/reference_before_declaration_t03.dart b/Language/Statements/Local_Function_Declaration/reference_before_declaration_t03.dart index bb4c37eefc..ddcb7daeb8 100644 --- a/Language/Statements/Local_Function_Declaration/reference_before_declaration_t03.dart +++ b/Language/Statements/Local_Function_Declaration/reference_before_declaration_t03.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error to reference a local function -/// before its declaration. -/// @description Checks that it is a compile-error to declare mutually recursive -/// functions, because the first one uses the second before declaration. -/// @author ilya - - -main() { - evenHandler(x) => x.isEven ? 1 : oddHandler(x); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - oddHandler(x) => x.isOdd ? 1 : evenHandler(x); -//^ -// [cfe] unspecified - - evenHandler(1); -} +// 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 It is a compile-time error to reference a local function +/// before its declaration. +/// @description Checks that it is a compile-error to declare mutually recursive +/// functions, because the first one uses the second before declaration. +/// @author ilya + + +main() { + evenHandler(x) => x.isEven ? 1 : oddHandler(x); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + oddHandler(x) => x.isOdd ? 1 : evenHandler(x); +//^ +// [cfe] unspecified + + evenHandler(1); +} diff --git a/Language/Statements/Local_Function_Declaration/syntax_t02.dart b/Language/Statements/Local_Function_Declaration/syntax_t02.dart index 2b0944b859..5817a51a7a 100644 --- a/Language/Statements/Local_Function_Declaration/syntax_t02.dart +++ b/Language/Statements/Local_Function_Declaration/syntax_t02.dart @@ -1,37 +1,37 @@ -// 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 function declaration statement declares a new local function. -/// localFunctionDeclaration: -/// functionSignature functionBody -/// ; -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: -/// void | -/// type -/// ; -/// functionBody: -/// async? ‘=>’ expression ‘;’ | -/// (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// @description Checks that it is a compile error if a local function -/// declaration with a block for a body is missing the formal parameter list. -/// @author kaigorodov - - -main() { - void function1 {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - function1(); -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 function declaration statement declares a new local function. +/// localFunctionDeclaration: +/// functionSignature functionBody +/// ; +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: +/// void | +/// type +/// ; +/// functionBody: +/// async? ‘=>’ expression ‘;’ | +/// (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// @description Checks that it is a compile error if a local function +/// declaration with a block for a body is missing the formal parameter list. +/// @author kaigorodov + + +main() { + void function1 {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + function1(); +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/Local_Function_Declaration/syntax_t03.dart b/Language/Statements/Local_Function_Declaration/syntax_t03.dart index 59297c143f..7c2aa59e0f 100644 --- a/Language/Statements/Local_Function_Declaration/syntax_t03.dart +++ b/Language/Statements/Local_Function_Declaration/syntax_t03.dart @@ -1,34 +1,34 @@ -// 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 function declaration statement declares a new local function. -/// localFunctionDeclaration: -/// functionSignature functionBody -/// ; -/// functionSignature: -/// metadata returnType? identifier formalParameterList -/// ; -/// returnType: -/// void | -/// type -/// ; -/// functionBody: -/// async? ‘=>’ expression ‘;’ | -/// (async | async* | sync*)? block -/// ; -/// block: -/// '{' statements '}' -/// ; -/// @description Checks that it is a compile error if a function with an -/// expression for a body is missing the formal parameter list. -/// @author kaigorodov - - -main() { - int function1 => 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - function1(); -} +// 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 function declaration statement declares a new local function. +/// localFunctionDeclaration: +/// functionSignature functionBody +/// ; +/// functionSignature: +/// metadata returnType? identifier formalParameterList +/// ; +/// returnType: +/// void | +/// type +/// ; +/// functionBody: +/// async? ‘=>’ expression ‘;’ | +/// (async | async* | sync*)? block +/// ; +/// block: +/// '{' statements '}' +/// ; +/// @description Checks that it is a compile error if a function with an +/// expression for a body is missing the formal parameter list. +/// @author kaigorodov + + +main() { + int function1 => 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + function1(); +} diff --git a/Language/Statements/Local_Variable_Declaration/syntax_t03.dart b/Language/Statements/Local_Variable_Declaration/syntax_t03.dart index 7db36be542..bd8970d99a 100644 --- a/Language/Statements/Local_Variable_Declaration/syntax_t03.dart +++ b/Language/Statements/Local_Variable_Declaration/syntax_t03.dart @@ -1,21 +1,21 @@ -// 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 variable declaration statement, also known as a local variable -/// declaration, has the following form: -/// ⟨localVariableDeclaration⟩ ::= -/// ⟨metadata⟩ ⟨initializedVariableDeclaration⟩ ‘;’ -/// -/// @description Checks that a variable declaration statement `T id;` has a -/// semicolon at the end. -/// @author vasya - -class T {} - -main() { - T id -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 variable declaration statement, also known as a local variable +/// declaration, has the following form: +/// ⟨localVariableDeclaration⟩ ::= +/// ⟨metadata⟩ ⟨initializedVariableDeclaration⟩ ‘;’ +/// +/// @description Checks that a variable declaration statement `T id;` has a +/// semicolon at the end. +/// @author vasya + +class T {} + +main() { + T id +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/Local_Variable_Declaration/syntax_t04.dart b/Language/Statements/Local_Variable_Declaration/syntax_t04.dart index 7d04b946e2..0b9f9b7e31 100644 --- a/Language/Statements/Local_Variable_Declaration/syntax_t04.dart +++ b/Language/Statements/Local_Variable_Declaration/syntax_t04.dart @@ -1,21 +1,21 @@ -// 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 variable declaration statement, also known as a local variable -/// declaration, has the following form: -/// ⟨localVariableDeclaration⟩ ::= -/// ⟨metadata⟩ ⟨initializedVariableDeclaration⟩ ‘;’ -/// -/// @description Checks that a variable declaration statement `T id = e;` must -/// end with a semicolon. -/// @author vasya - -class T {} - -main() { - T id = new T() -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 variable declaration statement, also known as a local variable +/// declaration, has the following form: +/// ⟨localVariableDeclaration⟩ ::= +/// ⟨metadata⟩ ⟨initializedVariableDeclaration⟩ ‘;’ +/// +/// @description Checks that a variable declaration statement `T id = e;` must +/// end with a semicolon. +/// @author vasya + +class T {} + +main() { + T id = new T() +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/Local_Variable_Declaration/syntax_t13.dart b/Language/Statements/Local_Variable_Declaration/syntax_t13.dart index cfd572c67e..1ee1864390 100644 --- a/Language/Statements/Local_Variable_Declaration/syntax_t13.dart +++ b/Language/Statements/Local_Variable_Declaration/syntax_t13.dart @@ -1,21 +1,21 @@ -// 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 variable declaration statement, also known as a local variable -/// declaration, has the following form: -/// ⟨localVariableDeclaration⟩ ::= -/// ⟨metadata⟩ ⟨initializedVariableDeclaration⟩ ‘;’ -/// -/// @description Checks that incorrect syntax of type parameters causes a -/// compile-time error. -/// @author kaigorodov - -class T {} - -main() { - T? id; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 variable declaration statement, also known as a local variable +/// declaration, has the following form: +/// ⟨localVariableDeclaration⟩ ::= +/// ⟨metadata⟩ ⟨initializedVariableDeclaration⟩ ‘;’ +/// +/// @description Checks that incorrect syntax of type parameters causes a +/// compile-time error. +/// @author kaigorodov + +class T {} + +main() { + T? id; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Statements/Return/generative_constructor_t01.dart b/Language/Statements/Return/generative_constructor_t01.dart index e5c028fb9c..2baa893828 100644 --- a/Language/Statements/Return/generative_constructor_t01.dart +++ b/Language/Statements/Return/generative_constructor_t01.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if a return statement of the form -/// return e; appears in a generative constructor. -/// @description Checks that a compile-time error occurs if a return statement -/// of the form return e; appears in a generative constructor. -/// @author vasya - - -class C { - C() { return this; } -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 It is a compile-time error if a return statement of the form +/// return e; appears in a generative constructor. +/// @description Checks that a compile-time error occurs if a return statement +/// of the form return e; appears in a generative constructor. +/// @author vasya + + +class C { + C() { return this; } +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Statements/Return/generative_constructor_t02.dart b/Language/Statements/Return/generative_constructor_t02.dart index 4f5bcedb98..8075c576e1 100644 --- a/Language/Statements/Return/generative_constructor_t02.dart +++ b/Language/Statements/Return/generative_constructor_t02.dart @@ -1,22 +1,22 @@ -// 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 It is a compile-time error if a return statement of the form -/// return e; appears in a generative constructor. -/// @description Checks that a compile-time error occurs if a return statement -/// of the form return e; appears in a named generative constructor. -/// @author rodionov - - -class C { - C() {} - C.foo() { return this; } -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C.foo(); -} +// 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 It is a compile-time error if a return statement of the form +/// return e; appears in a generative constructor. +/// @description Checks that a compile-time error occurs if a return statement +/// of the form return e; appears in a named generative constructor. +/// @author rodionov + + +class C { + C() {} + C.foo() { return this; } +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C.foo(); +} diff --git a/Language/Statements/Return/generative_constructor_t03.dart b/Language/Statements/Return/generative_constructor_t03.dart index f2008dcd3f..e28ea7be74 100644 --- a/Language/Statements/Return/generative_constructor_t03.dart +++ b/Language/Statements/Return/generative_constructor_t03.dart @@ -1,21 +1,21 @@ -// 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 It is a compile-time error if a return statement of the form -/// return e; appears in a generative constructor. -/// @description Checks that a compile-time error occurs if a return statement -/// of the form return null; appears in a generative constructor. -/// @author rodionov - - -class C { - C() { return null;} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -} +// 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 It is a compile-time error if a return statement of the form +/// return e; appears in a generative constructor. +/// @description Checks that a compile-time error occurs if a return statement +/// of the form return null; appears in a generative constructor. +/// @author rodionov + + +class C { + C() { return null;} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +} diff --git a/Language/Statements/Return/syntax_t03.dart b/Language/Statements/Return/syntax_t03.dart index 4037f03f73..ca579f9118 100644 --- a/Language/Statements/Return/syntax_t03.dart +++ b/Language/Statements/Return/syntax_t03.dart @@ -1,23 +1,23 @@ -// 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 The return statement returns a result to the caller of a -/// synchronous function, completes the future associated with an asynchronous -/// function or terminates the stream or iterable associated with a generator. -/// returnStatement: -/// return expression? ';' -/// ; -/// @description Checks that it is a compile-time error if a return statement -/// does not end with a semicolon. -/// @author vasya - - -foo() { - return "foo" -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() {} +// 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 The return statement returns a result to the caller of a +/// synchronous function, completes the future associated with an asynchronous +/// function or terminates the stream or iterable associated with a generator. +/// returnStatement: +/// return expression? ';' +/// ; +/// @description Checks that it is a compile-time error if a return statement +/// does not end with a semicolon. +/// @author vasya + + +foo() { + return "foo" +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() {} diff --git a/Language/Statements/Switch/syntax_t04.dart b/Language/Statements/Switch/syntax_t04.dart index 81aa900554..0824773b7d 100644 --- a/Language/Statements/Switch/syntax_t04.dart +++ b/Language/Statements/Switch/syntax_t04.dart @@ -1,40 +1,40 @@ -// 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 The switch statement supports dispatching control among a large -/// number of cases. -/// switchStatement: -/// switch '(' expression ')' '{' switchCase* defaultCase? '}' -/// ; -/// switchCase: -/// label* case expression ':' statements -/// ; -/// defaultCase: -/// label* default ':' statements -/// ; -/// @description Checks that it is a compile-time error if the opening bracket -/// of the switch expression is missing. -/// @author vasya - - -switchTest(value) { - var result; - - switch value) { -// ^ -// [analyzer] unspecified -// [cfe] unspecified - case 0: result = 0; break; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - default: result = -1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } - return result; -} - -main() {} +// 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 The switch statement supports dispatching control among a large +/// number of cases. +/// switchStatement: +/// switch '(' expression ')' '{' switchCase* defaultCase? '}' +/// ; +/// switchCase: +/// label* case expression ':' statements +/// ; +/// defaultCase: +/// label* default ':' statements +/// ; +/// @description Checks that it is a compile-time error if the opening bracket +/// of the switch expression is missing. +/// @author vasya + + +switchTest(value) { + var result; + + switch value) { +// ^ +// [analyzer] unspecified +// [cfe] unspecified + case 0: result = 0; break; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + default: result = -1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } + return result; +} + +main() {} diff --git a/Language/Statements/Switch/syntax_t05.dart b/Language/Statements/Switch/syntax_t05.dart index 31eb487a7b..d9ab8b0ba3 100644 --- a/Language/Statements/Switch/syntax_t05.dart +++ b/Language/Statements/Switch/syntax_t05.dart @@ -1,34 +1,34 @@ -// 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 The switch statement supports dispatching control among a large -/// number of cases. -/// switchStatement: -/// switch '(' expression ')' '{' switchCase* defaultCase? '}' -/// ; -/// switchCase: -/// label* case expression ':' statements -/// ; -/// defaultCase: -/// label* default ':' statements -/// ; -/// @description Checks that it is a compile-time error if the closing bracket -/// of the switch expression is missing. -/// @author vasya - - -switchTest(value) { - var result; - - switch (value { -// ^ -// [analyzer] unspecified -// [cfe] unspecified - case 0: result = 0; break; - default: result = -1; - } - return result; -} - -main() {} +// 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 The switch statement supports dispatching control among a large +/// number of cases. +/// switchStatement: +/// switch '(' expression ')' '{' switchCase* defaultCase? '}' +/// ; +/// switchCase: +/// label* case expression ':' statements +/// ; +/// defaultCase: +/// label* default ':' statements +/// ; +/// @description Checks that it is a compile-time error if the closing bracket +/// of the switch expression is missing. +/// @author vasya + + +switchTest(value) { + var result; + + switch (value { +// ^ +// [analyzer] unspecified +// [cfe] unspecified + case 0: result = 0; break; + default: result = -1; + } + return result; +} + +main() {} diff --git a/Language/Statements/Switch/syntax_t06.dart b/Language/Statements/Switch/syntax_t06.dart index 87c2508b25..0aa024d909 100644 --- a/Language/Statements/Switch/syntax_t06.dart +++ b/Language/Statements/Switch/syntax_t06.dart @@ -1,33 +1,33 @@ -// 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 The switch statement supports dispatching control among a large -/// number of cases. -/// switchStatement: -/// switch '(' expression ')' '{' switchCase* defaultCase? '}' -/// ; -/// switchCase: -/// label* case expression ':' statements -/// ; -/// defaultCase: -/// label* default ':' statements -/// ; -/// @description Checks that it is a compile-time error if the switch expression -/// is missing. -/// @author vasya - - -switchTest(value) { - var result; - - switch () { -// ^ -// [analyzer] unspecified -// [cfe] unspecified - case 0: break; - } - return result; -} - -main() {} +// 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 The switch statement supports dispatching control among a large +/// number of cases. +/// switchStatement: +/// switch '(' expression ')' '{' switchCase* defaultCase? '}' +/// ; +/// switchCase: +/// label* case expression ':' statements +/// ; +/// defaultCase: +/// label* default ':' statements +/// ; +/// @description Checks that it is a compile-time error if the switch expression +/// is missing. +/// @author vasya + + +switchTest(value) { + var result; + + switch () { +// ^ +// [analyzer] unspecified +// [cfe] unspecified + case 0: break; + } + return result; +} + +main() {} diff --git a/Language/Statements/Switch/syntax_t07.dart b/Language/Statements/Switch/syntax_t07.dart index df03705d3d..997d56f714 100644 --- a/Language/Statements/Switch/syntax_t07.dart +++ b/Language/Statements/Switch/syntax_t07.dart @@ -1,46 +1,46 @@ -// 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 The switch statement supports dispatching control among a large -/// number of cases. -/// switchStatement: -/// switch '(' expression ')' '{' switchCase* defaultCase? '}' -/// ; -/// switchCase: -/// label* case expression ':' statements -/// ; -/// defaultCase: -/// label* default ':' statements -/// ; -/// @description Checks that it is a compile-time error if the opening curly -/// bracket of the switch statement's body is missing. -/// @author vasya - - -switchTest(value) { - var result; - - switch (value) -// ^ -// [analyzer] unspecified -// [cfe] unspecified - case 0: result = 0; break; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - default: result = -1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } - return result; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() {} +// 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 The switch statement supports dispatching control among a large +/// number of cases. +/// switchStatement: +/// switch '(' expression ')' '{' switchCase* defaultCase? '}' +/// ; +/// switchCase: +/// label* case expression ':' statements +/// ; +/// defaultCase: +/// label* default ':' statements +/// ; +/// @description Checks that it is a compile-time error if the opening curly +/// bracket of the switch statement's body is missing. +/// @author vasya + + +switchTest(value) { + var result; + + switch (value) +// ^ +// [analyzer] unspecified +// [cfe] unspecified + case 0: result = 0; break; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + default: result = -1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } + return result; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() {} diff --git a/Language/Statements/Switch/syntax_t08.dart b/Language/Statements/Switch/syntax_t08.dart index bc9378688e..8c529b7075 100644 --- a/Language/Statements/Switch/syntax_t08.dart +++ b/Language/Statements/Switch/syntax_t08.dart @@ -1,34 +1,34 @@ -// 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 The switch statement supports dispatching control among a large -/// number of cases. -/// switchStatement: -/// switch '(' expression ')' '{' switchCase* defaultCase? '}' -/// ; -/// switchCase: -/// label* case expression ':' statements -/// ; -/// defaultCase: -/// label* default ':' statements -/// ; -/// @description Checks that it is a compile-time error if the closing curly -/// bracket of the switch statement's body is missing. -/// @author vasya - - -switchTest(value) { -// ^ -// [cfe] unspecified - var result; - - switch (value) { - case 0: result = 0; break; - default: result = -1; - return result; -} - -main() {} -// [error line 34, column 0] +// 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 The switch statement supports dispatching control among a large +/// number of cases. +/// switchStatement: +/// switch '(' expression ')' '{' switchCase* defaultCase? '}' +/// ; +/// switchCase: +/// label* case expression ':' statements +/// ; +/// defaultCase: +/// label* default ':' statements +/// ; +/// @description Checks that it is a compile-time error if the closing curly +/// bracket of the switch statement's body is missing. +/// @author vasya + + +switchTest(value) { +// ^ +// [cfe] unspecified + var result; + + switch (value) { + case 0: result = 0; break; + default: result = -1; + return result; +} + +main() {} +// [error line 34, column 0] // [analyzer] unspecified \ No newline at end of file diff --git a/Language/Statements/Switch/syntax_t09.dart b/Language/Statements/Switch/syntax_t09.dart index 2988ddf81b..d0e3b2ef7a 100644 --- a/Language/Statements/Switch/syntax_t09.dart +++ b/Language/Statements/Switch/syntax_t09.dart @@ -1,34 +1,34 @@ -// 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 The switch statement supports dispatching control among a large -/// number of cases. -/// switchStatement: -/// switch '(' expression ')' '{' switchCase* defaultCase? '}' -/// ; -/// switchCase: -/// label* case expression ':' statements -/// ; -/// defaultCase: -/// label* default ':' statements -/// ; -/// @description Checks that it is a compile-time error if a case expression is -/// missing. -/// @author vasya - - -switchTest(value) { - var result; - - switch (value) { - case : result = 0; break; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - default: result = -1; - } - return result; -} - -main() {} +// 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 The switch statement supports dispatching control among a large +/// number of cases. +/// switchStatement: +/// switch '(' expression ')' '{' switchCase* defaultCase? '}' +/// ; +/// switchCase: +/// label* case expression ':' statements +/// ; +/// defaultCase: +/// label* default ':' statements +/// ; +/// @description Checks that it is a compile-time error if a case expression is +/// missing. +/// @author vasya + + +switchTest(value) { + var result; + + switch (value) { + case : result = 0; break; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + default: result = -1; + } + return result; +} + +main() {} diff --git a/Language/Statements/Switch/syntax_t10.dart b/Language/Statements/Switch/syntax_t10.dart index 06bce24a0d..8b97566681 100644 --- a/Language/Statements/Switch/syntax_t10.dart +++ b/Language/Statements/Switch/syntax_t10.dart @@ -1,34 +1,34 @@ -// 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 The switch statement supports dispatching control among a large -/// number of cases. -/// switchStatement: -/// switch '(' expression ')' '{' switchCase* defaultCase? '}' -/// ; -/// switchCase: -/// label* case expression ':' statements -/// ; -/// defaultCase: -/// label* default ':' statements -/// ; -/// @description Checks that it is a compile-time error if a case expression is -/// not followed by a colon character. -/// @author vasya - - -switchTest(value) { - var result; - - switch (value) { - case 0 result = 0; break; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - default: result = -1; - } - return result; -} - -main() {} +// 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 The switch statement supports dispatching control among a large +/// number of cases. +/// switchStatement: +/// switch '(' expression ')' '{' switchCase* defaultCase? '}' +/// ; +/// switchCase: +/// label* case expression ':' statements +/// ; +/// defaultCase: +/// label* default ':' statements +/// ; +/// @description Checks that it is a compile-time error if a case expression is +/// not followed by a colon character. +/// @author vasya + + +switchTest(value) { + var result; + + switch (value) { + case 0 result = 0; break; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + default: result = -1; + } + return result; +} + +main() {} diff --git a/Language/Statements/Switch/syntax_t11.dart b/Language/Statements/Switch/syntax_t11.dart index 253c1d1481..b603d7707e 100644 --- a/Language/Statements/Switch/syntax_t11.dart +++ b/Language/Statements/Switch/syntax_t11.dart @@ -1,34 +1,34 @@ -// 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 The switch statement supports dispatching control among a large -/// number of cases. -/// switchStatement: -/// switch '(' expression ')' '{' switchCase* defaultCase? '}' -/// ; -/// switchCase: -/// label* case expression ':' statements -/// ; -/// defaultCase: -/// label* default ':' statements -/// ; -/// @description Checks that it is a compile-time error if the semicolon at the -/// end of case statements is missing. -/// @author vasya - - -switchTest(value) { - var result; - - switch (value) { - case 0: result = 0 -// ^ -// [analyzer] unspecified -// [cfe] unspecified - default: result = -1; - } - return result; -} - -main() {} +// 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 The switch statement supports dispatching control among a large +/// number of cases. +/// switchStatement: +/// switch '(' expression ')' '{' switchCase* defaultCase? '}' +/// ; +/// switchCase: +/// label* case expression ':' statements +/// ; +/// defaultCase: +/// label* default ':' statements +/// ; +/// @description Checks that it is a compile-time error if the semicolon at the +/// end of case statements is missing. +/// @author vasya + + +switchTest(value) { + var result; + + switch (value) { + case 0: result = 0 +// ^ +// [analyzer] unspecified +// [cfe] unspecified + default: result = -1; + } + return result; +} + +main() {} diff --git a/Language/Statements/Switch/syntax_t12.dart b/Language/Statements/Switch/syntax_t12.dart index 77f79afb21..dcf381f22c 100644 --- a/Language/Statements/Switch/syntax_t12.dart +++ b/Language/Statements/Switch/syntax_t12.dart @@ -1,35 +1,35 @@ -// 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 The switch statement supports dispatching control among a large -/// number of cases. -/// switchStatement: -/// switch '(' expression ')' '{' switchCase* defaultCase? '}' -/// ; -/// switchCase: -/// label* case expression ':' statements -/// ; -/// defaultCase: -/// label* default ':' statements -/// ; -/// @description Checks that it is a compile-time error if the default keyword -/// is followed by an expression. -/// @author vasya - - -switchTest(value) { - var result; - - switch (value) { - case 0: result = 0; break; - default -1: result = -1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } - return result; -} - -main() {} - +// 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 The switch statement supports dispatching control among a large +/// number of cases. +/// switchStatement: +/// switch '(' expression ')' '{' switchCase* defaultCase? '}' +/// ; +/// switchCase: +/// label* case expression ':' statements +/// ; +/// defaultCase: +/// label* default ':' statements +/// ; +/// @description Checks that it is a compile-time error if the default keyword +/// is followed by an expression. +/// @author vasya + + +switchTest(value) { + var result; + + switch (value) { + case 0: result = 0; break; + default -1: result = -1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } + return result; +} + +main() {} + diff --git a/Language/Statements/Switch/syntax_t14.dart b/Language/Statements/Switch/syntax_t14.dart index 47222eb29f..1644056b2c 100644 --- a/Language/Statements/Switch/syntax_t14.dart +++ b/Language/Statements/Switch/syntax_t14.dart @@ -1,34 +1,34 @@ -// 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 The switch statement supports dispatching control among a large -/// number of cases. -/// switchStatement: -/// switch '(' expression ')' '{' switchCase* defaultCase? '}' -/// ; -/// switchCase: -/// label* case expression ':' statements -/// ; -/// defaultCase: -/// label* default ':' statements -/// ; -/// @description Checks that it is a compile-time error if the default keyword -/// is not followed by a colon character. -/// @author vasya - - -switchTest(value) { - var result; - - switch (value) { - case 0: result = 0; break; - default result = -1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } - return result; -} - -main() {} +// 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 The switch statement supports dispatching control among a large +/// number of cases. +/// switchStatement: +/// switch '(' expression ')' '{' switchCase* defaultCase? '}' +/// ; +/// switchCase: +/// label* case expression ':' statements +/// ; +/// defaultCase: +/// label* default ':' statements +/// ; +/// @description Checks that it is a compile-time error if the default keyword +/// is not followed by a colon character. +/// @author vasya + + +switchTest(value) { + var result; + + switch (value) { + case 0: result = 0; break; + default result = -1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } + return result; +} + +main() {} diff --git a/Language/Statements/Switch/syntax_t15.dart b/Language/Statements/Switch/syntax_t15.dart index 357c6e1441..e2b139f7c4 100644 --- a/Language/Statements/Switch/syntax_t15.dart +++ b/Language/Statements/Switch/syntax_t15.dart @@ -1,34 +1,34 @@ -// 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 The switch statement supports dispatching control among a large -/// number of cases. -/// switchStatement: -/// switch '(' expression ')' '{' switchCase* defaultCase? '}' -/// ; -/// switchCase: -/// label* case expression ':' statements -/// ; -/// defaultCase: -/// label* default ':' statements -/// ; -/// @description Checks that it is a compile-time error if the semicolon at the -/// end of default case statements is missing. -/// @author vasya - - -switchTest(value) { - var result; - - switch (value) { - case 0: result = 0; break; - default: result = -1 -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } - return result; -} - -main() {} +// 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 The switch statement supports dispatching control among a large +/// number of cases. +/// switchStatement: +/// switch '(' expression ')' '{' switchCase* defaultCase? '}' +/// ; +/// switchCase: +/// label* case expression ':' statements +/// ; +/// defaultCase: +/// label* default ':' statements +/// ; +/// @description Checks that it is a compile-time error if the semicolon at the +/// end of default case statements is missing. +/// @author vasya + + +switchTest(value) { + var result; + + switch (value) { + case 0: result = 0; break; + default: result = -1 +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } + return result; +} + +main() {} diff --git a/Language/Statements/Switch/syntax_t16.dart b/Language/Statements/Switch/syntax_t16.dart index 0a4fc30996..37e0537d61 100644 --- a/Language/Statements/Switch/syntax_t16.dart +++ b/Language/Statements/Switch/syntax_t16.dart @@ -1,34 +1,34 @@ -// 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 The switch statement supports dispatching control among a large -/// number of cases. -/// switchStatement: -/// switch '(' expression ')' '{' switchCase* defaultCase? '}' -/// ; -/// switchCase: -/// label* case expression ':' statements -/// ; -/// defaultCase: -/// label* default ':' statements -/// ; -/// @description Checks that it is a compile-time error if the default case is -/// repeated. -/// @author vasya - -foo(value) { - var result; - - switch(value) { - case 0: break; - default: - default: break; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } - return result; -} - -main() {} +// 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 The switch statement supports dispatching control among a large +/// number of cases. +/// switchStatement: +/// switch '(' expression ')' '{' switchCase* defaultCase? '}' +/// ; +/// switchCase: +/// label* case expression ':' statements +/// ; +/// defaultCase: +/// label* default ':' statements +/// ; +/// @description Checks that it is a compile-time error if the default case is +/// repeated. +/// @author vasya + +foo(value) { + var result; + + switch(value) { + case 0: break; + default: + default: break; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } + return result; +} + +main() {} diff --git a/Language/Statements/Switch/syntax_t17.dart b/Language/Statements/Switch/syntax_t17.dart index a5e73e223e..92b1dc4866 100644 --- a/Language/Statements/Switch/syntax_t17.dart +++ b/Language/Statements/Switch/syntax_t17.dart @@ -1,35 +1,35 @@ -// 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 The switch statement supports dispatching control among a large -/// number of cases. -/// switchStatement: -/// switch '(' expression ')' '{' switchCase* defaultCase? '}' -/// ; -/// switchCase: -/// label* case expression ':' statements -/// ; -/// defaultCase: -/// label* default ':' statements -/// ; -/// @description Checks that it is a compile-time error if the default case is -/// not the last case of a switch statement. -/// @author vasya - - -foo(value) { - var result; - - switch (value) { - case 0: break; - default: break; - case 1: break; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } - return result; -} - -main() {} +// 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 The switch statement supports dispatching control among a large +/// number of cases. +/// switchStatement: +/// switch '(' expression ')' '{' switchCase* defaultCase? '}' +/// ; +/// switchCase: +/// label* case expression ':' statements +/// ; +/// defaultCase: +/// label* default ':' statements +/// ; +/// @description Checks that it is a compile-time error if the default case is +/// not the last case of a switch statement. +/// @author vasya + + +foo(value) { + var result; + + switch (value) { + case 0: break; + default: break; + case 1: break; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } + return result; +} + +main() {} diff --git a/Language/Statements/Switch/syntax_t18.dart b/Language/Statements/Switch/syntax_t18.dart index 9b47d60b56..b63eb3f1f0 100644 --- a/Language/Statements/Switch/syntax_t18.dart +++ b/Language/Statements/Switch/syntax_t18.dart @@ -1,36 +1,36 @@ -// 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 The switch statement supports dispatching control among a large -/// number of cases. -/// switchStatement: -/// switch '(' expression ')' '{' switchCase* defaultCase? '}' -/// ; -/// switchCase: -/// label* case expression ':' statements -/// ; -/// defaultCase: -/// label* default ':' statements -/// ; -/// @description Checks that it is a compile-time error if a label is not -/// followed by case or default keywords. -/// @author kaigorodov - -foo(value) { - var result; - - switch (value) { - case 0: break; - label: -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } -//^ -// [analyzer] unspecified -// [cfe] unspecified - return result; -} - -main() {} +// 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 The switch statement supports dispatching control among a large +/// number of cases. +/// switchStatement: +/// switch '(' expression ')' '{' switchCase* defaultCase? '}' +/// ; +/// switchCase: +/// label* case expression ':' statements +/// ; +/// defaultCase: +/// label* default ':' statements +/// ; +/// @description Checks that it is a compile-time error if a label is not +/// followed by case or default keywords. +/// @author kaigorodov + +foo(value) { + var result; + + switch (value) { + case 0: break; + label: +// ^ +// [analyzer] unspecified +// [cfe] unspecified + } +//^ +// [analyzer] unspecified +// [cfe] unspecified + return result; +} + +main() {} diff --git a/Language/Statements/While/syntax_t01.dart b/Language/Statements/While/syntax_t01.dart index 6652449f8c..63dcbb3cd8 100644 --- a/Language/Statements/While/syntax_t01.dart +++ b/Language/Statements/While/syntax_t01.dart @@ -1,21 +1,21 @@ -// 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 The while statement supports conditional iteration, where the -/// condition is evaluated prior to the loop. -/// whileStatement: -/// while '(' expression ')' statement -/// ; -/// @description Checks that it is a compile-time error if the opening bracket of -/// the expression is missing. -/// @author vasya - - -main() { - while true) {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// 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 The while statement supports conditional iteration, where the +/// condition is evaluated prior to the loop. +/// whileStatement: +/// while '(' expression ')' statement +/// ; +/// @description Checks that it is a compile-time error if the opening bracket of +/// the expression is missing. +/// @author vasya + + +main() { + while true) {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Statements/While/syntax_t02.dart b/Language/Statements/While/syntax_t02.dart index f181aecebb..f844f918a1 100644 --- a/Language/Statements/While/syntax_t02.dart +++ b/Language/Statements/While/syntax_t02.dart @@ -1,21 +1,21 @@ -// 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 The while statement supports conditional iteration, where the -/// condition is evaluated prior to the loop. -/// whileStatement: -/// while '(' expression ')' statement -/// ; -/// @description Checks that it is a compile-time error if the closing bracket of -/// the expression is missing. -/// @author vasya - - -main() { - while (true { } -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// 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 The while statement supports conditional iteration, where the +/// condition is evaluated prior to the loop. +/// whileStatement: +/// while '(' expression ')' statement +/// ; +/// @description Checks that it is a compile-time error if the closing bracket of +/// the expression is missing. +/// @author vasya + + +main() { + while (true { } +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Statements/While/syntax_t03.dart b/Language/Statements/While/syntax_t03.dart index e7e88c216d..54df6f91bb 100644 --- a/Language/Statements/While/syntax_t03.dart +++ b/Language/Statements/While/syntax_t03.dart @@ -1,21 +1,21 @@ -// 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 The while statement supports conditional iteration, where the -/// condition is evaluated prior to the loop. -/// whileStatement: -/// while '(' expression ')' statement -/// ; -/// @description Checks that it is a compile-time error if the semicolon at the -/// end of the statement is missing. -/// @author vasya - - -main() { - while (true) break -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// 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 The while statement supports conditional iteration, where the +/// condition is evaluated prior to the loop. +/// whileStatement: +/// while '(' expression ')' statement +/// ; +/// @description Checks that it is a compile-time error if the semicolon at the +/// end of the statement is missing. +/// @author vasya + + +main() { + while (true) break +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Statements/While/syntax_t04.dart b/Language/Statements/While/syntax_t04.dart index e177711702..fe60cf6fe3 100644 --- a/Language/Statements/While/syntax_t04.dart +++ b/Language/Statements/While/syntax_t04.dart @@ -1,21 +1,21 @@ -// 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 The while statement supports conditional iteration, where the -/// condition is evaluated prior to the loop. -/// whileStatement: -/// while '(' expression ')' statement -/// ; -/// @description Checks that it is a compile-time error if the expression is -/// missing. -/// @author vasya - - -main() { - while () { } -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - +// 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 The while statement supports conditional iteration, where the +/// condition is evaluated prior to the loop. +/// whileStatement: +/// while '(' expression ')' statement +/// ; +/// @description Checks that it is a compile-time error if the expression is +/// missing. +/// @author vasya + + +main() { + while () { } +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + diff --git a/Language/Types/Static_Types/syntax_t01.dart b/Language/Types/Static_Types/syntax_t01.dart index cdf73f852d..d3b6bf0ccd 100644 --- a/Language/Types/Static_Types/syntax_t01.dart +++ b/Language/Types/Static_Types/syntax_t01.dart @@ -1,36 +1,36 @@ -// 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 Static type annotations are used in variable declarations -/// (including formal parameters), in the return types of functions and in the -/// bounds of type variables. Static type annotations are used during static -/// checking -/// type: -/// typeName typeArguments? -/// ; -/// typeName: -/// qualified -/// ; -/// typeArguments: -/// '<' typeList '>' -/// ; -/// typeList: -/// type (',' type)* -/// ; -/// @description Checks that it is a compile-time error when the type arguments -/// in a static type annotation are enclosed in curly brackets instead of angle -/// ones. -/// @author iefremov - - -class Generic { - Generic() {} -} - -main() { - Generic{int} t = new Generic(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Static type annotations are used in variable declarations +/// (including formal parameters), in the return types of functions and in the +/// bounds of type variables. Static type annotations are used during static +/// checking +/// type: +/// typeName typeArguments? +/// ; +/// typeName: +/// qualified +/// ; +/// typeArguments: +/// '<' typeList '>' +/// ; +/// typeList: +/// type (',' type)* +/// ; +/// @description Checks that it is a compile-time error when the type arguments +/// in a static type annotation are enclosed in curly brackets instead of angle +/// ones. +/// @author iefremov + + +class Generic { + Generic() {} +} + +main() { + Generic{int} t = new Generic(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Types/Static_Types/syntax_t02.dart b/Language/Types/Static_Types/syntax_t02.dart index 7856967bca..2c3993292c 100644 --- a/Language/Types/Static_Types/syntax_t02.dart +++ b/Language/Types/Static_Types/syntax_t02.dart @@ -1,35 +1,35 @@ -// 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 Static type annotations are used in variable declarations -/// (including formal parameters), in the return types of functions and in the -/// bounds of type variables. Static type annotations are used during static -/// checking -/// type: -/// typeName typeArguments? -/// ; -/// typeName: -/// qualified -/// ; -/// typeArguments: -/// '<' typeList '>' -/// ; -/// typeList: -/// type (',' type)* -/// ; -/// @description Checks that it is a compile-time error when the opening angle -/// bracket in a static type annotation's type argument list is missing. -/// @author iefremov - - -class Generic { - Generic() {} -} - -main() { - Generic int> t = new Generic(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Static type annotations are used in variable declarations +/// (including formal parameters), in the return types of functions and in the +/// bounds of type variables. Static type annotations are used during static +/// checking +/// type: +/// typeName typeArguments? +/// ; +/// typeName: +/// qualified +/// ; +/// typeArguments: +/// '<' typeList '>' +/// ; +/// typeList: +/// type (',' type)* +/// ; +/// @description Checks that it is a compile-time error when the opening angle +/// bracket in a static type annotation's type argument list is missing. +/// @author iefremov + + +class Generic { + Generic() {} +} + +main() { + Generic int> t = new Generic(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Types/Static_Types/syntax_t03.dart b/Language/Types/Static_Types/syntax_t03.dart index 7168d1a449..35ccdda0ce 100644 --- a/Language/Types/Static_Types/syntax_t03.dart +++ b/Language/Types/Static_Types/syntax_t03.dart @@ -1,35 +1,35 @@ -// 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 Static type annotations are used in variable declarations -/// (including formal parameters), in the return types of functions and in the -/// bounds of type variables. Static type annotations are used during static -/// checking -/// type: -/// typeName typeArguments? -/// ; -/// typeName: -/// qualified -/// ; -/// typeArguments: -/// '<' typeList '>' -/// ; -/// typeList: -/// type (',' type)* -/// ; -/// @description Checks that it is a compile-time error when the closing angle -/// bracket in a static type annotation's type argument list is missing. -/// @author iefremov - - -class Generic { - Generic() {} -} - -main() { - Generic (); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Static type annotations are used in variable declarations +/// (including formal parameters), in the return types of functions and in the +/// bounds of type variables. Static type annotations are used during static +/// checking +/// type: +/// typeName typeArguments? +/// ; +/// typeName: +/// qualified +/// ; +/// typeArguments: +/// '<' typeList '>' +/// ; +/// typeList: +/// type (',' type)* +/// ; +/// @description Checks that it is a compile-time error when the closing angle +/// bracket in a static type annotation's type argument list is missing. +/// @author iefremov + + +class Generic { + Generic() {} +} + +main() { + Generic (); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Types/Static_Types/syntax_t04.dart b/Language/Types/Static_Types/syntax_t04.dart index ad81f3b428..23cfdc5331 100644 --- a/Language/Types/Static_Types/syntax_t04.dart +++ b/Language/Types/Static_Types/syntax_t04.dart @@ -1,35 +1,35 @@ -// 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 Static type annotations are used in variable declarations -/// (including formal parameters), in the return types of functions and in the -/// bounds of type variables. Static type annotations are used during static -/// checking -/// type: -/// typeName typeArguments? -/// ; -/// typeName: -/// qualified -/// ; -/// typeArguments: -/// '<' typeList '>' -/// ; -/// typeList: -/// type (',' type)* -/// ; -/// @description Checks that it is a compile-time error when the list of type -/// arguments in a static type annotation is empty. -/// @author iefremov - - -class Generic { - Generic() {} -} - -main() { - Generic <>? t; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Static type annotations are used in variable declarations +/// (including formal parameters), in the return types of functions and in the +/// bounds of type variables. Static type annotations are used during static +/// checking +/// type: +/// typeName typeArguments? +/// ; +/// typeName: +/// qualified +/// ; +/// typeArguments: +/// '<' typeList '>' +/// ; +/// typeList: +/// type (',' type)* +/// ; +/// @description Checks that it is a compile-time error when the list of type +/// arguments in a static type annotation is empty. +/// @author iefremov + + +class Generic { + Generic() {} +} + +main() { + Generic <>? t; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Types/Static_Types/syntax_t05.dart b/Language/Types/Static_Types/syntax_t05.dart index a2e76a54f8..44d52582fa 100644 --- a/Language/Types/Static_Types/syntax_t05.dart +++ b/Language/Types/Static_Types/syntax_t05.dart @@ -1,35 +1,35 @@ -// 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 Static type annotations are used in variable declarations -/// (including formal parameters), in the return types of functions and in the -/// bounds of type variables. Static type annotations are used during static -/// checking -/// type: -/// typeName typeArguments? -/// ; -/// typeName: -/// qualified -/// ; -/// typeArguments: -/// '<' typeList '>' -/// ; -/// typeList: -/// type (',' type)* -/// ; -/// @description Checks that it is a compile-time error when the type arguments -/// are only space delimited. -/// @author iefremov - - -class G { - G() {} -} - -main() { - G? g; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Static type annotations are used in variable declarations +/// (including formal parameters), in the return types of functions and in the +/// bounds of type variables. Static type annotations are used during static +/// checking +/// type: +/// typeName typeArguments? +/// ; +/// typeName: +/// qualified +/// ; +/// typeArguments: +/// '<' typeList '>' +/// ; +/// typeList: +/// type (',' type)* +/// ; +/// @description Checks that it is a compile-time error when the type arguments +/// are only space delimited. +/// @author iefremov + + +class G { + G() {} +} + +main() { + G? g; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Types/Static_Types/syntax_t07.dart b/Language/Types/Static_Types/syntax_t07.dart index 8fe5d5cfe1..a76d468648 100644 --- a/Language/Types/Static_Types/syntax_t07.dart +++ b/Language/Types/Static_Types/syntax_t07.dart @@ -1,35 +1,35 @@ -// 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 Static type annotations are used in variable declarations -/// (including formal parameters), in the return types of functions and in the -/// bounds of type variables. Static type annotations are used during static -/// checking -/// type: -/// typeName typeArguments? -/// ; -/// typeName: -/// qualified -/// ; -/// typeArguments: -/// '<' typeList '>' -/// ; -/// typeList: -/// type (',' type)* -/// ; -/// @description Checks that a generic type can not be parameterized with -/// non-type (using null). -/// @author iefremov - - -class G { - G() {} -} - -main() { - G? t; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 Static type annotations are used in variable declarations +/// (including formal parameters), in the return types of functions and in the +/// bounds of type variables. Static type annotations are used during static +/// checking +/// type: +/// typeName typeArguments? +/// ; +/// typeName: +/// qualified +/// ; +/// typeArguments: +/// '<' typeList '>' +/// ; +/// typeList: +/// type (',' type)* +/// ; +/// @description Checks that a generic type can not be parameterized with +/// non-type (using null). +/// @author iefremov + + +class G { + G() {} +} + +main() { + G? t; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Types/Type_Aliases/param_default_value_t01.dart b/Language/Types/Type_Aliases/param_default_value_t01.dart index 966a8a4b97..88b889634c 100644 --- a/Language/Types/Type_Aliases/param_default_value_t01.dart +++ b/Language/Types/Type_Aliases/param_default_value_t01.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if any default values are specified in -/// the signature of function type alias. -/// @description Checks that a compile error is produced when a null default -/// value is specified for a required argument in a function type alias. -/// @author iefremov, sgrekhov@unipro.ru - - -typedef F(var a = null); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if any default values are specified in +/// the signature of function type alias. +/// @description Checks that a compile error is produced when a null default +/// value is specified for a required argument in a function type alias. +/// @author iefremov, sgrekhov@unipro.ru + + +typedef F(var a = null); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Types/Type_Aliases/param_default_value_t02.dart b/Language/Types/Type_Aliases/param_default_value_t02.dart index 5ab03a1114..b4ab3ae69e 100644 --- a/Language/Types/Type_Aliases/param_default_value_t02.dart +++ b/Language/Types/Type_Aliases/param_default_value_t02.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if any default values are specified in -/// the signature of function type alias. -/// @description Checks that a compile error is produced when a default value is -/// specified for an optional positional argument in a function type alias. -/// @author iefremov,sgrekhov@unipro.ru - - -typedef F([var a = null]); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if any default values are specified in +/// the signature of function type alias. +/// @description Checks that a compile error is produced when a default value is +/// specified for an optional positional argument in a function type alias. +/// @author iefremov,sgrekhov@unipro.ru + + +typedef F([var a = null]); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Types/Type_Aliases/param_default_value_t03.dart b/Language/Types/Type_Aliases/param_default_value_t03.dart index e733cd6e4c..f7cd52cc37 100644 --- a/Language/Types/Type_Aliases/param_default_value_t03.dart +++ b/Language/Types/Type_Aliases/param_default_value_t03.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if any default values are specified in -/// the signature of function type alias. -/// @description Checks that a compile error is produced when a default value is -/// specified for an optional named argument in a function type alias. -/// @author iefremov, sgrekhov@unipro.ru - - -typedef F({var a: null}); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if any default values are specified in +/// the signature of function type alias. +/// @description Checks that a compile error is produced when a default value is +/// specified for an optional named argument in a function type alias. +/// @author iefremov, sgrekhov@unipro.ru + + +typedef F({var a: null}); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Types/Type_Aliases/param_default_value_t04.dart b/Language/Types/Type_Aliases/param_default_value_t04.dart index bcb2d655f3..e38738a7bc 100644 --- a/Language/Types/Type_Aliases/param_default_value_t04.dart +++ b/Language/Types/Type_Aliases/param_default_value_t04.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if any default values are specified in -/// the signature of function type alias. -/// @description Checks that a compile error is produced when a default value is -/// specified for one of the required arguments in a function type alias. -/// @author iefremov, sgrekhov@unipro.ru - - -typedef F(var a, var b, var c, var z = null); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if any default values are specified in +/// the signature of function type alias. +/// @description Checks that a compile error is produced when a default value is +/// specified for one of the required arguments in a function type alias. +/// @author iefremov, sgrekhov@unipro.ru + + +typedef F(var a, var b, var c, var z = null); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Types/Type_Aliases/param_default_value_t05.dart b/Language/Types/Type_Aliases/param_default_value_t05.dart index 04ae7522e2..251f6d6834 100644 --- a/Language/Types/Type_Aliases/param_default_value_t05.dart +++ b/Language/Types/Type_Aliases/param_default_value_t05.dart @@ -1,18 +1,18 @@ -// 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 It is a compile-time error if any default values are specified in -/// the signature of function type alias. -/// @description Checks that a compile error is produced when default values are -/// specified for several parameters in a function type alias. -/// @author iefremov, sgrekhov@unipro.ru - - -typedef F(var a, var b = "", var c = main, var z = null); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 It is a compile-time error if any default values are specified in +/// the signature of function type alias. +/// @description Checks that a compile error is produced when default values are +/// specified for several parameters in a function type alias. +/// @author iefremov, sgrekhov@unipro.ru + + +typedef F(var a, var b = "", var c = main, var z = null); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Types/Type_Aliases/scope.lib.dart b/Language/Types/Type_Aliases/scope.lib.dart index 5ee99a7c32..18fd35a89e 100644 --- a/Language/Types/Type_Aliases/scope.lib.dart +++ b/Language/Types/Type_Aliases/scope.lib.dart @@ -1,18 +1,18 @@ -// Copyright (c) 2019, 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 The effect of a type alias of the form typedef id = T; declared in -/// a library L is to introduce the name id into the scope of L, bound to the -/// type T . -/// @description Checks that type alias of the form typedef id = T; introduces -/// the name id into the scope of L, bound to the type T . -/// @author sgrekhov@unipro.ru - -library scope_lib; - -class A {} -class C {} - -typedef AAlias = A; -typedef CAlias = C; +// Copyright (c) 2019, 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 The effect of a type alias of the form typedef id = T; declared in +/// a library L is to introduce the name id into the scope of L, bound to the +/// type T . +/// @description Checks that type alias of the form typedef id = T; introduces +/// the name id into the scope of L, bound to the type T . +/// @author sgrekhov@unipro.ru + +library scope_lib; + +class A {} +class C {} + +typedef AAlias = A; +typedef CAlias = C; diff --git a/Language/Types/Type_Aliases/scope_t01.dart b/Language/Types/Type_Aliases/scope_t01.dart index 664312d497..70f5ee4ef6 100644 --- a/Language/Types/Type_Aliases/scope_t01.dart +++ b/Language/Types/Type_Aliases/scope_t01.dart @@ -1,78 +1,78 @@ -// Copyright (c) 2019, 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 The effect of a type alias of the form typedef id = T; declared in -/// a library L is to introduce the name id into the scope of L, bound to the -/// type T . -/// @description Checks that type alias of the form typedef id = T; introduces -/// the name id, bound to the type T . -/// @author sgrekhov@unipro.ru - -import "../../../Utils/expect.dart"; - -class A {} -class C {} - -typedef AAlias = A; -typedef CAlias = C; - -class X { - static void s() { - AAlias aa = new A(); - Expect.isTrue(aa is A); - Expect.isTrue(aa is AAlias); - Expect.runtimeIsType(aa); - Expect.runtimeIsType(aa); - - CAlias ca = new C(); - Expect.isTrue(ca is C); - Expect.isTrue(ca is CAlias); - Expect.runtimeIsType>(ca); - Expect.runtimeIsType>(ca); - } - - void m() { - AAlias aa = new A(); - Expect.isTrue(aa is A); - Expect.isTrue(aa is AAlias); - Expect.runtimeIsType(aa); - Expect.runtimeIsType(aa); - - CAlias ca = new C(); - Expect.isTrue(ca is C); - Expect.isTrue(ca is CAlias); - Expect.runtimeIsType>(ca); - Expect.runtimeIsType>(ca); - } -} - -test() { - AAlias aa = new A(); - Expect.isTrue(aa is A); - Expect.isTrue(aa is AAlias); - - CAlias ca = new C(); - Expect.isTrue(ca is C); - Expect.isTrue(ca is CAlias); - Expect.runtimeIsType>(ca); - Expect.runtimeIsType>(ca); -} - -main() { - AAlias aa = new A(); - Expect.isTrue(aa is A); - Expect.isTrue(aa is AAlias); - Expect.runtimeIsType(aa); - Expect.runtimeIsType(aa); - - CAlias ca = new C(); - Expect.isTrue(ca is C); - Expect.isTrue(ca is CAlias); - Expect.runtimeIsType>(ca); - Expect.runtimeIsType>(ca); - - test(); - X.s(); - new X().m(); -} +// Copyright (c) 2019, 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 The effect of a type alias of the form typedef id = T; declared in +/// a library L is to introduce the name id into the scope of L, bound to the +/// type T . +/// @description Checks that type alias of the form typedef id = T; introduces +/// the name id, bound to the type T . +/// @author sgrekhov@unipro.ru + +import "../../../Utils/expect.dart"; + +class A {} +class C {} + +typedef AAlias = A; +typedef CAlias = C; + +class X { + static void s() { + AAlias aa = new A(); + Expect.isTrue(aa is A); + Expect.isTrue(aa is AAlias); + Expect.runtimeIsType(aa); + Expect.runtimeIsType(aa); + + CAlias ca = new C(); + Expect.isTrue(ca is C); + Expect.isTrue(ca is CAlias); + Expect.runtimeIsType>(ca); + Expect.runtimeIsType>(ca); + } + + void m() { + AAlias aa = new A(); + Expect.isTrue(aa is A); + Expect.isTrue(aa is AAlias); + Expect.runtimeIsType(aa); + Expect.runtimeIsType(aa); + + CAlias ca = new C(); + Expect.isTrue(ca is C); + Expect.isTrue(ca is CAlias); + Expect.runtimeIsType>(ca); + Expect.runtimeIsType>(ca); + } +} + +test() { + AAlias aa = new A(); + Expect.isTrue(aa is A); + Expect.isTrue(aa is AAlias); + + CAlias ca = new C(); + Expect.isTrue(ca is C); + Expect.isTrue(ca is CAlias); + Expect.runtimeIsType>(ca); + Expect.runtimeIsType>(ca); +} + +main() { + AAlias aa = new A(); + Expect.isTrue(aa is A); + Expect.isTrue(aa is AAlias); + Expect.runtimeIsType(aa); + Expect.runtimeIsType(aa); + + CAlias ca = new C(); + Expect.isTrue(ca is C); + Expect.isTrue(ca is CAlias); + Expect.runtimeIsType>(ca); + Expect.runtimeIsType>(ca); + + test(); + X.s(); + new X().m(); +} diff --git a/Language/Types/Type_Aliases/scope_t02.dart b/Language/Types/Type_Aliases/scope_t02.dart index 4133db45da..5a943698b6 100644 --- a/Language/Types/Type_Aliases/scope_t02.dart +++ b/Language/Types/Type_Aliases/scope_t02.dart @@ -1,39 +1,39 @@ -// Copyright (c) 2019, 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 The effect of a type alias of the form typedef id = T; declared in -/// a library L is to introduce the name id into the scope of L, bound to the -/// type T . -/// @description Checks that it is a compile error if id is not unique -/// @author sgrekhov@unipro.ru - -class A {} -class C {} - -typedef AAlias = A; -typedef CAlias = C; - -typedef AAlias = A; -// ^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -typedef AAlias = C; -// ^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -typedef CAlias = C; -// ^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -typedef CAlias = C; -// ^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -typedef CAlias = C; -// ^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2019, 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 The effect of a type alias of the form typedef id = T; declared in +/// a library L is to introduce the name id into the scope of L, bound to the +/// type T . +/// @description Checks that it is a compile error if id is not unique +/// @author sgrekhov@unipro.ru + +class A {} +class C {} + +typedef AAlias = A; +typedef CAlias = C; + +typedef AAlias = A; +// ^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +typedef AAlias = C; +// ^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +typedef CAlias = C; +// ^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +typedef CAlias = C; +// ^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +typedef CAlias = C; +// ^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Types/Type_Aliases/scope_t03.dart b/Language/Types/Type_Aliases/scope_t03.dart index 216e522643..a27f74ca20 100644 --- a/Language/Types/Type_Aliases/scope_t03.dart +++ b/Language/Types/Type_Aliases/scope_t03.dart @@ -1,75 +1,75 @@ -// Copyright (c) 2019, 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 The effect of a type alias of the form typedef id = T; declared in -/// a library L is to introduce the name id into the scope of L, bound to the -/// type T . -/// @description Checks that type alias of the form typedef id = T; introduces -/// the name id into the scope of L, bound to the type T . -/// @author sgrekhov@unipro.ru - -import "../../../Utils/expect.dart"; -import "scope.lib.dart"; - -class X { - static void s() { - AAlias aa = new A(); - Expect.isTrue(aa is A); - Expect.isTrue(aa is AAlias); - Expect.runtimeIsType(aa); - Expect.runtimeIsType(aa); - - CAlias ca = new C(); - Expect.isTrue(ca is C); - Expect.isTrue(ca is CAlias); - Expect.runtimeIsType>(ca); - Expect.runtimeIsType>(ca); - } - - void m() { - AAlias aa = new A(); - Expect.isTrue(aa is A); - Expect.isTrue(aa is AAlias); - Expect.runtimeIsType(aa); - Expect.runtimeIsType(aa); - - CAlias ca = new C(); - Expect.isTrue(ca is C); - Expect.isTrue(ca is CAlias); - Expect.runtimeIsType>(ca); - Expect.runtimeIsType>(ca); - } -} - -test() { - AAlias aa = new A(); - Expect.isTrue(aa is A); - Expect.isTrue(aa is AAlias); - Expect.runtimeIsType(aa); - Expect.runtimeIsType(aa); - - CAlias ca = new C(); - Expect.isTrue(ca is C); - Expect.isTrue(ca is CAlias); - Expect.runtimeIsType>(ca); - Expect.runtimeIsType>(ca); -} - -main() { - AAlias aa = new A(); - Expect.isTrue(aa is A); - Expect.isTrue(aa is AAlias); - Expect.runtimeIsType(aa); - Expect.runtimeIsType(aa); - - CAlias ca = new C(); - Expect.isTrue(ca is C); - Expect.isTrue(ca is CAlias); - Expect.runtimeIsType>(ca); - Expect.runtimeIsType>(ca); - - test(); - X.s(); - new X().m(); -} +// Copyright (c) 2019, 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 The effect of a type alias of the form typedef id = T; declared in +/// a library L is to introduce the name id into the scope of L, bound to the +/// type T . +/// @description Checks that type alias of the form typedef id = T; introduces +/// the name id into the scope of L, bound to the type T . +/// @author sgrekhov@unipro.ru + +import "../../../Utils/expect.dart"; +import "scope.lib.dart"; + +class X { + static void s() { + AAlias aa = new A(); + Expect.isTrue(aa is A); + Expect.isTrue(aa is AAlias); + Expect.runtimeIsType(aa); + Expect.runtimeIsType(aa); + + CAlias ca = new C(); + Expect.isTrue(ca is C); + Expect.isTrue(ca is CAlias); + Expect.runtimeIsType>(ca); + Expect.runtimeIsType>(ca); + } + + void m() { + AAlias aa = new A(); + Expect.isTrue(aa is A); + Expect.isTrue(aa is AAlias); + Expect.runtimeIsType(aa); + Expect.runtimeIsType(aa); + + CAlias ca = new C(); + Expect.isTrue(ca is C); + Expect.isTrue(ca is CAlias); + Expect.runtimeIsType>(ca); + Expect.runtimeIsType>(ca); + } +} + +test() { + AAlias aa = new A(); + Expect.isTrue(aa is A); + Expect.isTrue(aa is AAlias); + Expect.runtimeIsType(aa); + Expect.runtimeIsType(aa); + + CAlias ca = new C(); + Expect.isTrue(ca is C); + Expect.isTrue(ca is CAlias); + Expect.runtimeIsType>(ca); + Expect.runtimeIsType>(ca); +} + +main() { + AAlias aa = new A(); + Expect.isTrue(aa is A); + Expect.isTrue(aa is AAlias); + Expect.runtimeIsType(aa); + Expect.runtimeIsType(aa); + + CAlias ca = new C(); + Expect.isTrue(ca is C); + Expect.isTrue(ca is CAlias); + Expect.runtimeIsType>(ca); + Expect.runtimeIsType>(ca); + + test(); + X.s(); + new X().m(); +} diff --git a/Language/Types/Type_Aliases/scope_t04.dart b/Language/Types/Type_Aliases/scope_t04.dart index e32421fa30..64fb3f6a12 100644 --- a/Language/Types/Type_Aliases/scope_t04.dart +++ b/Language/Types/Type_Aliases/scope_t04.dart @@ -1,19 +1,19 @@ -// Copyright (c) 2019, 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 The effect of a type alias of the form typedef id = T; declared in -/// a library L is to introduce the name id into the scope of L, bound to the -/// type T . -/// @description Checks that it is not an error if type alias id shadows type -/// alias with the same id in imported library -/// @author sgrekhov@unipro.ru -/// @issue 42640 - -import "scope.lib.dart"; - -typedef AAlias = A; -typedef CAlias = C; - -main() { -} +// Copyright (c) 2019, 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 The effect of a type alias of the form typedef id = T; declared in +/// a library L is to introduce the name id into the scope of L, bound to the +/// type T . +/// @description Checks that it is not an error if type alias id shadows type +/// alias with the same id in imported library +/// @author sgrekhov@unipro.ru +/// @issue 42640 + +import "scope.lib.dart"; + +typedef AAlias = A; +typedef CAlias = C; + +main() { +} diff --git a/Language/Types/Type_Aliases/self_reference_t01.dart b/Language/Types/Type_Aliases/self_reference_t01.dart index 77cb8ff31e..f0012309fe 100644 --- a/Language/Types/Type_Aliases/self_reference_t01.dart +++ b/Language/Types/Type_Aliases/self_reference_t01.dart @@ -1,19 +1,19 @@ -// 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 Any self reference in a typedef, either directly, or recursively -/// via another typedef, is a compile time error. -/// @description Checks that self-referencing typedef is not allowed (return -/// value type annotation has the same name as the type alias). -/// @author msyabro -/// @issue 46062 - -typedef F F(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is F; -} +// 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 Any self reference in a typedef, either directly, or recursively +/// via another typedef, is a compile time error. +/// @description Checks that self-referencing typedef is not allowed (return +/// value type annotation has the same name as the type alias). +/// @author msyabro +/// @issue 46062 + +typedef F F(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is F; +} diff --git a/Language/Types/Type_Aliases/self_reference_t02.dart b/Language/Types/Type_Aliases/self_reference_t02.dart index 712bb6e077..88a6e375dd 100644 --- a/Language/Types/Type_Aliases/self_reference_t02.dart +++ b/Language/Types/Type_Aliases/self_reference_t02.dart @@ -1,19 +1,19 @@ -// 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 Any self reference in a typedef, either directly, or recursively -/// via another typedef, is a compile time error. -/// @description Checks that self-referencing typedef is not allowed (positional -/// formal parameter type annotation has the same name as the type alias). -/// @author iefremov -/// @issue 46062 - -typedef F(F x); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is F; -} +// 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 Any self reference in a typedef, either directly, or recursively +/// via another typedef, is a compile time error. +/// @description Checks that self-referencing typedef is not allowed (positional +/// formal parameter type annotation has the same name as the type alias). +/// @author iefremov +/// @issue 46062 + +typedef F(F x); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is F; +} diff --git a/Language/Types/Type_Aliases/self_reference_t03.dart b/Language/Types/Type_Aliases/self_reference_t03.dart index d5daefa539..62caea20c4 100644 --- a/Language/Types/Type_Aliases/self_reference_t03.dart +++ b/Language/Types/Type_Aliases/self_reference_t03.dart @@ -1,19 +1,19 @@ -// 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 Any self reference in a typedef, either directly, or recursively -/// via another typedef, is a compile time error. -/// @description Checks that self-referencing typedef is not allowed (positional -/// optional parameter type annotation has the same name as the type alias). -/// @author iefremov -/// @issue 46062 - -typedef F([F x]); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is F; -} +// 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 Any self reference in a typedef, either directly, or recursively +/// via another typedef, is a compile time error. +/// @description Checks that self-referencing typedef is not allowed (positional +/// optional parameter type annotation has the same name as the type alias). +/// @author iefremov +/// @issue 46062 + +typedef F([F x]); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is F; +} diff --git a/Language/Types/Type_Aliases/self_reference_t04.dart b/Language/Types/Type_Aliases/self_reference_t04.dart index 393773cc14..0be3ed82d8 100644 --- a/Language/Types/Type_Aliases/self_reference_t04.dart +++ b/Language/Types/Type_Aliases/self_reference_t04.dart @@ -1,19 +1,19 @@ -// 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 Any self reference in a typedef, either directly, or recursively -/// via another typedef, is a compile time error. -/// @description Checks that self-referencing typedef is not allowed (named -/// optional parameter type annotation has the same name as the type alias). -/// @author iefremov -/// @issue 46062 - -typedef F({F x}); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - null is F; -} +// 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 Any self reference in a typedef, either directly, or recursively +/// via another typedef, is a compile time error. +/// @description Checks that self-referencing typedef is not allowed (named +/// optional parameter type annotation has the same name as the type alias). +/// @author iefremov +/// @issue 46062 + +typedef F({F x}); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + null is F; +} diff --git a/Language/Types/Type_Aliases/self_reference_t08.dart b/Language/Types/Type_Aliases/self_reference_t08.dart index e1f11fee4e..3556c019f2 100644 --- a/Language/Types/Type_Aliases/self_reference_t08.dart +++ b/Language/Types/Type_Aliases/self_reference_t08.dart @@ -1,19 +1,19 @@ -// 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 Any self reference in a typedef, either directly, or recursively -/// via another typedef, is a compile time error. -/// @description Checks that it is compile error to reference type alias as a -/// bound of its own type parameter. -/// @author ilya -/// @issue 46062 - -typedef F(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - F? x; -} +// 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 Any self reference in a typedef, either directly, or recursively +/// via another typedef, is a compile time error. +/// @description Checks that it is compile error to reference type alias as a +/// bound of its own type parameter. +/// @author ilya +/// @issue 46062 + +typedef F(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + F? x; +} diff --git a/Language/Types/Type_Aliases/self_reference_t09.dart b/Language/Types/Type_Aliases/self_reference_t09.dart index 10938e69c5..478831a656 100644 --- a/Language/Types/Type_Aliases/self_reference_t09.dart +++ b/Language/Types/Type_Aliases/self_reference_t09.dart @@ -1,19 +1,19 @@ -// 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 Any self reference in a typedef, either directly, or recursively -/// via another typedef, is a compile time error. -/// @description Checks that it is compile error to reference type alias in a -/// bound of its own type parameter. -/// @author ilya -/// @issue 46062 - - typedef F>(); -//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - F? x; -} +// 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 Any self reference in a typedef, either directly, or recursively +/// via another typedef, is a compile time error. +/// @description Checks that it is compile error to reference type alias in a +/// bound of its own type parameter. +/// @author ilya +/// @issue 46062 + + typedef F>(); +//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + F? x; +} diff --git a/Language/Types/Type_Aliases/self_reference_t10.dart b/Language/Types/Type_Aliases/self_reference_t10.dart index 9481570d9e..7e90a06851 100644 --- a/Language/Types/Type_Aliases/self_reference_t10.dart +++ b/Language/Types/Type_Aliases/self_reference_t10.dart @@ -1,19 +1,19 @@ -// 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 Any self reference in a typedef, either directly, or recursively -/// via another typedef, is a compile time error. -/// @description Checks that it is compile error to reference type alias as a -/// type argument of its formal parameter type. -/// @author ilya -/// @issue 46062 - -typedef F(List x); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - F? x; -} +// 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 Any self reference in a typedef, either directly, or recursively +/// via another typedef, is a compile time error. +/// @description Checks that it is compile error to reference type alias as a +/// type argument of its formal parameter type. +/// @author ilya +/// @issue 46062 + +typedef F(List x); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + F? x; +} diff --git a/Language/Types/Type_Aliases/self_reference_t11.dart b/Language/Types/Type_Aliases/self_reference_t11.dart index 3e4826015b..927913cceb 100644 --- a/Language/Types/Type_Aliases/self_reference_t11.dart +++ b/Language/Types/Type_Aliases/self_reference_t11.dart @@ -1,19 +1,19 @@ -// 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 Any self reference in a typedef, either directly, or recursively -/// via another typedef, is a compile time error. -/// @description Checks that it is compile error to reference type alias as a -/// type argument of its return type. -/// @author ilya -/// @issue 46062 - -typedef List F(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - F? x; -} +// 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 Any self reference in a typedef, either directly, or recursively +/// via another typedef, is a compile time error. +/// @description Checks that it is compile error to reference type alias as a +/// type argument of its return type. +/// @author ilya +/// @issue 46062 + +typedef List F(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + F? x; +} diff --git a/Language/Types/Type_Aliases/self_reference_t12.dart b/Language/Types/Type_Aliases/self_reference_t12.dart index 7a411c23cb..47c1969e17 100644 --- a/Language/Types/Type_Aliases/self_reference_t12.dart +++ b/Language/Types/Type_Aliases/self_reference_t12.dart @@ -1,19 +1,19 @@ -// 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 Any self reference in a typedef, either directly, or recursively -/// via another typedef, is a compile time error. -/// @description Checks that it is compile error to reference type alias with a -/// type parameter as its formal parameter type. -/// @author ilya -/// @issue 46062 - -typedef F(F x); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - F? x; -} +// 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 Any self reference in a typedef, either directly, or recursively +/// via another typedef, is a compile time error. +/// @description Checks that it is compile error to reference type alias with a +/// type parameter as its formal parameter type. +/// @author ilya +/// @issue 46062 + +typedef F(F x); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + F? x; +} diff --git a/Language/Types/Type_Aliases/self_reference_t13.dart b/Language/Types/Type_Aliases/self_reference_t13.dart index 33f26cd6f7..e8d51d22f0 100644 --- a/Language/Types/Type_Aliases/self_reference_t13.dart +++ b/Language/Types/Type_Aliases/self_reference_t13.dart @@ -1,19 +1,19 @@ -// 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 Any self reference in a typedef, either directly, or recursively -/// via another typedef, is a compile time error. -/// @description Checks that it is compile error to reference type alias with a -/// type parameter as its return type. -/// @author ilya -/// @issue 46062 - -typedef F F(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - F? x; -} +// 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 Any self reference in a typedef, either directly, or recursively +/// via another typedef, is a compile time error. +/// @description Checks that it is compile error to reference type alias with a +/// type parameter as its return type. +/// @author ilya +/// @issue 46062 + +typedef F F(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + F? x; +} diff --git a/Language/Types/Type_Aliases/self_reference_t14.dart b/Language/Types/Type_Aliases/self_reference_t14.dart index 1667f7ba34..2997e20251 100644 --- a/Language/Types/Type_Aliases/self_reference_t14.dart +++ b/Language/Types/Type_Aliases/self_reference_t14.dart @@ -1,22 +1,22 @@ -// 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 Any self reference in a typedef, either directly, or recursively -/// via another typedef, is a compile time error. -/// @description Checks that it is compile error if two typedefs are mutually -/// recursive via their formal parameter types. -/// @author ilya -/// @issue 46062 - -typedef F(G x); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -typedef G(F x); -//^ -// [analyzer] unspecified - -main() { - F? x; -} +// 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 Any self reference in a typedef, either directly, or recursively +/// via another typedef, is a compile time error. +/// @description Checks that it is compile error if two typedefs are mutually +/// recursive via their formal parameter types. +/// @author ilya +/// @issue 46062 + +typedef F(G x); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +typedef G(F x); +//^ +// [analyzer] unspecified + +main() { + F? x; +} diff --git a/Language/Types/Type_Aliases/self_reference_t15.dart b/Language/Types/Type_Aliases/self_reference_t15.dart index 641209f70b..9c55a27936 100644 --- a/Language/Types/Type_Aliases/self_reference_t15.dart +++ b/Language/Types/Type_Aliases/self_reference_t15.dart @@ -1,22 +1,22 @@ -// 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 Any self reference in a typedef, either directly, or recursively -/// via another typedef, is a compile time error. -/// @description Checks that it is compile error if two typedefs are mutually -/// recursive via their return types. -/// @author ilya -/// @issue 46062 - -typedef G F(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -typedef F G(); -//^ -// [analyzer] unspecified - -main() { - F? x; -} +// 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 Any self reference in a typedef, either directly, or recursively +/// via another typedef, is a compile time error. +/// @description Checks that it is compile error if two typedefs are mutually +/// recursive via their return types. +/// @author ilya +/// @issue 46062 + +typedef G F(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +typedef F G(); +//^ +// [analyzer] unspecified + +main() { + F? x; +} diff --git a/Language/Types/Type_Aliases/self_reference_t16.dart b/Language/Types/Type_Aliases/self_reference_t16.dart index 0445d92b0a..5c3b60fd55 100644 --- a/Language/Types/Type_Aliases/self_reference_t16.dart +++ b/Language/Types/Type_Aliases/self_reference_t16.dart @@ -1,25 +1,25 @@ -// 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 Any self reference in a typedef, either directly, or recursively -/// via another typedef, is a compile time error. -/// @description Checks that it is compile error if more than two typedefs are -/// mutually recursive. -/// @author sgrekhov@unipro.ru -/// @issue 46062 - -typedef void F(G g); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -typedef H G(); -//^ -// [analyzer] unspecified -typedef void H(List f); -//^ -// [analyzer] unspecified - -main() { - F? x; -} +// 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 Any self reference in a typedef, either directly, or recursively +/// via another typedef, is a compile time error. +/// @description Checks that it is compile error if more than two typedefs are +/// mutually recursive. +/// @author sgrekhov@unipro.ru +/// @issue 46062 + +typedef void F(G g); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +typedef H G(); +//^ +// [analyzer] unspecified +typedef void H(List f); +//^ +// [analyzer] unspecified + +main() { + F? x; +} diff --git a/Language/Types/Type_Aliases/self_reference_t17.dart b/Language/Types/Type_Aliases/self_reference_t17.dart index 95fd2c27ab..e6b921d65f 100644 --- a/Language/Types/Type_Aliases/self_reference_t17.dart +++ b/Language/Types/Type_Aliases/self_reference_t17.dart @@ -1,22 +1,22 @@ -// 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 Any self reference in a typedef, either directly, or recursively -/// via another typedef, is a compile time error. -/// @description Checks that it is compile error if two typedefs are mutually -/// recursive via their parameters types. -/// @author sgrekhov@unipro.ru -/// @issue 46062 - -typedef void F(G g); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -typedef void G(List f); -//^ -// [analyzer] unspecified - -main() { - F? x; -} +// 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 Any self reference in a typedef, either directly, or recursively +/// via another typedef, is a compile time error. +/// @description Checks that it is compile error if two typedefs are mutually +/// recursive via their parameters types. +/// @author sgrekhov@unipro.ru +/// @issue 46062 + +typedef void F(G g); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +typedef void G(List f); +//^ +// [analyzer] unspecified + +main() { + F? x; +} diff --git a/Language/Types/Type_Aliases/self_reference_t19.dart b/Language/Types/Type_Aliases/self_reference_t19.dart index ac93973e8a..1c213b132c 100644 --- a/Language/Types/Type_Aliases/self_reference_t19.dart +++ b/Language/Types/Type_Aliases/self_reference_t19.dart @@ -1,22 +1,22 @@ -// Copyright (c) 2019, 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 Any self reference in a type alias, either directly or recursively -/// via another type declaration, is a compile-time error -/// @description Checks that any self reference in a type alias is a compile-time -/// error. Test recursive reference -/// @author sgrekhov@unipro.ru - -class C {} - -typedef CAlias1 = C; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -typedef CAlias2 = C; -// ^ -// [analyzer] unspecified - -main() { -} +// Copyright (c) 2019, 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 Any self reference in a type alias, either directly or recursively +/// via another type declaration, is a compile-time error +/// @description Checks that any self reference in a type alias is a compile-time +/// error. Test recursive reference +/// @author sgrekhov@unipro.ru + +class C {} + +typedef CAlias1 = C; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +typedef CAlias2 = C; +// ^ +// [analyzer] unspecified + +main() { +} diff --git a/Language/Types/Type_Aliases/self_reference_t20.dart b/Language/Types/Type_Aliases/self_reference_t20.dart index 0bbcef655a..e42ce76383 100644 --- a/Language/Types/Type_Aliases/self_reference_t20.dart +++ b/Language/Types/Type_Aliases/self_reference_t20.dart @@ -1,26 +1,26 @@ -// Copyright (c) 2019, 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 Any self reference in a type alias, either directly or recursively -/// via another type declaration, is a compile-time error -/// @description Checks that any self reference in a type alias is a compile-time -/// error. Test recursive reference -/// @author sgrekhov@unipro.ru - -class C {} - -typedef CAlias1 = C; -typedef CAlias2 = CAlias1; -//^ -// [analyzer] unspecified -// [cfe] unspecified -typedef CAlias3 = CAlias2; -//^ -// [analyzer] unspecified -typedef CAlias4 = CAlias3; -//^ -// [analyzer] unspecified - -main() { -} +// Copyright (c) 2019, 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 Any self reference in a type alias, either directly or recursively +/// via another type declaration, is a compile-time error +/// @description Checks that any self reference in a type alias is a compile-time +/// error. Test recursive reference +/// @author sgrekhov@unipro.ru + +class C {} + +typedef CAlias1 = C; +typedef CAlias2 = CAlias1; +//^ +// [analyzer] unspecified +// [cfe] unspecified +typedef CAlias3 = CAlias2; +//^ +// [analyzer] unspecified +typedef CAlias4 = CAlias3; +//^ +// [analyzer] unspecified + +main() { +} diff --git a/Language/Types/Type_Aliases/syntax_t01.dart b/Language/Types/Type_Aliases/syntax_t01.dart index 58a1e6bf7b..d6c8bb6391 100644 --- a/Language/Types/Type_Aliases/syntax_t01.dart +++ b/Language/Types/Type_Aliases/syntax_t01.dart @@ -1,28 +1,28 @@ -// Copyright (c) 2019, 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 type alias declares a name for a type expression. -/// ::= typedef ?‘=’ -/// ‘;’ -/// | typedef -/// ::= ‘;’ -/// ::= ? -/// @description Checks that type alias syntax works as expected. Test -/// non-function type alias with no type parameters -/// @author sgrekhov@unipro.ru - -import "../../../Utils/expect.dart"; - -const int meta = 1; - -class C { -} - -@meta typedef CAlias = C; - -main() { - CAlias ca = new CAlias(); - Expect.isTrue(ca is C); - Expect.runtimeIsType(ca); -} +// Copyright (c) 2019, 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 type alias declares a name for a type expression. +/// ::= typedef ?‘=’ +/// ‘;’ +/// | typedef +/// ::= ‘;’ +/// ::= ? +/// @description Checks that type alias syntax works as expected. Test +/// non-function type alias with no type parameters +/// @author sgrekhov@unipro.ru + +import "../../../Utils/expect.dart"; + +const int meta = 1; + +class C { +} + +@meta typedef CAlias = C; + +main() { + CAlias ca = new CAlias(); + Expect.isTrue(ca is C); + Expect.runtimeIsType(ca); +} diff --git a/Language/Types/Type_Aliases/syntax_t02.dart b/Language/Types/Type_Aliases/syntax_t02.dart index fbf580abcf..47f145f605 100644 --- a/Language/Types/Type_Aliases/syntax_t02.dart +++ b/Language/Types/Type_Aliases/syntax_t02.dart @@ -1,61 +1,61 @@ -// Copyright (c) 2019, 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 type alias declares a name for a type expression. -/// ::= typedef ?‘=’ -/// ‘;’ -/// | typedef -/// ::= ‘;’ -/// ::= ? -/// @description Checks that type alias syntax works as expected. Test -/// non-function type alias with type parameters -/// @author sgrekhov@unipro.ru - -import "../../../Utils/expect.dart"; - -const int meta = 1; - -class C { - T t; - C(this.t); -} - -@meta typedef CAlias1 = C; -@meta typedef CAlias2 = C; -typedef CAlias3 = C; -typedef CAlias4 = C; - -main() { - CAlias1 ca1 = new CAlias1(42); - Expect.isTrue(ca1 is C); - Expect.isTrue(ca1.t is dynamic); - Expect.runtimeIsType>(ca1); - Expect.runtimeIsType(ca1.t); - ca1.t = "-1"; - Expect.equals("-1", ca1.t); - - CAlias2 ca2 = new CAlias2(1); - Expect.isTrue(ca2 is C); - Expect.isTrue(ca2.t is int); - Expect.runtimeIsType>(ca2); - Expect.runtimeIsType(ca2.t); - ca2.t = -1; - Expect.equals(-1, ca2.t); - - CAlias3 ca3 = new CAlias3(""); - Expect.isTrue(ca3 is C); - Expect.isTrue(ca3.t is String); - Expect.runtimeIsType>(ca3); - Expect.runtimeIsType(ca3.t); - ca3.t = "Lily was here"; - Expect.equals("Lily was here", ca3.t); - - CAlias4 ca4 = new CAlias4(1); - Expect.isTrue(ca4 is C); - Expect.isTrue(ca4.t is int); - Expect.runtimeIsType>(ca4); - Expect.runtimeIsType(ca4.t); - ca4.t = 42; - Expect.equals(42, ca4.t); -} +// Copyright (c) 2019, 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 type alias declares a name for a type expression. +/// ::= typedef ?‘=’ +/// ‘;’ +/// | typedef +/// ::= ‘;’ +/// ::= ? +/// @description Checks that type alias syntax works as expected. Test +/// non-function type alias with type parameters +/// @author sgrekhov@unipro.ru + +import "../../../Utils/expect.dart"; + +const int meta = 1; + +class C { + T t; + C(this.t); +} + +@meta typedef CAlias1 = C; +@meta typedef CAlias2 = C; +typedef CAlias3 = C; +typedef CAlias4 = C; + +main() { + CAlias1 ca1 = new CAlias1(42); + Expect.isTrue(ca1 is C); + Expect.isTrue(ca1.t is dynamic); + Expect.runtimeIsType>(ca1); + Expect.runtimeIsType(ca1.t); + ca1.t = "-1"; + Expect.equals("-1", ca1.t); + + CAlias2 ca2 = new CAlias2(1); + Expect.isTrue(ca2 is C); + Expect.isTrue(ca2.t is int); + Expect.runtimeIsType>(ca2); + Expect.runtimeIsType(ca2.t); + ca2.t = -1; + Expect.equals(-1, ca2.t); + + CAlias3 ca3 = new CAlias3(""); + Expect.isTrue(ca3 is C); + Expect.isTrue(ca3.t is String); + Expect.runtimeIsType>(ca3); + Expect.runtimeIsType(ca3.t); + ca3.t = "Lily was here"; + Expect.equals("Lily was here", ca3.t); + + CAlias4 ca4 = new CAlias4(1); + Expect.isTrue(ca4 is C); + Expect.isTrue(ca4.t is int); + Expect.runtimeIsType>(ca4); + Expect.runtimeIsType(ca4.t); + ca4.t = 42; + Expect.equals(42, ca4.t); +} diff --git a/Language/Types/Type_Aliases/syntax_t03.dart b/Language/Types/Type_Aliases/syntax_t03.dart index b37ab47d85..5d69a6bcdf 100644 --- a/Language/Types/Type_Aliases/syntax_t03.dart +++ b/Language/Types/Type_Aliases/syntax_t03.dart @@ -1,63 +1,63 @@ -// Copyright (c) 2019, 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 type alias declares a name for a type expression. -/// ::= typedef ?‘=’ -/// ‘;’ -/// | typedef -/// ::= ‘;’ -/// ::= ? -/// @description Checks that type alias syntax works as expected. Test -/// non-function type alias with type parameters -/// @author sgrekhov@unipro.ru - -import "../../../Utils/expect.dart"; - -const int meta = 1; - -class C { - T1 t1; - T2 t2; - C(this.t1, this.t2); -} - -@meta typedef CAlias1 = C; -@meta typedef CAlias2 = C; -typedef CAlias3 = C; - -main() { - CAlias1 ca1 = new CAlias1(3.14, "3.14"); - Expect.isTrue(ca1 is C); - Expect.isTrue(ca1.t1 is num); - Expect.isTrue(ca1.t2 is dynamic); - Expect.runtimeIsType>(ca1); - Expect.runtimeIsType(ca1.t1); - Expect.runtimeIsType(ca1.t2); - ca1.t1 = 42; - Expect.equals(42, ca1.t1); - - CAlias2 ca2 = new CAlias2(42, ""); - Expect.isTrue(ca2 is C); - Expect.isTrue(ca2.t1 is int); - Expect.isTrue(ca2.t2 is String); - Expect.runtimeIsType>(ca2); - Expect.runtimeIsType(ca2.t1); - Expect.runtimeIsType(ca2.t2); - ca2.t1 = -1; - Expect.equals(-1, ca2.t1); - ca2.t2 = "Lily was here"; - Expect.equals("Lily was here", ca2.t2); - - CAlias3 ca3 = new CAlias3(42, ""); - Expect.isTrue(ca3 is C); - Expect.isTrue(ca3.t1 is int); - Expect.isTrue(ca3.t2 is String); - Expect.runtimeIsType>(ca3); - Expect.runtimeIsType(ca3.t1); - Expect.runtimeIsType(ca3.t2); - ca3.t1 = -1; - Expect.equals(-1, ca3.t1); - ca3.t2 = "Lily was here"; - Expect.equals("Lily was here", ca3.t2); -} +// Copyright (c) 2019, 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 type alias declares a name for a type expression. +/// ::= typedef ?‘=’ +/// ‘;’ +/// | typedef +/// ::= ‘;’ +/// ::= ? +/// @description Checks that type alias syntax works as expected. Test +/// non-function type alias with type parameters +/// @author sgrekhov@unipro.ru + +import "../../../Utils/expect.dart"; + +const int meta = 1; + +class C { + T1 t1; + T2 t2; + C(this.t1, this.t2); +} + +@meta typedef CAlias1 = C; +@meta typedef CAlias2 = C; +typedef CAlias3 = C; + +main() { + CAlias1 ca1 = new CAlias1(3.14, "3.14"); + Expect.isTrue(ca1 is C); + Expect.isTrue(ca1.t1 is num); + Expect.isTrue(ca1.t2 is dynamic); + Expect.runtimeIsType>(ca1); + Expect.runtimeIsType(ca1.t1); + Expect.runtimeIsType(ca1.t2); + ca1.t1 = 42; + Expect.equals(42, ca1.t1); + + CAlias2 ca2 = new CAlias2(42, ""); + Expect.isTrue(ca2 is C); + Expect.isTrue(ca2.t1 is int); + Expect.isTrue(ca2.t2 is String); + Expect.runtimeIsType>(ca2); + Expect.runtimeIsType(ca2.t1); + Expect.runtimeIsType(ca2.t2); + ca2.t1 = -1; + Expect.equals(-1, ca2.t1); + ca2.t2 = "Lily was here"; + Expect.equals("Lily was here", ca2.t2); + + CAlias3 ca3 = new CAlias3(42, ""); + Expect.isTrue(ca3 is C); + Expect.isTrue(ca3.t1 is int); + Expect.isTrue(ca3.t2 is String); + Expect.runtimeIsType>(ca3); + Expect.runtimeIsType(ca3.t1); + Expect.runtimeIsType(ca3.t2); + ca3.t1 = -1; + Expect.equals(-1, ca3.t1); + ca3.t2 = "Lily was here"; + Expect.equals("Lily was here", ca3.t2); +} diff --git a/Language/Types/Type_Aliases/syntax_t04.dart b/Language/Types/Type_Aliases/syntax_t04.dart index 927f9659af..fedd73b178 100644 --- a/Language/Types/Type_Aliases/syntax_t04.dart +++ b/Language/Types/Type_Aliases/syntax_t04.dart @@ -1,34 +1,34 @@ -// Copyright (c) 2019, 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 type alias declares a name for a type expression. -/// ::= typedef ?‘=’ -/// ‘;’ -/// | typedef -/// ::= ‘;’ -/// ::= ? -/// @description Checks that type alias syntax works as expected. Test -/// non-function type alias with type parameters -/// @author sgrekhov@unipro.ru - -import "../../../Utils/expect.dart"; - -class A {} -class B extends A {} -class D extends B {} - -class C { - T t; - C(this.t); -} - -typedef CAlias = C; - -main() { - CAlias ca = new CAlias(new D()); - Expect.isTrue(ca is C); - Expect.isTrue(ca.t is D); - Expect.runtimeIsType>(ca); - Expect.runtimeIsType(ca.t); -} +// Copyright (c) 2019, 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 type alias declares a name for a type expression. +/// ::= typedef ?‘=’ +/// ‘;’ +/// | typedef +/// ::= ‘;’ +/// ::= ? +/// @description Checks that type alias syntax works as expected. Test +/// non-function type alias with type parameters +/// @author sgrekhov@unipro.ru + +import "../../../Utils/expect.dart"; + +class A {} +class B extends A {} +class D extends B {} + +class C { + T t; + C(this.t); +} + +typedef CAlias = C; + +main() { + CAlias ca = new CAlias(new D()); + Expect.isTrue(ca is C); + Expect.isTrue(ca.t is D); + Expect.runtimeIsType>(ca); + Expect.runtimeIsType(ca.t); +} diff --git a/Language/Types/Type_Aliases/syntax_t05.dart b/Language/Types/Type_Aliases/syntax_t05.dart index 831dff01aa..9bc87ac29b 100644 --- a/Language/Types/Type_Aliases/syntax_t05.dart +++ b/Language/Types/Type_Aliases/syntax_t05.dart @@ -1,44 +1,44 @@ -// Copyright (c) 2019, 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 type alias declares a name for a type expression. -/// ::= typedef ?‘=’ -/// ‘;’ -/// | typedef -/// ::= ‘;’ -/// ::= ? -/// @description Checks that it is a compile error if type alias has wrong number -/// of type parameters -/// @author sgrekhov@unipro.ru - -class A {} -class C {} - -typedef Alias1 = A; -// ^^^^ -// [analyzer] unspecified -// [cfe] unspecified -typedef Alias2 = A; -// ^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -typedef Alias3 = C; -// ^^^^ -// [analyzer] unspecified -// [cfe] unspecified -typedef Alias4 = C; -// ^^^^^^^^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -typedef Alias5 = C; -// ^^^^^ -// [analyzer] unspecified -// [cfe] unspecified -typedef Alias6 = C; -// ^^^^^^^^^^^^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// Copyright (c) 2019, 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 type alias declares a name for a type expression. +/// ::= typedef ?‘=’ +/// ‘;’ +/// | typedef +/// ::= ‘;’ +/// ::= ? +/// @description Checks that it is a compile error if type alias has wrong number +/// of type parameters +/// @author sgrekhov@unipro.ru + +class A {} +class C {} + +typedef Alias1 = A; +// ^^^^ +// [analyzer] unspecified +// [cfe] unspecified +typedef Alias2 = A; +// ^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +typedef Alias3 = C; +// ^^^^ +// [analyzer] unspecified +// [cfe] unspecified +typedef Alias4 = C; +// ^^^^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +typedef Alias5 = C; +// ^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +typedef Alias6 = C; +// ^^^^^^^^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Types/Type_Aliases/syntax_t07.dart b/Language/Types/Type_Aliases/syntax_t07.dart index ec519b4d57..b419693caf 100644 --- a/Language/Types/Type_Aliases/syntax_t07.dart +++ b/Language/Types/Type_Aliases/syntax_t07.dart @@ -1,36 +1,36 @@ -// Copyright (c) 2019, 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 type alias declares a name for a type expression. -/// ::= typedef ?‘=’ -/// ‘;’ -/// | typedef -/// ::= ‘;’ -/// ::= ? -/// @description Checks that type alias syntax works as expected. Test -/// function type alias with no type parameters -/// @author sgrekhov@unipro.ru - -import "../../../Utils/expect.dart"; - -typedef void F1(String s); -typedef F2(String s, int i); - -test(F2 f2) { - f2("Lily was here", 42); -} - - -main() { - F1 f = (String s) { - Expect.equals("123", s); - }; - f("123"); - - f2(String s, int i) { - Expect.equals("Lily was here", s); - Expect.equals(42, i); - } - test(f2); -} +// Copyright (c) 2019, 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 type alias declares a name for a type expression. +/// ::= typedef ?‘=’ +/// ‘;’ +/// | typedef +/// ::= ‘;’ +/// ::= ? +/// @description Checks that type alias syntax works as expected. Test +/// function type alias with no type parameters +/// @author sgrekhov@unipro.ru + +import "../../../Utils/expect.dart"; + +typedef void F1(String s); +typedef F2(String s, int i); + +test(F2 f2) { + f2("Lily was here", 42); +} + + +main() { + F1 f = (String s) { + Expect.equals("123", s); + }; + f("123"); + + f2(String s, int i) { + Expect.equals("Lily was here", s); + Expect.equals(42, i); + } + test(f2); +} diff --git a/Language/Types/Type_Aliases/syntax_t08.dart b/Language/Types/Type_Aliases/syntax_t08.dart index a5e76efd3e..25d62664a6 100644 --- a/Language/Types/Type_Aliases/syntax_t08.dart +++ b/Language/Types/Type_Aliases/syntax_t08.dart @@ -1,45 +1,45 @@ -// Copyright (c) 2019, 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 type alias declares a name for a type expression. -/// ::= typedef ?‘=’ -/// ‘;’ -/// | typedef -/// ::= ‘;’ -/// ::= ? -/// @description Checks that type alias syntax works as expected. Test -/// function type alias with type parameters -/// @author sgrekhov@unipro.ru - -import "../../../Utils/expect.dart"; - -typedef void F1(String s); -typedef F2(String s, T i); -typedef F3(String s, T i); - -test1(F2 f2) { - f2("Lily was here", 42); -} - -test2(F3 f3) { - f3("Lily was here", 3.14); -} - -main() { - F1 f = (String s) { - Expect.equals("123", s); - }; - f("123"); - - f2(String s, int i) { - Expect.equals("Lily was here", s); - Expect.equals(42, i); - } - F3 f3 = (String s, double d) { - Expect.equals("Lily was here", s); - Expect.equals(3.14, d); - }; - test1(f2); - test2(f3); -} +// Copyright (c) 2019, 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 type alias declares a name for a type expression. +/// ::= typedef ?‘=’ +/// ‘;’ +/// | typedef +/// ::= ‘;’ +/// ::= ? +/// @description Checks that type alias syntax works as expected. Test +/// function type alias with type parameters +/// @author sgrekhov@unipro.ru + +import "../../../Utils/expect.dart"; + +typedef void F1(String s); +typedef F2(String s, T i); +typedef F3(String s, T i); + +test1(F2 f2) { + f2("Lily was here", 42); +} + +test2(F3 f3) { + f3("Lily was here", 3.14); +} + +main() { + F1 f = (String s) { + Expect.equals("123", s); + }; + f("123"); + + f2(String s, int i) { + Expect.equals("Lily was here", s); + Expect.equals(42, i); + } + F3 f3 = (String s, double d) { + Expect.equals("Lily was here", s); + Expect.equals(3.14, d); + }; + test1(f2); + test2(f3); +} diff --git a/Language/Types/Type_Aliases/syntax_t12.dart b/Language/Types/Type_Aliases/syntax_t12.dart index 95a2cdd8d9..d5ae570562 100644 --- a/Language/Types/Type_Aliases/syntax_t12.dart +++ b/Language/Types/Type_Aliases/syntax_t12.dart @@ -1,22 +1,22 @@ -// 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 type alias declares a name for a type expression. -/// ::= typedef ?‘=’ -/// ‘;’ -/// | typedef -/// ::= ‘;’ -/// ::= ? -/// @description Checks that it is a compile-time error if the terminating -/// from a type alias declaration from a type alias declaration. -/// @author iefremov - - -typedef void F() -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 type alias declares a name for a type expression. +/// ::= typedef ?‘=’ +/// ‘;’ +/// | typedef +/// ::= ‘;’ +/// ::= ? +/// @description Checks that it is a compile-time error if the terminating +/// from a type alias declaration from a type alias declaration. +/// @author iefremov + + +typedef void F() +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Types/Type_Aliases/syntax_t13.dart b/Language/Types/Type_Aliases/syntax_t13.dart index 3a79f4ce62..d8e5a891ba 100644 --- a/Language/Types/Type_Aliases/syntax_t13.dart +++ b/Language/Types/Type_Aliases/syntax_t13.dart @@ -1,22 +1,22 @@ -// 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 type alias declares a name for a type expression. -/// ::= typedef ?‘=’ -/// ‘;’ -/// | typedef -/// ::= ‘;’ -/// ::= ? -/// @description Checks that it is a compile-time error if the formal parameter -/// list is missing from a type alias declaration. -/// @author iefremov - - -typedef void F; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 type alias declares a name for a type expression. +/// ::= typedef ?‘=’ +/// ‘;’ +/// | typedef +/// ::= ‘;’ +/// ::= ? +/// @description Checks that it is a compile-time error if the formal parameter +/// list is missing from a type alias declaration. +/// @author iefremov + + +typedef void F; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Types/Type_Aliases/syntax_t14.dart b/Language/Types/Type_Aliases/syntax_t14.dart index 277239acc4..267ce41813 100644 --- a/Language/Types/Type_Aliases/syntax_t14.dart +++ b/Language/Types/Type_Aliases/syntax_t14.dart @@ -1,22 +1,22 @@ -// 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 type alias declares a name for a type expression. -/// ::= typedef ?‘=’ -/// ‘;’ -/// | typedef -/// ::= ‘;’ -/// ::= ? -/// @description Checks that the typedef declaration cannot include function -/// body. -/// @author iefremov - - -typedef F() {}; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 type alias declares a name for a type expression. +/// ::= typedef ?‘=’ +/// ‘;’ +/// | typedef +/// ::= ‘;’ +/// ::= ? +/// @description Checks that the typedef declaration cannot include function +/// body. +/// @author iefremov + + +typedef F() {}; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Types/Type_Aliases/syntax_t15.dart b/Language/Types/Type_Aliases/syntax_t15.dart index ce84b126ea..92f44af358 100644 --- a/Language/Types/Type_Aliases/syntax_t15.dart +++ b/Language/Types/Type_Aliases/syntax_t15.dart @@ -1,22 +1,22 @@ -// 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 type alias declares a name for a type expression. -/// ::= typedef ?‘=’ -/// ‘;’ -/// | typedef -/// ::= ‘;’ -/// ::= ? -/// @description Checks that formalParameterList in the typedef declaration -/// cannot include a semicolon. -/// @author kaigorodov - - -typedef F(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 type alias declares a name for a type expression. +/// ::= typedef ?‘=’ +/// ‘;’ +/// | typedef +/// ::= ‘;’ +/// ::= ? +/// @description Checks that formalParameterList in the typedef declaration +/// cannot include a semicolon. +/// @author kaigorodov + + +typedef F(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Types/Type_Aliases/syntax_t16.dart b/Language/Types/Type_Aliases/syntax_t16.dart index eb67ae7251..734560d0e8 100644 --- a/Language/Types/Type_Aliases/syntax_t16.dart +++ b/Language/Types/Type_Aliases/syntax_t16.dart @@ -1,22 +1,22 @@ -// 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 type alias declares a name for a type expression. -/// ::= typedef ?‘=’ -/// ‘;’ -/// | typedef -/// ::= ‘;’ -/// ::= ? -/// @description Checks that formalParameterList in the typedef declaration -/// cannot have an extra angle bracket. -/// @author kaigorodov - - -typedef F>(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 type alias declares a name for a type expression. +/// ::= typedef ?‘=’ +/// ‘;’ +/// | typedef +/// ::= ‘;’ +/// ::= ? +/// @description Checks that formalParameterList in the typedef declaration +/// cannot have an extra angle bracket. +/// @author kaigorodov + + +typedef F>(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Types/Type_Aliases/syntax_t17.dart b/Language/Types/Type_Aliases/syntax_t17.dart index 2bfce6f1a7..1308cd2c4f 100644 --- a/Language/Types/Type_Aliases/syntax_t17.dart +++ b/Language/Types/Type_Aliases/syntax_t17.dart @@ -1,24 +1,24 @@ -// 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 type alias declares a name for a type expression. -/// ::= typedef ?‘=’ -/// ‘;’ -/// | typedef -/// ::= ‘;’ -/// ::= ? -/// @description Checks that it is impossible to introduce alias for a class -/// type (C style). -/// @author iefremov - - -class A {} -typedef A B; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 type alias declares a name for a type expression. +/// ::= typedef ?‘=’ +/// ‘;’ +/// | typedef +/// ::= ‘;’ +/// ::= ? +/// @description Checks that it is impossible to introduce alias for a class +/// type (C style). +/// @author iefremov + + +class A {} +typedef A B; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Types/Type_Aliases/syntax_t18.dart b/Language/Types/Type_Aliases/syntax_t18.dart index de02e32501..29dd7e45d2 100644 --- a/Language/Types/Type_Aliases/syntax_t18.dart +++ b/Language/Types/Type_Aliases/syntax_t18.dart @@ -1,23 +1,23 @@ -// 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 type alias declares a name for a type expression. -/// ::= typedef ?‘=’ -/// ‘;’ -/// | typedef -/// ::= ‘;’ -/// ::= ? -/// @description Checks that it is impossible to introduce alias for an abstract -/// class type. -/// @author iefremov - - -abstract class A {} -typedef A B; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 type alias declares a name for a type expression. +/// ::= typedef ?‘=’ +/// ‘;’ +/// | typedef +/// ::= ‘;’ +/// ::= ? +/// @description Checks that it is impossible to introduce alias for an abstract +/// class type. +/// @author iefremov + + +abstract class A {} +typedef A B; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Types/Type_Aliases/syntax_t19.dart b/Language/Types/Type_Aliases/syntax_t19.dart index 5b9346e61b..10315c846c 100644 --- a/Language/Types/Type_Aliases/syntax_t19.dart +++ b/Language/Types/Type_Aliases/syntax_t19.dart @@ -1,22 +1,22 @@ -// 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 type alias declares a name for a type expression. -/// ::= typedef ?‘=’ -/// ‘;’ -/// | typedef -/// ::= ‘;’ -/// ::= ? -/// @description Checks that it is impossible to introduce alias for a built-in -/// type (int). -/// @author iefremov - - -typedef int integer; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 type alias declares a name for a type expression. +/// ::= typedef ?‘=’ +/// ‘;’ +/// | typedef +/// ::= ‘;’ +/// ::= ? +/// @description Checks that it is impossible to introduce alias for a built-in +/// type (int). +/// @author iefremov + + +typedef int integer; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Types/Type_Void/syntax_t01.dart b/Language/Types/Type_Void/syntax_t01.dart index 1ec72ffdc0..158e59e907 100644 --- a/Language/Types/Type_Void/syntax_t01.dart +++ b/Language/Types/Type_Void/syntax_t01.dart @@ -1,17 +1,17 @@ -// 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 The special type void may only be used as the return type of a -/// function: it is a compile-time error to use void in any other context. -/// For example, as a type argument, or as the type of a variable or parameter. -/// @description Checks that with generalized void specifying [void] as a type -/// argument causes no compile-time error. -/// @author iefremov - - -class A {} - -main() { - A? a = null; -} +// 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 The special type void may only be used as the return type of a +/// function: it is a compile-time error to use void in any other context. +/// For example, as a type argument, or as the type of a variable or parameter. +/// @description Checks that with generalized void specifying [void] as a type +/// argument causes no compile-time error. +/// @author iefremov + + +class A {} + +main() { + A? a = null; +} diff --git a/Language/Types/Type_Void/syntax_t02.dart b/Language/Types/Type_Void/syntax_t02.dart index f8f817b7bf..7966e1f1a7 100644 --- a/Language/Types/Type_Void/syntax_t02.dart +++ b/Language/Types/Type_Void/syntax_t02.dart @@ -1,15 +1,15 @@ -// 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 The special type void may only be used as the return type of a -/// function: it is a compile-time error to use void in any other context. -/// For example, as a type argument, or as the type of a variable or parameter. -/// @description Checks that with generalized void specifying [void] as a -/// function's parameter type causes no compile-time error. -/// @author iefremov - - -main() { - f(void a) {}; -} +// 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 The special type void may only be used as the return type of a +/// function: it is a compile-time error to use void in any other context. +/// For example, as a type argument, or as the type of a variable or parameter. +/// @description Checks that with generalized void specifying [void] as a +/// function's parameter type causes no compile-time error. +/// @author iefremov + + +main() { + f(void a) {}; +} diff --git a/Language/Types/Type_Void/syntax_t03.dart b/Language/Types/Type_Void/syntax_t03.dart index a17582a48b..0d09e248b5 100644 --- a/Language/Types/Type_Void/syntax_t03.dart +++ b/Language/Types/Type_Void/syntax_t03.dart @@ -1,18 +1,18 @@ -// 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 The special type void may only be used as the return type of a -/// function: it is a compile-time error to use void in any other context. -/// For example, as a type argument, or as the type of a variable or parameter. -/// @description Checks that specifying void as a function's parameter type -/// (C-style, without the parameter name) causes a compile-time error. -/// @author iefremov - - -main() { - f(void) {}; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The special type void may only be used as the return type of a +/// function: it is a compile-time error to use void in any other context. +/// For example, as a type argument, or as the type of a variable or parameter. +/// @description Checks that specifying void as a function's parameter type +/// (C-style, without the parameter name) causes a compile-time error. +/// @author iefremov + + +main() { + f(void) {}; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Types/Type_Void/syntax_t04.dart b/Language/Types/Type_Void/syntax_t04.dart index e0b41c09f2..822690b00d 100644 --- a/Language/Types/Type_Void/syntax_t04.dart +++ b/Language/Types/Type_Void/syntax_t04.dart @@ -1,15 +1,15 @@ -// 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 The special type void may only be used as the return type of a -/// function: it is a compile-time error to use void in any other context. -/// For example, as a type argument, or as the type of a variable or parameter. -/// @description Checks that with generalized void specifying void as the type of -/// a local variable causes no compile-time error. -/// @author iefremov - - -main() { - void v = null; -} +// 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 The special type void may only be used as the return type of a +/// function: it is a compile-time error to use void in any other context. +/// For example, as a type argument, or as the type of a variable or parameter. +/// @description Checks that with generalized void specifying void as the type of +/// a local variable causes no compile-time error. +/// @author iefremov + + +main() { + void v = null; +} diff --git a/Language/Types/Type_Void/syntax_t05.dart b/Language/Types/Type_Void/syntax_t05.dart index a80c94c03e..edb1ee83f8 100644 --- a/Language/Types/Type_Void/syntax_t05.dart +++ b/Language/Types/Type_Void/syntax_t05.dart @@ -1,17 +1,17 @@ -// 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 The special type void may only be used as the return type of a -/// function: it is a compile-time error to use void in any other context. -/// For example, as a type argument, or as the type of a variable or parameter. -/// @description Checks that specifying void on the right side of a type test -/// expression causes a compile-time error. -/// @author iefremov - -main() { - bool b = null is void; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The special type void may only be used as the return type of a +/// function: it is a compile-time error to use void in any other context. +/// For example, as a type argument, or as the type of a variable or parameter. +/// @description Checks that specifying void on the right side of a type test +/// expression causes a compile-time error. +/// @author iefremov + +main() { + bool b = null is void; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Types/Type_Void/syntax_t06.dart b/Language/Types/Type_Void/syntax_t06.dart index ec43a4d772..d5c8d61f4e 100644 --- a/Language/Types/Type_Void/syntax_t06.dart +++ b/Language/Types/Type_Void/syntax_t06.dart @@ -1,20 +1,20 @@ -// 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 The special type void may only be used as the return type of a -/// function: it is a compile-time error to use void in any other context. -/// For example, as a type argument, or as the type of a variable or parameter. -/// @description Checks that putting void in a class's extends clause causes a -/// compile-time error. -/// @author iefremov - - -class A extends void {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 The special type void may only be used as the return type of a +/// function: it is a compile-time error to use void in any other context. +/// For example, as a type argument, or as the type of a variable or parameter. +/// @description Checks that putting void in a class's extends clause causes a +/// compile-time error. +/// @author iefremov + + +class A extends void {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Types/Type_Void/syntax_t07.dart b/Language/Types/Type_Void/syntax_t07.dart index 9693387448..71fbbdf151 100644 --- a/Language/Types/Type_Void/syntax_t07.dart +++ b/Language/Types/Type_Void/syntax_t07.dart @@ -1,20 +1,20 @@ -// 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 The special type void may only be used as the return type of a -/// function: it is a compile-time error to use void in any other context. -/// For example, as a type argument, or as the type of a variable or parameter. -/// @description Checks that putting void in a class's implements clause causes -/// a compile-time error. -/// @author iefremov - - -class A implements void {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 The special type void may only be used as the return type of a +/// function: it is a compile-time error to use void in any other context. +/// For example, as a type argument, or as the type of a variable or parameter. +/// @description Checks that putting void in a class's implements clause causes +/// a compile-time error. +/// @author iefremov + + +class A implements void {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Types/Type_Void/syntax_t08.dart b/Language/Types/Type_Void/syntax_t08.dart index 574642bd65..c5683d8fd9 100644 --- a/Language/Types/Type_Void/syntax_t08.dart +++ b/Language/Types/Type_Void/syntax_t08.dart @@ -1,20 +1,20 @@ -// 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 The special type void may only be used as the return type of a function: -/// it is a compile-time error to use void in any other context (for example, -/// as a type argument, or as the type of a variable or parameter). -/// @description Checks that specifying void as a type parameter bound causes a -/// compile-time error. -/// @author iefremov - - -class A {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new A(); -} +// 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 The special type void may only be used as the return type of a function: +/// it is a compile-time error to use void in any other context (for example, +/// as a type argument, or as the type of a variable or parameter). +/// @description Checks that specifying void as a type parameter bound causes a +/// compile-time error. +/// @author iefremov + + +class A {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new A(); +} diff --git a/Language/Types/Type_Void/syntax_t09.dart b/Language/Types/Type_Void/syntax_t09.dart index 35f2c58895..f4beafd6a7 100644 --- a/Language/Types/Type_Void/syntax_t09.dart +++ b/Language/Types/Type_Void/syntax_t09.dart @@ -1,21 +1,21 @@ -// 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 The special type void may only be used as the return type of a -/// function: it is a compile-time error to use void in any other context. -/// For example, as a type argument, or as the type of a variable or parameter. -/// @description Checks that with generalized void using [void] it is a -/// compile-time error to pass a value with static type void to the function -/// which takes an Object -/// @issue 30177 -/// @author sgrekhov@unipro.ru - -void v = null; - -main() { - print(v); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The special type void may only be used as the return type of a +/// function: it is a compile-time error to use void in any other context. +/// For example, as a type argument, or as the type of a variable or parameter. +/// @description Checks that with generalized void using [void] it is a +/// compile-time error to pass a value with static type void to the function +/// which takes an Object +/// @issue 30177 +/// @author sgrekhov@unipro.ru + +void v = null; + +main() { + print(v); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Types/Type_Void/syntax_t10.dart b/Language/Types/Type_Void/syntax_t10.dart index d5a84a9b0e..8ebe376656 100644 --- a/Language/Types/Type_Void/syntax_t10.dart +++ b/Language/Types/Type_Void/syntax_t10.dart @@ -1,23 +1,23 @@ -// 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 The special type void may only be used as the return type of a -/// function: it is a compile-time error to use void in any other context. -/// For example, as a type argument, or as the type of a variable or parameter. -/// @description Checks that using void as a declaration name is also a -/// compile-time error. -/// @author rodionov - - -void void() {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - void(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The special type void may only be used as the return type of a +/// function: it is a compile-time error to use void in any other context. +/// For example, as a type argument, or as the type of a variable or parameter. +/// @description Checks that using void as a declaration name is also a +/// compile-time error. +/// @author rodionov + + +void void() {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + void(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Types/Type_Void/syntax_t11.dart b/Language/Types/Type_Void/syntax_t11.dart index 3267dd1477..7f85ca9175 100644 --- a/Language/Types/Type_Void/syntax_t11.dart +++ b/Language/Types/Type_Void/syntax_t11.dart @@ -1,18 +1,18 @@ -// 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 The special type void may only be used as the return type of a -/// function: it is a compile-time error to use void in any other context. -/// For example, as a type argument, or as the type of a variable or parameter. -/// @description Checks that using void as a declaration name is also a c -/// ompile-time error. -/// @author rodionov - - -main() { - var void; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The special type void may only be used as the return type of a +/// function: it is a compile-time error to use void in any other context. +/// For example, as a type argument, or as the type of a variable or parameter. +/// @description Checks that using void as a declaration name is also a c +/// ompile-time error. +/// @author rodionov + + +main() { + var void; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Types/Type_Void/syntax_t12.dart b/Language/Types/Type_Void/syntax_t12.dart index 775aaf694b..9b19516c7d 100644 --- a/Language/Types/Type_Void/syntax_t12.dart +++ b/Language/Types/Type_Void/syntax_t12.dart @@ -1,23 +1,23 @@ -// 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 The special type void may only be used as the return type of a -/// function: it is a compile-time error to use void in any other context. -/// For example, as a type argument, or as the type of a variable or parameter. -/// @description Checks that using void as a declaration name is also a -/// compile-time error. -/// @author rodionov - - -class void {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - new void(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The special type void may only be used as the return type of a +/// function: it is a compile-time error to use void in any other context. +/// For example, as a type argument, or as the type of a variable or parameter. +/// @description Checks that using void as a declaration name is also a +/// compile-time error. +/// @author rodionov + + +class void {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + new void(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Types/Type_Void/syntax_t13.dart b/Language/Types/Type_Void/syntax_t13.dart index 3354c92b23..833928114c 100644 --- a/Language/Types/Type_Void/syntax_t13.dart +++ b/Language/Types/Type_Void/syntax_t13.dart @@ -1,20 +1,20 @@ -// 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 The special type void may only be used as the return type of a -/// function: it is a compile-time error to use void in any other context. -/// For example, as a type argument, or as the type of a variable or parameter. -/// @description Checks that using void as a declaration name is also a -/// compile-time error. -/// @author rodionov - - -typedef void void(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - void x; -} +// 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 The special type void may only be used as the return type of a +/// function: it is a compile-time error to use void in any other context. +/// For example, as a type argument, or as the type of a variable or parameter. +/// @description Checks that using void as a declaration name is also a +/// compile-time error. +/// @author rodionov + + +typedef void void(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + void x; +} diff --git a/Language/Types/Type_Void/syntax_t14.dart b/Language/Types/Type_Void/syntax_t14.dart index 7a18e62ead..117c894b84 100644 --- a/Language/Types/Type_Void/syntax_t14.dart +++ b/Language/Types/Type_Void/syntax_t14.dart @@ -1,22 +1,22 @@ -// 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 The special type void may only be used as the return type of a -/// function: it is a compile-time error to use void in any other context. -/// For example, as a type argument, or as the type of a variable or parameter. -/// @description Checks that using void as a parameter name is also a -/// compile-time error. -/// @author rodionov - - -int foo(var void) => 42; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - foo(1); -// ^ -// [cfe] unspecified -} +// 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 The special type void may only be used as the return type of a +/// function: it is a compile-time error to use void in any other context. +/// For example, as a type argument, or as the type of a variable or parameter. +/// @description Checks that using void as a parameter name is also a +/// compile-time error. +/// @author rodionov + + +int foo(var void) => 42; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + foo(1); +// ^ +// [cfe] unspecified +} diff --git a/Language/Types/Type_Void/syntax_t15.dart b/Language/Types/Type_Void/syntax_t15.dart index c1c65e3773..06498e1ef2 100644 --- a/Language/Types/Type_Void/syntax_t15.dart +++ b/Language/Types/Type_Void/syntax_t15.dart @@ -1,18 +1,18 @@ -// 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 The special type void may only be used as the return type of a -/// function: it is a compile-time error to use void in any other context. -/// For example, as a type argument, or as the type of a variable or parameter. -/// @description Checks that using void as a parameter name is also a -/// compile-time error. -/// @author rodionov - - -main() { - (var p1, var void) => p1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 The special type void may only be used as the return type of a +/// function: it is a compile-time error to use void in any other context. +/// For example, as a type argument, or as the type of a variable or parameter. +/// @description Checks that using void as a parameter name is also a +/// compile-time error. +/// @author rodionov + + +main() { + (var p1, var void) => p1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Variables/constant_initialization_t01.dart b/Language/Variables/constant_initialization_t01.dart index f0cc8753e6..f7471c0568 100644 --- a/Language/Variables/constant_initialization_t01.dart +++ b/Language/Variables/constant_initialization_t01.dart @@ -1,16 +1,16 @@ -// 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 constant variable must be initialized to a compile-time -/// constant or a compile-time error occurs. -/// @description Checks that a compile-time error occurs if a constant variable -/// is not initialized. -/// @author msyabro - -const foo; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() {} +// 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 constant variable must be initialized to a compile-time +/// constant or a compile-time error occurs. +/// @description Checks that a compile-time error occurs if a constant variable +/// is not initialized. +/// @author msyabro + +const foo; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() {} diff --git a/Language/Variables/constant_initialization_t02.dart b/Language/Variables/constant_initialization_t02.dart index f8a8fa5fa9..c4e9207d55 100644 --- a/Language/Variables/constant_initialization_t02.dart +++ b/Language/Variables/constant_initialization_t02.dart @@ -1,18 +1,18 @@ -// 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 constant variable must be initialized to a compile-time -/// constant or a compile-time error occurs. -/// @description Checks that a compile-time error occurs if a constant variable -/// is initialized to a non compile-time constant. -/// @author msyabro - -class Foo {} -const Foo foo = new Foo(); -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { -} +// 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 constant variable must be initialized to a compile-time +/// constant or a compile-time error occurs. +/// @description Checks that a compile-time error occurs if a constant variable +/// is initialized to a non compile-time constant. +/// @author msyabro + +class Foo {} +const Foo foo = new Foo(); +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { +} diff --git a/Language/Variables/final_or_static_initialization_t01.dart b/Language/Variables/final_or_static_initialization_t01.dart index 46eda683f2..809bd1601b 100644 --- a/Language/Variables/final_or_static_initialization_t01.dart +++ b/Language/Variables/final_or_static_initialization_t01.dart @@ -1,20 +1,20 @@ -// 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 library or static variable is guaranteed to have an -/// initializer at its declaration by the grammar. -/// @description Checks that it is a compile error when a final library -/// variable is not initialized in its declaration. -/// @author rodionov -/// @issue #27510 - - -final int v; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(v); -} +// 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 library or static variable is guaranteed to have an +/// initializer at its declaration by the grammar. +/// @description Checks that it is a compile error when a final library +/// variable is not initialized in its declaration. +/// @author rodionov +/// @issue #27510 + + +final int v; +// ^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(v); +} diff --git a/Language/Variables/final_or_static_initialization_t02.dart b/Language/Variables/final_or_static_initialization_t02.dart index 1d811e8299..9023c1714e 100644 --- a/Language/Variables/final_or_static_initialization_t02.dart +++ b/Language/Variables/final_or_static_initialization_t02.dart @@ -1,22 +1,22 @@ -// 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 library or static variable is guaranteed to have an -/// initializer at its declaration by the grammar. -/// @description Checks that it is a compile error when a final static -/// variable is not initialized in its declaration. -/// @author rodionov -/// @issue #27510 - - -class C { - static final v; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - print(C.v); -} +// 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 library or static variable is guaranteed to have an +/// initializer at its declaration by the grammar. +/// @description Checks that it is a compile error when a final static +/// variable is not initialized in its declaration. +/// @author rodionov +/// @issue #27510 + + +class C { + static final v; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + print(C.v); +} diff --git a/Language/Variables/final_or_static_initialization_t03.dart b/Language/Variables/final_or_static_initialization_t03.dart index 55913130e7..b814403abd 100644 --- a/Language/Variables/final_or_static_initialization_t03.dart +++ b/Language/Variables/final_or_static_initialization_t03.dart @@ -1,22 +1,22 @@ -// 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 library or static variable is guaranteed to have an -/// initializer at its declaration by the grammar. -/// @description Checks that it is a compile error when a final static -/// variable is not initialized in its declaration. -/// @author rodionov -/// @issue #27510 - - -class C { - static final bool v; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - print(C.v); -} +// 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 library or static variable is guaranteed to have an +/// initializer at its declaration by the grammar. +/// @description Checks that it is a compile error when a final static +/// variable is not initialized in its declaration. +/// @author rodionov +/// @issue #27510 + + +class C { + static final bool v; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + print(C.v); +} diff --git a/Language/Variables/final_t03.dart b/Language/Variables/final_t03.dart index bc5cc40acc..fbf36ca2bf 100644 --- a/Language/Variables/final_t03.dart +++ b/Language/Variables/final_t03.dart @@ -1,31 +1,31 @@ -// 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 final variable is a variable whose binding is fixed upon -/// initialization; a final variable v will always refer to the same object -/// after v has been initialized. The declaration of a final variable must -/// include the modifier final. -/// It is a static warning if a final instance variable that has been -/// initialized at its point of declaration is also initialized in a -/// constructor. -/// It is a compile-time error if a local variable v is final and v is not -/// initialized at its point of declaration. -/// @description Checks that it is a compile error to initialize final instance -/// variable both in initializing formal and initializer list -/// (Classes/Constructors/Generative Constructors) -/// @author rodionov - - -class C { - final v; - - C(this.v) : v = 1 {} -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(1); -} +// 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 final variable is a variable whose binding is fixed upon +/// initialization; a final variable v will always refer to the same object +/// after v has been initialized. The declaration of a final variable must +/// include the modifier final. +/// It is a static warning if a final instance variable that has been +/// initialized at its point of declaration is also initialized in a +/// constructor. +/// It is a compile-time error if a local variable v is final and v is not +/// initialized at its point of declaration. +/// @description Checks that it is a compile error to initialize final instance +/// variable both in initializing formal and initializer list +/// (Classes/Constructors/Generative Constructors) +/// @author rodionov + + +class C { + final v; + + C(this.v) : v = 1 {} +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(1); +} diff --git a/Language/Variables/library_variable_t01.dart b/Language/Variables/library_variable_t01.dart index 87280acc39..7df250e293 100644 --- a/Language/Variables/library_variable_t01.dart +++ b/Language/Variables/library_variable_t01.dart @@ -1,17 +1,17 @@ -// 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 library variable is implicitly static. It is a compile-time -/// error to preface a top level variable declaration with the built-in -/// identifier static. -/// @description Checks that a compile-time error occurs if a top level -/// variable declaration is prefaced with the built-in identifier static. -/// @author vasya -/// @issue 44990 - -import "library_variable_t01_lib.dart"; - -main() { - foo = 1; -} +// 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 library variable is implicitly static. It is a compile-time +/// error to preface a top level variable declaration with the built-in +/// identifier static. +/// @description Checks that a compile-time error occurs if a top level +/// variable declaration is prefaced with the built-in identifier static. +/// @author vasya +/// @issue 44990 + +import "library_variable_t01_lib.dart"; + +main() { + foo = 1; +} diff --git a/Language/Variables/library_variable_t02.dart b/Language/Variables/library_variable_t02.dart index 8054542162..9451479e94 100644 --- a/Language/Variables/library_variable_t02.dart +++ b/Language/Variables/library_variable_t02.dart @@ -1,19 +1,19 @@ -// 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 library variable is implicitly static. It is a compile-time -/// error to preface a top level variable declaration with the built-in -/// identifier static. -/// @description Checks that it is a compile-time error if a top level variable -/// declaration is prefaced with the built-in identifier static. -/// @author kaigorodov - - static var foo; -//^^^^^^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - foo = 1; -} +// 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 library variable is implicitly static. It is a compile-time +/// error to preface a top level variable declaration with the built-in +/// identifier static. +/// @description Checks that it is a compile-time error if a top level variable +/// declaration is prefaced with the built-in identifier static. +/// @author kaigorodov + + static var foo; +//^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + foo = 1; +} diff --git a/Language/Variables/library_variable_t03.dart b/Language/Variables/library_variable_t03.dart index e2a512b5c1..9cde965e30 100644 --- a/Language/Variables/library_variable_t03.dart +++ b/Language/Variables/library_variable_t03.dart @@ -1,20 +1,20 @@ -// 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 library variable is implicitly static. It is a compile-time -/// error to preface a top level variable declaration with the built-in -/// identifier static. -/// @description Checks that it is a compile-time error if a top level typed -/// variable declaration is prefaced with the built-in identifier static. -/// @author msyabro - - -static int foo = 1; // error -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - foo = 1; -} +// 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 library variable is implicitly static. It is a compile-time +/// error to preface a top level variable declaration with the built-in +/// identifier static. +/// @description Checks that it is a compile-time error if a top level typed +/// variable declaration is prefaced with the built-in identifier static. +/// @author msyabro + + +static int foo = 1; // error +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + foo = 1; +} diff --git a/Language/Variables/library_variable_t04.dart b/Language/Variables/library_variable_t04.dart index f7b91905b6..831d798861 100644 --- a/Language/Variables/library_variable_t04.dart +++ b/Language/Variables/library_variable_t04.dart @@ -1,20 +1,20 @@ -// 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 library variable is implicitly static. It is a compile-time -/// error to preface a top level variable declaration with the built-in -/// identifier static. -/// @description Checks that it is a compile-time error if a top level final -/// variable declaration is prefaced with the built-in identifier static. -/// @author msyabro - - -static final foo = 1; // error -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(foo); -} +// 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 library variable is implicitly static. It is a compile-time +/// error to preface a top level variable declaration with the built-in +/// identifier static. +/// @description Checks that it is a compile-time error if a top level final +/// variable declaration is prefaced with the built-in identifier static. +/// @author msyabro + + +static final foo = 1; // error +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(foo); +} diff --git a/Language/Variables/library_variable_t05.dart b/Language/Variables/library_variable_t05.dart index bd99b2e0d6..62bde1f591 100644 --- a/Language/Variables/library_variable_t05.dart +++ b/Language/Variables/library_variable_t05.dart @@ -1,20 +1,20 @@ -// 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 library variable is implicitly static. It is a compile-time -/// error to preface a top level variable declaration with the built-in -/// identifier static. -/// @description Checks that it is a compile-time error if a top level final -/// typed variable declaration is prefaced with the built-in identifier static. -/// @author msyabro - - -static final int foo = 1; // error -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(foo); -} +// 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 library variable is implicitly static. It is a compile-time +/// error to preface a top level variable declaration with the built-in +/// identifier static. +/// @description Checks that it is a compile-time error if a top level final +/// typed variable declaration is prefaced with the built-in identifier static. +/// @author msyabro + + +static final int foo = 1; // error +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(foo); +} diff --git a/Language/Variables/library_variable_t06.dart b/Language/Variables/library_variable_t06.dart index f403c4cbdd..2cea01efe1 100644 --- a/Language/Variables/library_variable_t06.dart +++ b/Language/Variables/library_variable_t06.dart @@ -1,20 +1,20 @@ -// 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 library variable is implicitly static. It is a compile-time -/// error to preface a top level variable declaration with the built-in -/// identifier static. -/// @description Checks that it is a compile-time error if a top level constant -/// variable declaration is prefaced with the built-in identifier static. -/// @author msyabro - - -static const foo = 1; // error -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(foo); -} +// 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 library variable is implicitly static. It is a compile-time +/// error to preface a top level variable declaration with the built-in +/// identifier static. +/// @description Checks that it is a compile-time error if a top level constant +/// variable declaration is prefaced with the built-in identifier static. +/// @author msyabro + + +static const foo = 1; // error +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(foo); +} diff --git a/Language/Variables/library_variable_t07.dart b/Language/Variables/library_variable_t07.dart index 3622be69d7..7308eea5e7 100644 --- a/Language/Variables/library_variable_t07.dart +++ b/Language/Variables/library_variable_t07.dart @@ -1,20 +1,20 @@ -// 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 library variable is implicitly static. It is a compile-time -/// error to preface a top level variable declaration with the built-in -/// identifier static. -/// @description Checks that it is a compile-time error if a top level constant -/// typed variable declaration is prefaced with the built-in identifier static. -/// @author msyabro - - -static const int foo = 1; // error -//^ -// [analyzer] unspecified -// [cfe] unspecified - -main() { - print(foo); -} +// 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 library variable is implicitly static. It is a compile-time +/// error to preface a top level variable declaration with the built-in +/// identifier static. +/// @description Checks that it is a compile-time error if a top level constant +/// typed variable declaration is prefaced with the built-in identifier static. +/// @author msyabro + + +static const int foo = 1; // error +//^ +// [analyzer] unspecified +// [cfe] unspecified + +main() { + print(foo); +} diff --git a/Language/Variables/syntax_t03.dart b/Language/Variables/syntax_t03.dart index f1d4a8031c..a125afa09d 100644 --- a/Language/Variables/syntax_t03.dart +++ b/Language/Variables/syntax_t03.dart @@ -1,39 +1,39 @@ -// 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 variableDeclaration: -/// declaredIdentifier (‘, ’ identifier)* -/// ; -/// declaredIdentifier: -/// metadata finalConstVarOrType identifier -/// ; -/// finalConstVarOrType: -/// final type? | -/// const type? | -/// varOrType -/// ; -/// varOrType: -/// var | -/// type -/// ; -/// initializedVariableDeclaration: -/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* -/// ; -/// initializedIdentifier: -/// identifier (‘=’ expression)? -/// ; -/// initializedIdentifierList: -/// initializedIdentifier (‘, ’ initializedIdentifier)* -/// ; -/// @description Checks that finalConstVarOrType cannot appear twice in -/// variable declaration. -/// @author kaigorodov - - -main() { - var x, var y; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 variableDeclaration: +/// declaredIdentifier (‘, ’ identifier)* +/// ; +/// declaredIdentifier: +/// metadata finalConstVarOrType identifier +/// ; +/// finalConstVarOrType: +/// final type? | +/// const type? | +/// varOrType +/// ; +/// varOrType: +/// var | +/// type +/// ; +/// initializedVariableDeclaration: +/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* +/// ; +/// initializedIdentifier: +/// identifier (‘=’ expression)? +/// ; +/// initializedIdentifierList: +/// initializedIdentifier (‘, ’ initializedIdentifier)* +/// ; +/// @description Checks that finalConstVarOrType cannot appear twice in +/// variable declaration. +/// @author kaigorodov + + +main() { + var x, var y; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Variables/syntax_t04.dart b/Language/Variables/syntax_t04.dart index 9350f0ce7a..328305d003 100644 --- a/Language/Variables/syntax_t04.dart +++ b/Language/Variables/syntax_t04.dart @@ -1,39 +1,39 @@ -// 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 variableDeclaration: -/// declaredIdentifier (‘, ’ identifier)* -/// ; -/// declaredIdentifier: -/// metadata finalConstVarOrType identifier -/// ; -/// finalConstVarOrType: -/// final type? | -/// const type? | -/// varOrType -/// ; -/// varOrType: -/// var | -/// type -/// ; -/// initializedVariableDeclaration: -/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* -/// ; -/// initializedIdentifier: -/// identifier (‘=’ expression)? -/// ; -/// initializedIdentifierList: -/// initializedIdentifier (‘, ’ initializedIdentifier)* -/// ; -/// @description Checks that a variable declaration cannot contain both -/// 'final' and 'var'. -/// @author iefremov - - -main() { - final var x = 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 variableDeclaration: +/// declaredIdentifier (‘, ’ identifier)* +/// ; +/// declaredIdentifier: +/// metadata finalConstVarOrType identifier +/// ; +/// finalConstVarOrType: +/// final type? | +/// const type? | +/// varOrType +/// ; +/// varOrType: +/// var | +/// type +/// ; +/// initializedVariableDeclaration: +/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* +/// ; +/// initializedIdentifier: +/// identifier (‘=’ expression)? +/// ; +/// initializedIdentifierList: +/// initializedIdentifier (‘, ’ initializedIdentifier)* +/// ; +/// @description Checks that a variable declaration cannot contain both +/// 'final' and 'var'. +/// @author iefremov + + +main() { + final var x = 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Variables/syntax_t05.dart b/Language/Variables/syntax_t05.dart index d2a6d42deb..a7906af158 100644 --- a/Language/Variables/syntax_t05.dart +++ b/Language/Variables/syntax_t05.dart @@ -1,39 +1,39 @@ -// 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 variableDeclaration: -/// declaredIdentifier (‘, ’ identifier)* -/// ; -/// declaredIdentifier: -/// metadata finalConstVarOrType identifier -/// ; -/// finalConstVarOrType: -/// final type? | -/// const type? | -/// varOrType -/// ; -/// varOrType: -/// var | -/// type -/// ; -/// initializedVariableDeclaration: -/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* -/// ; -/// initializedIdentifier: -/// identifier (‘=’ expression)? -/// ; -/// initializedIdentifierList: -/// initializedIdentifier (‘, ’ initializedIdentifier)* -/// ; -/// @description Checks that a variable declaration cannot contain both 'var' -/// and 'type'. -/// @author iefremov - - -main() { - var int x = 1; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 variableDeclaration: +/// declaredIdentifier (‘, ’ identifier)* +/// ; +/// declaredIdentifier: +/// metadata finalConstVarOrType identifier +/// ; +/// finalConstVarOrType: +/// final type? | +/// const type? | +/// varOrType +/// ; +/// varOrType: +/// var | +/// type +/// ; +/// initializedVariableDeclaration: +/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* +/// ; +/// initializedIdentifier: +/// identifier (‘=’ expression)? +/// ; +/// initializedIdentifierList: +/// initializedIdentifier (‘, ’ initializedIdentifier)* +/// ; +/// @description Checks that a variable declaration cannot contain both 'var' +/// and 'type'. +/// @author iefremov + + +main() { + var int x = 1; +//^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Variables/syntax_t06.dart b/Language/Variables/syntax_t06.dart index abccc692ce..d117bab834 100644 --- a/Language/Variables/syntax_t06.dart +++ b/Language/Variables/syntax_t06.dart @@ -1,38 +1,38 @@ -// 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 variableDeclaration: -/// declaredIdentifier (‘, ’ identifier)* -/// ; -/// declaredIdentifier: -/// metadata finalConstVarOrType identifier -/// ; -/// finalConstVarOrType: -/// final type? | -/// const type? | -/// varOrType -/// ; -/// varOrType: -/// var | -/// type -/// ; -/// initializedVariableDeclaration: -/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* -/// ; -/// initializedIdentifier: -/// identifier (‘=’ expression)? -/// ; -/// initializedIdentifierList: -/// initializedIdentifier (‘, ’ initializedIdentifier)* -/// ; -/// @description Checks that a variable declaration must contain an identifier. -/// @author iefremov - - -main() { - final ; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 variableDeclaration: +/// declaredIdentifier (‘, ’ identifier)* +/// ; +/// declaredIdentifier: +/// metadata finalConstVarOrType identifier +/// ; +/// finalConstVarOrType: +/// final type? | +/// const type? | +/// varOrType +/// ; +/// varOrType: +/// var | +/// type +/// ; +/// initializedVariableDeclaration: +/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* +/// ; +/// initializedIdentifier: +/// identifier (‘=’ expression)? +/// ; +/// initializedIdentifierList: +/// initializedIdentifier (‘, ’ initializedIdentifier)* +/// ; +/// @description Checks that a variable declaration must contain an identifier. +/// @author iefremov + + +main() { + final ; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Variables/syntax_t07.dart b/Language/Variables/syntax_t07.dart index 3ebcfb7601..2537508824 100644 --- a/Language/Variables/syntax_t07.dart +++ b/Language/Variables/syntax_t07.dart @@ -1,38 +1,38 @@ -// 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 variableDeclaration: -/// declaredIdentifier (‘, ’ identifier)* -/// ; -/// declaredIdentifier: -/// metadata finalConstVarOrType identifier -/// ; -/// finalConstVarOrType: -/// final type? | -/// const type? | -/// varOrType -/// ; -/// varOrType: -/// var | -/// type -/// ; -/// initializedVariableDeclaration: -/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* -/// ; -/// initializedIdentifier: -/// identifier (‘=’ expression)? -/// ; -/// initializedIdentifierList: -/// initializedIdentifier (‘, ’ initializedIdentifier)* -/// ; -/// @description Checks that a variable declaration cannot end with a comma. -/// @author iefremov - - -main() { - var x, ; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 variableDeclaration: +/// declaredIdentifier (‘, ’ identifier)* +/// ; +/// declaredIdentifier: +/// metadata finalConstVarOrType identifier +/// ; +/// finalConstVarOrType: +/// final type? | +/// const type? | +/// varOrType +/// ; +/// varOrType: +/// var | +/// type +/// ; +/// initializedVariableDeclaration: +/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* +/// ; +/// initializedIdentifier: +/// identifier (‘=’ expression)? +/// ; +/// initializedIdentifierList: +/// initializedIdentifier (‘, ’ initializedIdentifier)* +/// ; +/// @description Checks that a variable declaration cannot end with a comma. +/// @author iefremov + + +main() { + var x, ; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Variables/syntax_t08.dart b/Language/Variables/syntax_t08.dart index 3df767ec0c..40869b2f78 100644 --- a/Language/Variables/syntax_t08.dart +++ b/Language/Variables/syntax_t08.dart @@ -1,39 +1,39 @@ -// 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 variableDeclaration: -/// declaredIdentifier (‘, ’ identifier)* -/// ; -/// declaredIdentifier: -/// metadata finalConstVarOrType identifier -/// ; -/// finalConstVarOrType: -/// final type? | -/// const type? | -/// varOrType -/// ; -/// varOrType: -/// var | -/// type -/// ; -/// initializedVariableDeclaration: -/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* -/// ; -/// initializedIdentifier: -/// identifier (‘=’ expression)? -/// ; -/// initializedIdentifierList: -/// initializedIdentifier (‘, ’ initializedIdentifier)* -/// ; -/// @description Checks that different variables in a single variable -/// declaration must be delimited by commas. -/// @author iefremov - - -main() { - var x y; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 variableDeclaration: +/// declaredIdentifier (‘, ’ identifier)* +/// ; +/// declaredIdentifier: +/// metadata finalConstVarOrType identifier +/// ; +/// finalConstVarOrType: +/// final type? | +/// const type? | +/// varOrType +/// ; +/// varOrType: +/// var | +/// type +/// ; +/// initializedVariableDeclaration: +/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* +/// ; +/// initializedIdentifier: +/// identifier (‘=’ expression)? +/// ; +/// initializedIdentifierList: +/// initializedIdentifier (‘, ’ initializedIdentifier)* +/// ; +/// @description Checks that different variables in a single variable +/// declaration must be delimited by commas. +/// @author iefremov + + +main() { + var x y; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Variables/syntax_t09.dart b/Language/Variables/syntax_t09.dart index d3cb47d288..5d0842e5bf 100644 --- a/Language/Variables/syntax_t09.dart +++ b/Language/Variables/syntax_t09.dart @@ -1,39 +1,39 @@ -// 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 variableDeclaration: -/// declaredIdentifier (‘, ’ identifier)* -/// ; -/// declaredIdentifier: -/// metadata finalConstVarOrType identifier -/// ; -/// finalConstVarOrType: -/// final type? | -/// const type? | -/// varOrType -/// ; -/// varOrType: -/// var | -/// type -/// ; -/// initializedVariableDeclaration: -/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* -/// ; -/// initializedIdentifier: -/// identifier (‘=’ expression)? -/// ; -/// initializedIdentifierList: -/// initializedIdentifier (‘, ’ initializedIdentifier)* -/// ; -/// @description Checks that it is a compile-time error if the right-hand -/// expression is missed in an initialized variable declaration. -/// @author iefremov - - -main() { - var x =; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 variableDeclaration: +/// declaredIdentifier (‘, ’ identifier)* +/// ; +/// declaredIdentifier: +/// metadata finalConstVarOrType identifier +/// ; +/// finalConstVarOrType: +/// final type? | +/// const type? | +/// varOrType +/// ; +/// varOrType: +/// var | +/// type +/// ; +/// initializedVariableDeclaration: +/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* +/// ; +/// initializedIdentifier: +/// identifier (‘=’ expression)? +/// ; +/// initializedIdentifierList: +/// initializedIdentifier (‘, ’ initializedIdentifier)* +/// ; +/// @description Checks that it is a compile-time error if the right-hand +/// expression is missed in an initialized variable declaration. +/// @author iefremov + + +main() { + var x =; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Variables/syntax_t10.dart b/Language/Variables/syntax_t10.dart index 7eebdca405..32a9552cef 100644 --- a/Language/Variables/syntax_t10.dart +++ b/Language/Variables/syntax_t10.dart @@ -1,39 +1,39 @@ -// 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 variableDeclaration: -/// declaredIdentifier (‘, ’ identifier)* -/// ; -/// declaredIdentifier: -/// metadata finalConstVarOrType identifier -/// ; -/// finalConstVarOrType: -/// final type? | -/// const type? | -/// varOrType -/// ; -/// varOrType: -/// var | -/// type -/// ; -/// initializedVariableDeclaration: -/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* -/// ; -/// initializedIdentifier: -/// identifier (‘=’ expression)? -/// ; -/// initializedIdentifierList: -/// initializedIdentifier (‘, ’ initializedIdentifier)* -/// ; -/// @description Checks that a non-expression statement cannot be used instead -/// of expression in an initialized variable declaration. -/// @author iefremov - - -main() { - var x = return 0; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 variableDeclaration: +/// declaredIdentifier (‘, ’ identifier)* +/// ; +/// declaredIdentifier: +/// metadata finalConstVarOrType identifier +/// ; +/// finalConstVarOrType: +/// final type? | +/// const type? | +/// varOrType +/// ; +/// varOrType: +/// var | +/// type +/// ; +/// initializedVariableDeclaration: +/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* +/// ; +/// initializedIdentifier: +/// identifier (‘=’ expression)? +/// ; +/// initializedIdentifierList: +/// initializedIdentifier (‘, ’ initializedIdentifier)* +/// ; +/// @description Checks that a non-expression statement cannot be used instead +/// of expression in an initialized variable declaration. +/// @author iefremov + + +main() { + var x = return 0; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Variables/syntax_t11.dart b/Language/Variables/syntax_t11.dart index 5b2ed73624..7af7b9bce7 100644 --- a/Language/Variables/syntax_t11.dart +++ b/Language/Variables/syntax_t11.dart @@ -1,39 +1,39 @@ -// 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 variableDeclaration: -/// declaredIdentifier (‘, ’ identifier)* -/// ; -/// declaredIdentifier: -/// metadata finalConstVarOrType identifier -/// ; -/// finalConstVarOrType: -/// final type? | -/// const type? | -/// varOrType -/// ; -/// varOrType: -/// var | -/// type -/// ; -/// initializedVariableDeclaration: -/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* -/// ; -/// initializedIdentifier: -/// identifier (‘=’ expression)? -/// ; -/// initializedIdentifierList: -/// initializedIdentifier (‘, ’ initializedIdentifier)* -/// ; -/// @description Checks that it is a compile-time error if the right-hand -/// expression is missing in an initialized variable declaration. -/// @author iefremov - - -main() { - var x = 1, y = ; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 variableDeclaration: +/// declaredIdentifier (‘, ’ identifier)* +/// ; +/// declaredIdentifier: +/// metadata finalConstVarOrType identifier +/// ; +/// finalConstVarOrType: +/// final type? | +/// const type? | +/// varOrType +/// ; +/// varOrType: +/// var | +/// type +/// ; +/// initializedVariableDeclaration: +/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* +/// ; +/// initializedIdentifier: +/// identifier (‘=’ expression)? +/// ; +/// initializedIdentifierList: +/// initializedIdentifier (‘, ’ initializedIdentifier)* +/// ; +/// @description Checks that it is a compile-time error if the right-hand +/// expression is missing in an initialized variable declaration. +/// @author iefremov + + +main() { + var x = 1, y = ; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Variables/syntax_t12.dart b/Language/Variables/syntax_t12.dart index 40b60135e4..ba34d968b4 100644 --- a/Language/Variables/syntax_t12.dart +++ b/Language/Variables/syntax_t12.dart @@ -1,39 +1,39 @@ -// 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 variableDeclaration: -/// declaredIdentifier (‘, ’ identifier)* -/// ; -/// declaredIdentifier: -/// metadata finalConstVarOrType identifier -/// ; -/// finalConstVarOrType: -/// final type? | -/// const type? | -/// varOrType -/// ; -/// varOrType: -/// var | -/// type -/// ; -/// initializedVariableDeclaration: -/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* -/// ; -/// initializedIdentifier: -/// identifier (‘=’ expression)? -/// ; -/// initializedIdentifierList: -/// initializedIdentifier (‘, ’ initializedIdentifier)* -/// ; -/// @description Checks that variable declaration cannot contain both 'const' -/// and 'var'. -/// @author msyabro - - -main() { - const var x = 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 variableDeclaration: +/// declaredIdentifier (‘, ’ identifier)* +/// ; +/// declaredIdentifier: +/// metadata finalConstVarOrType identifier +/// ; +/// finalConstVarOrType: +/// final type? | +/// const type? | +/// varOrType +/// ; +/// varOrType: +/// var | +/// type +/// ; +/// initializedVariableDeclaration: +/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* +/// ; +/// initializedIdentifier: +/// identifier (‘=’ expression)? +/// ; +/// initializedIdentifierList: +/// initializedIdentifier (‘, ’ initializedIdentifier)* +/// ; +/// @description Checks that variable declaration cannot contain both 'const' +/// and 'var'. +/// @author msyabro + + +main() { + const var x = 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Variables/syntax_t13.dart b/Language/Variables/syntax_t13.dart index a9a4f1e894..977bd0d466 100644 --- a/Language/Variables/syntax_t13.dart +++ b/Language/Variables/syntax_t13.dart @@ -1,39 +1,39 @@ -// 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 variableDeclaration: -/// declaredIdentifier (‘, ’ identifier)* -/// ; -/// declaredIdentifier: -/// metadata finalConstVarOrType identifier -/// ; -/// finalConstVarOrType: -/// final type? | -/// const type? | -/// varOrType -/// ; -/// varOrType: -/// var | -/// type -/// ; -/// initializedVariableDeclaration: -/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* -/// ; -/// initializedIdentifier: -/// identifier (‘=’ expression)? -/// ; -/// initializedIdentifierList: -/// initializedIdentifier (‘, ’ initializedIdentifier)* -/// ; -/// @description Checks that variable declaration cannot contain both 'const' -/// and 'final'. -/// @author msyabro - - -main() { - const final x = 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 variableDeclaration: +/// declaredIdentifier (‘, ’ identifier)* +/// ; +/// declaredIdentifier: +/// metadata finalConstVarOrType identifier +/// ; +/// finalConstVarOrType: +/// final type? | +/// const type? | +/// varOrType +/// ; +/// varOrType: +/// var | +/// type +/// ; +/// initializedVariableDeclaration: +/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* +/// ; +/// initializedIdentifier: +/// identifier (‘=’ expression)? +/// ; +/// initializedIdentifierList: +/// initializedIdentifier (‘, ’ initializedIdentifier)* +/// ; +/// @description Checks that variable declaration cannot contain both 'const' +/// and 'final'. +/// @author msyabro + + +main() { + const final x = 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Variables/syntax_t14.dart b/Language/Variables/syntax_t14.dart index 8522d49e79..6cd11d3497 100644 --- a/Language/Variables/syntax_t14.dart +++ b/Language/Variables/syntax_t14.dart @@ -1,39 +1,39 @@ -// 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 variableDeclaration: -/// declaredIdentifier (‘, ’ identifier)* -/// ; -/// declaredIdentifier: -/// metadata finalConstVarOrType identifier -/// ; -/// finalConstVarOrType: -/// final type? | -/// const type? | -/// varOrType -/// ; -/// varOrType: -/// var | -/// type -/// ; -/// initializedVariableDeclaration: -/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* -/// ; -/// initializedIdentifier: -/// identifier (‘=’ expression)? -/// ; -/// initializedIdentifierList: -/// initializedIdentifier (‘, ’ initializedIdentifier)* -/// ; -/// @description Checks that variable declaration cannot contain 'const', -/// 'final' and 'var' simultaneously. -/// @author msyabro - - -main() { - const final var x = 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 variableDeclaration: +/// declaredIdentifier (‘, ’ identifier)* +/// ; +/// declaredIdentifier: +/// metadata finalConstVarOrType identifier +/// ; +/// finalConstVarOrType: +/// final type? | +/// const type? | +/// varOrType +/// ; +/// varOrType: +/// var | +/// type +/// ; +/// initializedVariableDeclaration: +/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* +/// ; +/// initializedIdentifier: +/// identifier (‘=’ expression)? +/// ; +/// initializedIdentifierList: +/// initializedIdentifier (‘, ’ initializedIdentifier)* +/// ; +/// @description Checks that variable declaration cannot contain 'const', +/// 'final' and 'var' simultaneously. +/// @author msyabro + + +main() { + const final var x = 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Variables/syntax_t15.dart b/Language/Variables/syntax_t15.dart index 1701535e59..4db6f507f5 100644 --- a/Language/Variables/syntax_t15.dart +++ b/Language/Variables/syntax_t15.dart @@ -1,46 +1,46 @@ -// 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 variableDeclaration: -/// declaredIdentifier (‘, ’ identifier)* -/// ; -/// declaredIdentifier: -/// metadata finalConstVarOrType identifier -/// ; -/// finalConstVarOrType: -/// final type? | -/// const type? | -/// varOrType -/// ; -/// varOrType: -/// var | -/// type -/// ; -/// initializedVariableDeclaration: -/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* -/// ; -/// initializedIdentifier: -/// identifier (‘=’ expression)? -/// ; -/// initializedIdentifierList: -/// initializedIdentifier (‘, ’ initializedIdentifier)* -/// ; -/// @description Checks that a field declaration may contain the -/// 'abstract' keyword. -/// See https://github.com/dart-lang/language/tree/master/accepted/future-releases/abstract-external-fields -/// @author kaigorodov -/// @issue 42979 - - -abstract class C { - abstract int x; -} - -class D extends C { - int x = 1; -} - -main() { - new D(); -} +// 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 variableDeclaration: +/// declaredIdentifier (‘, ’ identifier)* +/// ; +/// declaredIdentifier: +/// metadata finalConstVarOrType identifier +/// ; +/// finalConstVarOrType: +/// final type? | +/// const type? | +/// varOrType +/// ; +/// varOrType: +/// var | +/// type +/// ; +/// initializedVariableDeclaration: +/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* +/// ; +/// initializedIdentifier: +/// identifier (‘=’ expression)? +/// ; +/// initializedIdentifierList: +/// initializedIdentifier (‘, ’ initializedIdentifier)* +/// ; +/// @description Checks that a field declaration may contain the +/// 'abstract' keyword. +/// See https://github.com/dart-lang/language/tree/master/accepted/future-releases/abstract-external-fields +/// @author kaigorodov +/// @issue 42979 + + +abstract class C { + abstract int x; +} + +class D extends C { + int x = 1; +} + +main() { + new D(); +} diff --git a/Language/Variables/syntax_t16.dart b/Language/Variables/syntax_t16.dart index 0e4d4b1ae4..ce24eba151 100644 --- a/Language/Variables/syntax_t16.dart +++ b/Language/Variables/syntax_t16.dart @@ -1,45 +1,45 @@ -// 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 variableDeclaration: -/// declaredIdentifier (‘, ’ identifier)* -/// ; -/// declaredIdentifier: -/// metadata finalConstVarOrType identifier -/// ; -/// finalConstVarOrType: -/// final type? | -/// const type? | -/// varOrType -/// ; -/// varOrType: -/// var | -/// type -/// ; -/// initializedVariableDeclaration: -/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* -/// ; -/// initializedIdentifier: -/// identifier (‘=’ expression)? -/// ; -/// initializedIdentifierList: -/// initializedIdentifier (‘, ’ initializedIdentifier)* -/// ; -/// @description Checks that a variable declaration cannot contain the -/// 'factory' keyword. -/// @author kaigorodov - - -class C { - factory var x = 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} - -main() { - new C(); -// ^ -// [cfe] unspecified -} +// 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 variableDeclaration: +/// declaredIdentifier (‘, ’ identifier)* +/// ; +/// declaredIdentifier: +/// metadata finalConstVarOrType identifier +/// ; +/// finalConstVarOrType: +/// final type? | +/// const type? | +/// varOrType +/// ; +/// varOrType: +/// var | +/// type +/// ; +/// initializedVariableDeclaration: +/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* +/// ; +/// initializedIdentifier: +/// identifier (‘=’ expression)? +/// ; +/// initializedIdentifierList: +/// initializedIdentifier (‘, ’ initializedIdentifier)* +/// ; +/// @description Checks that a variable declaration cannot contain the +/// 'factory' keyword. +/// @author kaigorodov + + +class C { + factory var x = 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new C(); +// ^ +// [cfe] unspecified +} diff --git a/Language/Variables/syntax_t17.dart b/Language/Variables/syntax_t17.dart index aa6c5d6121..038506042b 100644 --- a/Language/Variables/syntax_t17.dart +++ b/Language/Variables/syntax_t17.dart @@ -1,39 +1,39 @@ -// 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 variableDeclaration: -/// declaredIdentifier (‘, ’ identifier)* -/// ; -/// declaredIdentifier: -/// metadata finalConstVarOrType identifier -/// ; -/// finalConstVarOrType: -/// final type? | -/// const type? | -/// varOrType -/// ; -/// varOrType: -/// var | -/// type -/// ; -/// initializedVariableDeclaration: -/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* -/// ; -/// initializedIdentifier: -/// identifier (‘=’ expression)? -/// ; -/// initializedIdentifierList: -/// initializedIdentifier (‘, ’ initializedIdentifier)* -/// ; -/// @description Checks that only assignment operator is admitted when -/// variable is initialized. -/// @author hlodvig - - -main() { - var x += 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 variableDeclaration: +/// declaredIdentifier (‘, ’ identifier)* +/// ; +/// declaredIdentifier: +/// metadata finalConstVarOrType identifier +/// ; +/// finalConstVarOrType: +/// final type? | +/// const type? | +/// varOrType +/// ; +/// varOrType: +/// var | +/// type +/// ; +/// initializedVariableDeclaration: +/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* +/// ; +/// initializedIdentifier: +/// identifier (‘=’ expression)? +/// ; +/// initializedIdentifierList: +/// initializedIdentifier (‘, ’ initializedIdentifier)* +/// ; +/// @description Checks that only assignment operator is admitted when +/// variable is initialized. +/// @author hlodvig + + +main() { + var x += 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Variables/syntax_t18.dart b/Language/Variables/syntax_t18.dart index 1f1aa4545f..d6e78f8023 100644 --- a/Language/Variables/syntax_t18.dart +++ b/Language/Variables/syntax_t18.dart @@ -1,40 +1,40 @@ -// 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 variableDeclaration: -/// declaredIdentifier (‘, ’ identifier)* -/// ; -/// declaredIdentifier: -/// metadata finalConstVarOrType identifier -/// ; -/// finalConstVarOrType: -/// final type? | -/// const type? | -/// varOrType -/// ; -/// varOrType: -/// var | -/// type -/// ; -/// initializedVariableDeclaration: -/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* -/// ; -/// initializedIdentifier: -/// identifier (‘=’ expression)? -/// ; -/// initializedIdentifierList: -/// initializedIdentifier (‘, ’ initializedIdentifier)* -/// ; -/// @description Checks that a variable may be abstract void. -/// See https://github.com/dart-lang/language/tree/master/accepted/future-releases/abstract-external-fields -/// @author kaigorodov - - -abstract class C { - abstract void x; -} - -main() { - C? c = null; -} +// 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 variableDeclaration: +/// declaredIdentifier (‘, ’ identifier)* +/// ; +/// declaredIdentifier: +/// metadata finalConstVarOrType identifier +/// ; +/// finalConstVarOrType: +/// final type? | +/// const type? | +/// varOrType +/// ; +/// varOrType: +/// var | +/// type +/// ; +/// initializedVariableDeclaration: +/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* +/// ; +/// initializedIdentifier: +/// identifier (‘=’ expression)? +/// ; +/// initializedIdentifierList: +/// initializedIdentifier (‘, ’ initializedIdentifier)* +/// ; +/// @description Checks that a variable may be abstract void. +/// See https://github.com/dart-lang/language/tree/master/accepted/future-releases/abstract-external-fields +/// @author kaigorodov + + +abstract class C { + abstract void x; +} + +main() { + C? c = null; +} diff --git a/Language/Variables/syntax_t19.dart b/Language/Variables/syntax_t19.dart index 2a0709aa06..e72f38662a 100644 --- a/Language/Variables/syntax_t19.dart +++ b/Language/Variables/syntax_t19.dart @@ -1,39 +1,39 @@ -// 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 variableDeclaration: -/// declaredIdentifier (‘, ’ identifier)* -/// ; -/// declaredIdentifier: -/// metadata finalConstVarOrType identifier -/// ; -/// finalConstVarOrType: -/// final type? | -/// const type? | -/// varOrType -/// ; -/// varOrType: -/// var | -/// type -/// ; -/// initializedVariableDeclaration: -/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* -/// ; -/// initializedIdentifier: -/// identifier (‘=’ expression)? -/// ; -/// initializedIdentifierList: -/// initializedIdentifier (‘, ’ initializedIdentifier)* -/// ; -/// @description Checks that only assignment operator is admitted when -/// variable is initialized. -/// @author hlodvig - - -main() { - var x /= 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 variableDeclaration: +/// declaredIdentifier (‘, ’ identifier)* +/// ; +/// declaredIdentifier: +/// metadata finalConstVarOrType identifier +/// ; +/// finalConstVarOrType: +/// final type? | +/// const type? | +/// varOrType +/// ; +/// varOrType: +/// var | +/// type +/// ; +/// initializedVariableDeclaration: +/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* +/// ; +/// initializedIdentifier: +/// identifier (‘=’ expression)? +/// ; +/// initializedIdentifierList: +/// initializedIdentifier (‘, ’ initializedIdentifier)* +/// ; +/// @description Checks that only assignment operator is admitted when +/// variable is initialized. +/// @author hlodvig + + +main() { + var x /= 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Variables/syntax_t20.dart b/Language/Variables/syntax_t20.dart index dcb213ca63..4955a2657b 100644 --- a/Language/Variables/syntax_t20.dart +++ b/Language/Variables/syntax_t20.dart @@ -1,39 +1,39 @@ -// 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 variableDeclaration: -/// declaredIdentifier (‘, ’ identifier)* -/// ; -/// declaredIdentifier: -/// metadata finalConstVarOrType identifier -/// ; -/// finalConstVarOrType: -/// final type? | -/// const type? | -/// varOrType -/// ; -/// varOrType: -/// var | -/// type -/// ; -/// initializedVariableDeclaration: -/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* -/// ; -/// initializedIdentifier: -/// identifier (‘=’ expression)? -/// ; -/// initializedIdentifierList: -/// initializedIdentifier (‘, ’ initializedIdentifier)* -/// ; -/// @description Checks that only assignment operator is admitted when -/// variable is initialized. -/// @author hlodvig - - -main() { - var x *= 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 variableDeclaration: +/// declaredIdentifier (‘, ’ identifier)* +/// ; +/// declaredIdentifier: +/// metadata finalConstVarOrType identifier +/// ; +/// finalConstVarOrType: +/// final type? | +/// const type? | +/// varOrType +/// ; +/// varOrType: +/// var | +/// type +/// ; +/// initializedVariableDeclaration: +/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* +/// ; +/// initializedIdentifier: +/// identifier (‘=’ expression)? +/// ; +/// initializedIdentifierList: +/// initializedIdentifier (‘, ’ initializedIdentifier)* +/// ; +/// @description Checks that only assignment operator is admitted when +/// variable is initialized. +/// @author hlodvig + + +main() { + var x *= 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Variables/syntax_t21.dart b/Language/Variables/syntax_t21.dart index baade9d7f4..e430e4acb6 100644 --- a/Language/Variables/syntax_t21.dart +++ b/Language/Variables/syntax_t21.dart @@ -1,39 +1,39 @@ -// 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 variableDeclaration: -/// declaredIdentifier (‘, ’ identifier)* -/// ; -/// declaredIdentifier: -/// metadata finalConstVarOrType identifier -/// ; -/// finalConstVarOrType: -/// final type? | -/// const type? | -/// varOrType -/// ; -/// varOrType: -/// var | -/// type -/// ; -/// initializedVariableDeclaration: -/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* -/// ; -/// initializedIdentifier: -/// identifier (‘=’ expression)? -/// ; -/// initializedIdentifierList: -/// initializedIdentifier (‘, ’ initializedIdentifier)* -/// ; -/// @description Checks that only assignment operator is admitted when -/// variable is initialized. -/// @author hlodvig - - -main() { - var x++; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 variableDeclaration: +/// declaredIdentifier (‘, ’ identifier)* +/// ; +/// declaredIdentifier: +/// metadata finalConstVarOrType identifier +/// ; +/// finalConstVarOrType: +/// final type? | +/// const type? | +/// varOrType +/// ; +/// varOrType: +/// var | +/// type +/// ; +/// initializedVariableDeclaration: +/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* +/// ; +/// initializedIdentifier: +/// identifier (‘=’ expression)? +/// ; +/// initializedIdentifierList: +/// initializedIdentifier (‘, ’ initializedIdentifier)* +/// ; +/// @description Checks that only assignment operator is admitted when +/// variable is initialized. +/// @author hlodvig + + +main() { + var x++; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Variables/syntax_t22.dart b/Language/Variables/syntax_t22.dart index 5e0cd264ec..0a0a02fca2 100644 --- a/Language/Variables/syntax_t22.dart +++ b/Language/Variables/syntax_t22.dart @@ -1,39 +1,39 @@ -// 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 variableDeclaration: -/// declaredIdentifier (‘, ’ identifier)* -/// ; -/// declaredIdentifier: -/// metadata finalConstVarOrType identifier -/// ; -/// finalConstVarOrType: -/// final type? | -/// const type? | -/// varOrType -/// ; -/// varOrType: -/// var | -/// type -/// ; -/// initializedVariableDeclaration: -/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* -/// ; -/// initializedIdentifier: -/// identifier (‘=’ expression)? -/// ; -/// initializedIdentifierList: -/// initializedIdentifier (‘, ’ initializedIdentifier)* -/// ; -/// @description Checks that only assignment operator is admitted when -/// variable is initialized. -/// @author hlodvig - - -main() { - var --x; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 variableDeclaration: +/// declaredIdentifier (‘, ’ identifier)* +/// ; +/// declaredIdentifier: +/// metadata finalConstVarOrType identifier +/// ; +/// finalConstVarOrType: +/// final type? | +/// const type? | +/// varOrType +/// ; +/// varOrType: +/// var | +/// type +/// ; +/// initializedVariableDeclaration: +/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* +/// ; +/// initializedIdentifier: +/// identifier (‘=’ expression)? +/// ; +/// initializedIdentifierList: +/// initializedIdentifier (‘, ’ initializedIdentifier)* +/// ; +/// @description Checks that only assignment operator is admitted when +/// variable is initialized. +/// @author hlodvig + + +main() { + var --x; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/Language/Variables/syntax_t23.dart b/Language/Variables/syntax_t23.dart index 48fc7809f4..b83d5d7939 100644 --- a/Language/Variables/syntax_t23.dart +++ b/Language/Variables/syntax_t23.dart @@ -1,39 +1,39 @@ -// 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 variableDeclaration: -/// declaredIdentifier (‘, ’ identifier)* -/// ; -/// declaredIdentifier: -/// metadata finalConstVarOrType identifier -/// ; -/// finalConstVarOrType: -/// final type? | -/// const type? | -/// varOrType -/// ; -/// varOrType: -/// var | -/// type -/// ; -/// initializedVariableDeclaration: -/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* -/// ; -/// initializedIdentifier: -/// identifier (‘=’ expression)? -/// ; -/// initializedIdentifierList: -/// initializedIdentifier (‘, ’ initializedIdentifier)* -/// ; -/// @description Checks that only assignment operator is admitted when -/// variable is initialized. -/// @author hlodvig - - -main() { - var x * 1; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -} +// 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 variableDeclaration: +/// declaredIdentifier (‘, ’ identifier)* +/// ; +/// declaredIdentifier: +/// metadata finalConstVarOrType identifier +/// ; +/// finalConstVarOrType: +/// final type? | +/// const type? | +/// varOrType +/// ; +/// varOrType: +/// var | +/// type +/// ; +/// initializedVariableDeclaration: +/// declaredIdentifier (‘=’ expression)? (‘, ’ initializedIdentifier)* +/// ; +/// initializedIdentifier: +/// identifier (‘=’ expression)? +/// ; +/// initializedIdentifierList: +/// initializedIdentifier (‘, ’ initializedIdentifier)* +/// ; +/// @description Checks that only assignment operator is admitted when +/// variable is initialized. +/// @author hlodvig + + +main() { + var x * 1; +// ^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/LibTest/core/Expando/Expando_A01_t01.dart b/LibTest/core/Expando/Expando_A01_t01.dart index 4525de958c..2c739874dc 100644 --- a/LibTest/core/Expando/Expando_A01_t01.dart +++ b/LibTest/core/Expando/Expando_A01_t01.dart @@ -1,17 +1,17 @@ -// 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 new Expando([String name]) -/// Creates a new Expando. The optional name is only used for debugging purposes -/// and creating two different Expandos with the same name yields two Expandos -/// that work on different properties of the objects they are used on. -/// @description Checks two Expandos constructed with identical arguments are -/// still different objects. -/// @author rodionov - -import "../../../Utils/expect.dart"; - -main() { - Expect.isFalse(identical(new Expando(), new Expando())); -} +// 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 new Expando([String name]) +/// Creates a new Expando. The optional name is only used for debugging purposes +/// and creating two different Expandos with the same name yields two Expandos +/// that work on different properties of the objects they are used on. +/// @description Checks two Expandos constructed with identical arguments are +/// still different objects. +/// @author rodionov + +import "../../../Utils/expect.dart"; + +main() { + Expect.isFalse(identical(new Expando(), new Expando())); +} diff --git a/LibTest/core/Expando/Expando_A01_t02.dart b/LibTest/core/Expando/Expando_A01_t02.dart index 71e442ad91..88eca37712 100644 --- a/LibTest/core/Expando/Expando_A01_t02.dart +++ b/LibTest/core/Expando/Expando_A01_t02.dart @@ -1,17 +1,17 @@ -// 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 new Expando([String name]) -/// Creates a new Expando. The optional name is only used for debugging purposes -/// and creating two different Expandos with the same name yields two Expandos -/// that work on different properties of the objects they are used on. -/// @description Checks two Expandos constructed with identical arguments are -/// still different objects. -/// @author rodionov - -import "../../../Utils/expect.dart"; - -main() { - Expect.isFalse(identical(new Expando("foo"), new Expando("foo"))); -} +// 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 new Expando([String name]) +/// Creates a new Expando. The optional name is only used for debugging purposes +/// and creating two different Expandos with the same name yields two Expandos +/// that work on different properties of the objects they are used on. +/// @description Checks two Expandos constructed with identical arguments are +/// still different objects. +/// @author rodionov + +import "../../../Utils/expect.dart"; + +main() { + Expect.isFalse(identical(new Expando("foo"), new Expando("foo"))); +} diff --git a/LibTest/core/Function/Function_class_A01_t01.dart b/LibTest/core/Function/Function_class_A01_t01.dart index 00130970b5..a098e020d7 100644 --- a/LibTest/core/Function/Function_class_A01_t01.dart +++ b/LibTest/core/Function/Function_class_A01_t01.dart @@ -1,28 +1,28 @@ -// 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 function value, or an instance of a class with a "call" method, -/// is a subtype of a function type, and as such, a subtype of Function. -/// @description Checks that function values are indeed subtypes of the -/// [Function] class. -/// @author rodionov - -import "../../../Utils/expect.dart"; - -int foo(String s) { - return 21; -} - -int foo1() => 1; - -main() { - Expect.isTrue(foo is Function); - Expect.isTrue(foo1 is Function); - Expect.isTrue((int, double) { return 1; } is Function); - Expect.isTrue((() => 1) is Function); - Expect.runtimeIsType(foo); - Expect.runtimeIsType(foo1); - Expect.runtimeIsType((int, double) { return 1; }); - Expect.runtimeIsType((() => 1)); -} +// 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 function value, or an instance of a class with a "call" method, +/// is a subtype of a function type, and as such, a subtype of Function. +/// @description Checks that function values are indeed subtypes of the +/// [Function] class. +/// @author rodionov + +import "../../../Utils/expect.dart"; + +int foo(String s) { + return 21; +} + +int foo1() => 1; + +main() { + Expect.isTrue(foo is Function); + Expect.isTrue(foo1 is Function); + Expect.isTrue((int, double) { return 1; } is Function); + Expect.isTrue((() => 1) is Function); + Expect.runtimeIsType(foo); + Expect.runtimeIsType(foo1); + Expect.runtimeIsType((int, double) { return 1; }); + Expect.runtimeIsType((() => 1)); +} diff --git a/LibTest/core/Function/apply_A01_t01.dart b/LibTest/core/Function/apply_A01_t01.dart index 671e3fd9ea..7ecc39a641 100644 --- a/LibTest/core/Function/apply_A01_t01.dart +++ b/LibTest/core/Function/apply_A01_t01.dart @@ -1,40 +1,40 @@ -// 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 dynamic apply(Function function, List positionalArguments, -/// [Map namedArguments]) -/// Dynamically call function with the specified arguments. -/// Acts the same as calling function with positional arguments corresponding -/// to the elements of positionalArguments and named arguments corresponding -/// to the elements of namedArguments. -/// @description Checks that invoking a Function object via Function.apply -/// produces expected results. -/// @author rodionov - -import "../../../Utils/expect.dart"; - -class A { - String call(int x, int y) { - return "$x$y"; - } -} - -class B extends A {} - -String foo(x1, y1, {x2 = "x2", y2}) { - return "$x1$y1$x2$y2"; -} - -main() { - Expect.equals("12", Function.apply(new A(), [1, 2], null)); - Expect.equals("1122", Function.apply(new B(), [11, 22], null)); - - Map namedArgs = new Map(); - namedArgs[const Symbol("y2")] = 22; - Expect.equals("x1y1x222", Function.apply(foo, ["x1", "y1"], namedArgs)); - - namedArgs[const Symbol("x2")] = "x3"; - namedArgs[const Symbol("y2")] = "y3"; - Expect.equals("x1y1x3y3", Function.apply(foo, ["x1", "y1"], namedArgs)); -} +// 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 dynamic apply(Function function, List positionalArguments, +/// [Map namedArguments]) +/// Dynamically call function with the specified arguments. +/// Acts the same as calling function with positional arguments corresponding +/// to the elements of positionalArguments and named arguments corresponding +/// to the elements of namedArguments. +/// @description Checks that invoking a Function object via Function.apply +/// produces expected results. +/// @author rodionov + +import "../../../Utils/expect.dart"; + +class A { + String call(int x, int y) { + return "$x$y"; + } +} + +class B extends A {} + +String foo(x1, y1, {x2 = "x2", y2}) { + return "$x1$y1$x2$y2"; +} + +main() { + Expect.equals("12", Function.apply(new A(), [1, 2], null)); + Expect.equals("1122", Function.apply(new B(), [11, 22], null)); + + Map namedArgs = new Map(); + namedArgs[const Symbol("y2")] = 22; + Expect.equals("x1y1x222", Function.apply(foo, ["x1", "y1"], namedArgs)); + + namedArgs[const Symbol("x2")] = "x3"; + namedArgs[const Symbol("y2")] = "y3"; + Expect.equals("x1y1x3y3", Function.apply(foo, ["x1", "y1"], namedArgs)); +} diff --git a/LibTest/core/Null/Null_class_A01_t01.dart b/LibTest/core/Null/Null_class_A01_t01.dart index 272fd4d44a..e21806aae9 100644 --- a/LibTest/core/Null/Null_class_A01_t01.dart +++ b/LibTest/core/Null/Null_class_A01_t01.dart @@ -1,16 +1,16 @@ -// 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 Null class -/// The reserved word null denotes an object that is the sole instance of this -/// class. -/// @description Checks that null is indeed an instance of class Null. -/// @author rodionov - -import "../../../Utils/expect.dart"; - -main() { - Expect.isTrue(null is Null); - Expect.runtimeIsType(null); -} +// 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 Null class +/// The reserved word null denotes an object that is the sole instance of this +/// class. +/// @description Checks that null is indeed an instance of class Null. +/// @author rodionov + +import "../../../Utils/expect.dart"; + +main() { + Expect.isTrue(null is Null); + Expect.runtimeIsType(null); +} diff --git a/LibTest/core/Null/toString_A01_t01.dart b/LibTest/core/Null/toString_A01_t01.dart index df32b859ec..e94fbd8e3b 100644 --- a/LibTest/core/Null/toString_A01_t01.dart +++ b/LibTest/core/Null/toString_A01_t01.dart @@ -1,14 +1,14 @@ -// 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 String toString() -/// Returns the string "null". -/// @description Checks that this method returns the correct value -/// @author rodionov - -import "../../../Utils/expect.dart"; - -main() { - Expect.equals("null", null.toString()); -} +// 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 String toString() +/// Returns the string "null". +/// @description Checks that this method returns the correct value +/// @author rodionov + +import "../../../Utils/expect.dart"; + +main() { + Expect.equals("null", null.toString()); +} diff --git a/LibTest/core/bool/toString_A01_t02.dart b/LibTest/core/bool/toString_A01_t02.dart index a67b97f859..af0550190e 100644 --- a/LibTest/core/bool/toString_A01_t02.dart +++ b/LibTest/core/bool/toString_A01_t02.dart @@ -1,14 +1,14 @@ -// 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 String toString() -/// Returns "true" if the receiver is true, or "false" if the receiver is false. -/// @description Checks that this method returns correct value. -/// @author rodionov - -import "../../../Utils/expect.dart"; - -main() { - Expect.stringEquals("false", false.toString()); -} +// 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 String toString() +/// Returns "true" if the receiver is true, or "false" if the receiver is false. +/// @description Checks that this method returns correct value. +/// @author rodionov + +import "../../../Utils/expect.dart"; + +main() { + Expect.stringEquals("false", false.toString()); +}