#1086. @compile-errors replaced by static errors
diff --git a/Language/Errors_and_Warnings/compile_error_t04.dart b/Language/Errors_and_Warnings/compile_error_t04.dart
index 3e0a5e0..38022e3 100644
--- a/Language/Errors_and_Warnings/compile_error_t04.dart
+++ b/Language/Errors_and_Warnings/compile_error_t04.dart
@@ -7,21 +7,19 @@
/// erroneous code is executed.
/// @description Checks that erroneous code is not executed if there is
/// a compile-time error. Test error in nested function
-/// @compile-error
/// @author sgrekhov@unipro.ru
-
-import '../../Utils/expect.dart';
-
void f1() {
f2();
}
void f2() {
var a = ;
+// ^
+// [analyzer] unspecified
+// [cfe] unspecified
}
main() {
f1();
- Expect.fail("Erroneous code must not be executed");
}
diff --git a/Language/Expressions/Instance_Creation/New/argument_static_type_t02.dart b/Language/Expressions/Instance_Creation/New/argument_static_type_t02.dart
index d40b256..1d611e9 100644
--- a/Language/Expressions/Instance_Creation/New/argument_static_type_t02.dart
+++ b/Language/Expressions/Instance_Creation/New/argument_static_type_t02.dart
@@ -8,14 +8,15 @@
/// @description Checks that it is a compile error if the static type of
/// one of arguments can't be assigned to the type of the corresponding
/// parameter of the named constructor.
-/// @compile-error
/// @author msyabro
-
class C {
C.name(int p1) {}
}
main() {
new C.name("");
+// ^^
+// [analyzer] unspecified
+// [cfe] unspecified
}
diff --git a/Language/Expressions/Instance_Creation/New/type_t06.dart b/Language/Expressions/Instance_Creation/New/type_t06.dart
index 67c8115..a388bb9 100644
--- a/Language/Expressions/Instance_Creation/New/type_t06.dart
+++ b/Language/Expressions/Instance_Creation/New/type_t06.dart
@@ -7,12 +7,13 @@
/// new T(a1, ... , an, xn+1 : an+1, ... , xn+k : an+k).
/// @description Checks that it is compile error if T is a type alias that does
/// not denote a class.
-/// @compile-error
/// @author msyabro
-
typedef int f(int x, int y);
main() {
new f();
+// ^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
}
diff --git a/Language/Expressions/Numbers/syntax_t30.dart b/Language/Expressions/Numbers/syntax_t30.dart
index 851f746..772c48d 100644
--- a/Language/Expressions/Numbers/syntax_t30.dart
+++ b/Language/Expressions/Numbers/syntax_t30.dart
@@ -27,10 +27,11 @@
/// ;
/// @description Checks that a hex numeric literal cannot contain
/// non-hexadecimal digits.
-/// @compile-error
/// @author iefremov
-
main() {
var i = 0xg;
+// ^^^
+// [analyzer] unspecified
+// [cfe] unspecified
}
diff --git a/Language/Libraries_and_Scripts/top_level_syntax_t02.dart b/Language/Libraries_and_Scripts/top_level_syntax_t02.dart
index 8372df2..5ffcd70 100644
--- a/Language/Libraries_and_Scripts/top_level_syntax_t02.dart
+++ b/Language/Libraries_and_Scripts/top_level_syntax_t02.dart
@@ -22,10 +22,8 @@
/// ;
/// @description Checks that a null literal can't be a top level definition
/// in a library.
-/// @compile-error
/// @author msyabro
-
import "top_level_syntax_t02_lib.dart";
main() {
diff --git a/Language/Libraries_and_Scripts/top_level_syntax_t02_lib.dart b/Language/Libraries_and_Scripts/top_level_syntax_t02_lib.dart
index 3422ebd..5ea30c1 100644
--- a/Language/Libraries_and_Scripts/top_level_syntax_t02_lib.dart
+++ b/Language/Libraries_and_Scripts/top_level_syntax_t02_lib.dart
@@ -2,11 +2,13 @@
// for 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 Libraries_and_Scripts_A01_t02;
class C {}
-null
+ null
+//^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
func() {}
diff --git a/Language/Overview/Privacy/private_and_public_t04.dart b/Language/Overview/Privacy/private_and_public_t04.dart
index 54b50c1..2e2a8f0 100644
--- a/Language/Overview/Privacy/private_and_public_t04.dart
+++ b/Language/Overview/Privacy/private_and_public_t04.dart
@@ -12,11 +12,13 @@
/// public.
/// @description Checks that a private variable declaration is inaccessible
/// outside the library.
-/// @compile-error
/// @author msyabro
import "../lib.dart" as lib;
main() {
lib._inaccessibleVariable = 1;
+// ^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
}
diff --git a/Language/Overview/Privacy/private_and_public_t05.dart b/Language/Overview/Privacy/private_and_public_t05.dart
index 47a802c..e477ea2 100644
--- a/Language/Overview/Privacy/private_and_public_t05.dart
+++ b/Language/Overview/Privacy/private_and_public_t05.dart
@@ -12,12 +12,13 @@
/// public.
/// @description Checks that a private function is inaccessible outside the
/// library.
-/// @compile-error
/// @author msyabro
-
import "../lib.dart" as lib;
main() {
lib._inaccessibleFunction();
+// ^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
}
diff --git a/Language/Overview/Privacy/private_and_public_t10.dart b/Language/Overview/Privacy/private_and_public_t10.dart
index 3200891..fb20424 100644
--- a/Language/Overview/Privacy/private_and_public_t10.dart
+++ b/Language/Overview/Privacy/private_and_public_t10.dart
@@ -12,11 +12,13 @@
/// public.
/// @description Checks that access to private static method that
/// is not accessible to the current script results in a compile error
-/// @compile-error
/// @author iefremov
import "../lib.dart";
main() {
ClassWithPrivateMembers._staticfun();
+// ^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
}
diff --git a/Language/Overview/Privacy/private_and_public_t22.dart b/Language/Overview/Privacy/private_and_public_t22.dart
index 313a15a..6ae797c 100644
--- a/Language/Overview/Privacy/private_and_public_t22.dart
+++ b/Language/Overview/Privacy/private_and_public_t22.dart
@@ -13,7 +13,6 @@
/// @description Checks that access to private instance class members
/// from a script that imports the library where the class is declared result
/// in a compile error
-/// @compile-error
/// @author iefremov
import "../lib.dart";
@@ -21,4 +20,7 @@
main() {
var c = new ClassWithPrivateMembers();
c._fun();
+// ^^^^
+// [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 a717e8f..c05c728 100644
--- a/Language/Reference/Lexical_Rules/Reserved_Words/if_t04.dart
+++ b/Language/Reference/Lexical_Rules/Reserved_Words/if_t04.dart
@@ -7,14 +7,18 @@
/// 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.
-/// @compile-error
/// @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/Statements/Expression_Statements/syntax_t12.dart b/Language/Statements/Expression_Statements/syntax_t12.dart
index 0de48ef..08a667e 100644
--- a/Language/Statements/Expression_Statements/syntax_t12.dart
+++ b/Language/Statements/Expression_Statements/syntax_t12.dart
@@ -14,11 +14,16 @@
/// @description Checks that it is a compile-time error when an expression
/// statement begins with a non-constant, non-parameterized map literal, but
/// also it's only a part of the whole expression.
-/// @compile-error
/// @author rodionov
-
main() {
- {"1": 1, "2": 2}["1"] = 0; //# 01: compile-time error
- {"1": 1, "2": 2}.isEmpty == false; } //# 02: compile-time error
+ {"1": 1, "2": 2}["1"] = 0;
+// ^^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+ {"1": 1, "2": 2}.isEmpty == false; }
+// ^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
}
diff --git a/LanguageFeatures/Spread-collections/Ambiguity_A01_t06.dart b/LanguageFeatures/Spread-collections/Ambiguity_A01_t06.dart
index 855e099..99558ee 100644
--- a/LanguageFeatures/Spread-collections/Ambiguity_A01_t06.dart
+++ b/LanguageFeatures/Spread-collections/Ambiguity_A01_t06.dart
@@ -16,13 +16,14 @@
/// In other words, if it can only be a set, it is. Otherwise, it's a map.
/// @description Checks that if [a] is a set literal and [b] is a map literal,
/// it's a compile error.
-/// @compile-error
/// @author iarkh@unipro.ru
-
main() {
List list = [1, 12, 24];
Map map = {1: 1, "test": 1, 14: null};
var res = {...list, ...map};
+// ^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
}
diff --git a/LanguageFeatures/Spread-collections/Ambiguity_A02_t04.dart b/LanguageFeatures/Spread-collections/Ambiguity_A02_t04.dart
index 9cabc33..50da242 100644
--- a/LanguageFeatures/Spread-collections/Ambiguity_A02_t04.dart
+++ b/LanguageFeatures/Spread-collections/Ambiguity_A02_t04.dart
@@ -5,10 +5,11 @@
/// @assertion In cases where the context type is not specific enough to
/// disambiguate, we could make it an error instead of defaulting to map.
/// @description Checks that {...?null} collection type is detected correctly
-/// @compile-error
/// @author iarkh@unipro.ru
-
main() {
var res = {...?null};
+// ^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
}
diff --git a/LanguageFeatures/Spread-collections/Ambiguity_A03_t02.dart b/LanguageFeatures/Spread-collections/Ambiguity_A03_t02.dart
index b417104..1b39380 100644
--- a/LanguageFeatures/Spread-collections/Ambiguity_A03_t02.dart
+++ b/LanguageFeatures/Spread-collections/Ambiguity_A03_t02.dart
@@ -14,11 +14,12 @@
/// static type [Set<T>].
///
/// @description Checks that [setOrMapLiteral] has one type argument, it's a set.
-/// @compile-error
/// @author iarkh@unipro.ru
-
main() {
Map aMap = {1: 1, 2: 2, 3: 3};
var res = <int>{...aMap};
+// ^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
}
diff --git a/LanguageFeatures/Spread-collections/Ambiguity_A06_t02.dart b/LanguageFeatures/Spread-collections/Ambiguity_A06_t02.dart
index 35ba66f..9f8941b 100644
--- a/LanguageFeatures/Spread-collections/Ambiguity_A06_t02.dart
+++ b/LanguageFeatures/Spread-collections/Ambiguity_A06_t02.dart
@@ -8,11 +8,12 @@
/// an error.
/// @description Checks that there cannot be bare element and key-value pair in
/// the same collection.
-/// @compile-error
/// @author iarkh@unipro.ru
-
main() {
Map aMap = {1: 2};
var res = {4, 5, 6, ...aMap, 14};
+// ^^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
}
diff --git a/LanguageFeatures/Spread-collections/Ambiguity_A06_t04.dart b/LanguageFeatures/Spread-collections/Ambiguity_A06_t04.dart
index 815615a..acb132e 100644
--- a/LanguageFeatures/Spread-collections/Ambiguity_A06_t04.dart
+++ b/LanguageFeatures/Spread-collections/Ambiguity_A06_t04.dart
@@ -8,11 +8,12 @@
/// an error.
/// @description Checks that there cannot be bare element and key-value pair in
/// the same collection.
-/// @compile-error
/// @author iarkh@unipro.ru
-
main() {
List aList = [8, 9, 10];
var res = {...aList, 0: 0};
+// ^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
}
diff --git a/LanguageFeatures/Spread-collections/Ambiguity_A06_t05.dart b/LanguageFeatures/Spread-collections/Ambiguity_A06_t05.dart
index 44eb7c5..c3723d7 100644
--- a/LanguageFeatures/Spread-collections/Ambiguity_A06_t05.dart
+++ b/LanguageFeatures/Spread-collections/Ambiguity_A06_t05.dart
@@ -8,12 +8,13 @@
/// an error.
/// @description Checks that there cannot be bare element and key-value pair in
/// the same collection.
-/// @compile-error
/// @author iarkh@unipro.ru
-
main() {
List aList = [8, 9, 10];
Map aMap = {1: 2};
var res = {...aList, ...aMap};
+ // ^^^^^^^^^^^^^^^^^^^
+ // [analyzer] unspecified
+ // [cfe] unspecified
}
diff --git a/LanguageFeatures/Spread-collections/Ambiguity_A06_t09.dart b/LanguageFeatures/Spread-collections/Ambiguity_A06_t09.dart
index e0a1240..2bdc9f5 100644
--- a/LanguageFeatures/Spread-collections/Ambiguity_A06_t09.dart
+++ b/LanguageFeatures/Spread-collections/Ambiguity_A06_t09.dart
@@ -8,11 +8,14 @@
/// an error.
/// @description Checks that there cannot be bare element and key-value pair in
/// the same collection.
-/// @compile-error
/// @author iarkh@unipro.ru
main() {
List? aList = [8, 9, 10];
var res = {1: 2, ...?aList};
+// ^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
}
diff --git a/LanguageFeatures/Spread-collections/Ambiguity_A06_t10.dart b/LanguageFeatures/Spread-collections/Ambiguity_A06_t10.dart
index 0eeb2bf..056f2dc 100644
--- a/LanguageFeatures/Spread-collections/Ambiguity_A06_t10.dart
+++ b/LanguageFeatures/Spread-collections/Ambiguity_A06_t10.dart
@@ -8,11 +8,13 @@
/// an error.
/// @description Checks that there cannot be bare element and key-value pair in
/// the same collection.
-/// @compile-error
/// @author iarkh@unipro.ru
main() {
List? aList = [8, 9, 10];
var res = {...?aList, 0: 0};
+// ^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
}
diff --git a/LanguageFeatures/Spread-collections/ConstSpreads_A08_t04.dart b/LanguageFeatures/Spread-collections/ConstSpreads_A08_t04.dart
index 753eaa3..6bf986f 100644
--- a/LanguageFeatures/Spread-collections/ConstSpreads_A08_t04.dart
+++ b/LanguageFeatures/Spread-collections/ConstSpreads_A08_t04.dart
@@ -6,10 +6,11 @@
/// from spreading into itself:
/// const list = [...list]; // Error.
/// @description: Checks that constant set cannot spread itself
-/// @compile-error
/// @author iarkh@unipro.ru
-
main() {
const Set set = {...?set};
+// ^^^
+// [analyzer] unspecified
+// [cfe] unspecified
}
diff --git a/LanguageFeatures/Spread-collections/ConstSpreads_A08_t06.dart b/LanguageFeatures/Spread-collections/ConstSpreads_A08_t06.dart
index 7ec4788..1f79f5b 100644
--- a/LanguageFeatures/Spread-collections/ConstSpreads_A08_t06.dart
+++ b/LanguageFeatures/Spread-collections/ConstSpreads_A08_t06.dart
@@ -6,10 +6,11 @@
/// from spreading into itself:
/// const list = [...list]; // Error.
/// @description: Checks that constant set cannot spread itself
-/// @compile-error
/// @author iarkh@unipro.ru
-
main() {
const Map map = {...?map};
+// ^^^
+// [analyzer] unspecified
+// [cfe] unspecified
}
diff --git a/LanguageFeatures/Spread-collections/ConstSpreads_A09_t05.dart b/LanguageFeatures/Spread-collections/ConstSpreads_A09_t05.dart
index d6e9ef7..5e733ec 100644
--- a/LanguageFeatures/Spread-collections/ConstSpreads_A09_t05.dart
+++ b/LanguageFeatures/Spread-collections/ConstSpreads_A09_t05.dart
@@ -9,7 +9,6 @@
/// constant element if the expression is a potentially constant expression.
/// @description: Checks that compile error is thrown if constant list spread
/// element is not potentially constant list or set.
-/// @compile-error
/// @author iarkh@unipro.ru
@@ -19,4 +18,7 @@
main() {
const List aList = [...(A() is A ? 123 : [])];
+// ^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
}
diff --git a/LanguageFeatures/Spread-collections/ConstSpreads_A09_t11.dart b/LanguageFeatures/Spread-collections/ConstSpreads_A09_t11.dart
index 9648486..cd5ab9e 100644
--- a/LanguageFeatures/Spread-collections/ConstSpreads_A09_t11.dart
+++ b/LanguageFeatures/Spread-collections/ConstSpreads_A09_t11.dart
@@ -9,10 +9,8 @@
/// constant element if the expression is a potentially constant expression.
/// @description: Checks that compile time error is thrown if constant set spread
/// element is not a potentially constant list or set.
-/// @compile-error
/// @author iarkh@unipro.ru
-
class A {
const A();
}
@@ -24,9 +22,15 @@
class MyClass {
final String a;
const MyClass(Object o) : a = o as String;
+// ^
+// [cfe] unspecified
}
main() {
const Set l4 = {...(MyClass(12345) is MyClass ? [12] : [])};
+// ^^^^^^^^^^^^^
+// [analyzer] unspecified
+// ^
+// [cfe] unspecified
}
diff --git a/LanguageFeatures/Spread-collections/ConstSpreads_A09_t18.dart b/LanguageFeatures/Spread-collections/ConstSpreads_A09_t18.dart
index 6f3c2dc..b0396e6 100644
--- a/LanguageFeatures/Spread-collections/ConstSpreads_A09_t18.dart
+++ b/LanguageFeatures/Spread-collections/ConstSpreads_A09_t18.dart
@@ -9,15 +9,19 @@
/// constant element if the expression is a potentially constant expression.
/// @description: Checks that constant map spread element can be potentially
/// constant map.
-/// @compile-error
/// @author iarkh@unipro.ru
-
class MyClass {
final String a;
const MyClass(Object o) : a = o as String;
+// ^
+// [cfe] unspecified
}
main() {
const Map m = {...(MyClass(12345) is MyClass ? {1: 1} : {2: 2})};
+// ^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// ^
+// [cfe] unspecified
}
diff --git a/LanguageFeatures/Spread-collections/StaticSemantic_A01_t10.dart b/LanguageFeatures/Spread-collections/StaticSemantic_A01_t10.dart
index c45c07b..2a5493a 100644
--- a/LanguageFeatures/Spread-collections/StaticSemantic_A01_t10.dart
+++ b/LanguageFeatures/Spread-collections/StaticSemantic_A01_t10.dart
@@ -15,11 +15,12 @@
/// static error.
/// @description Checks that static error is thrown if null-aware spread element
/// and map type arguments are incompatible.
-/// @compile-error
/// @author iarkh@unipro.ru
-
main() {
Map<num, num> numbers = <num, num>{};
Map<String, num> map = <String, num>{...?numbers};
- }
+// ^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+}
diff --git a/LanguageFeatures/Spread-collections/Syntax_A03_t02.dart b/LanguageFeatures/Spread-collections/Syntax_A03_t02.dart
index 857a370..81c104f 100644
--- a/LanguageFeatures/Spread-collections/Syntax_A03_t02.dart
+++ b/LanguageFeatures/Spread-collections/Syntax_A03_t02.dart
@@ -11,10 +11,11 @@
/// @description Checks that it is a set if collection has one type argument, it
/// is a map if collection has two arguments and exception is thrown if there are
/// three or more type arguments.
-/// @compile-error
/// @author iarkh@unipro.ru
-
main() {
var a = <int, int, int>{};
+// ^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
}
diff --git a/LanguageFeatures/Spread-collections/Syntax_A03_t03.dart b/LanguageFeatures/Spread-collections/Syntax_A03_t03.dart
index ae038c9..818c9f1 100644
--- a/LanguageFeatures/Spread-collections/Syntax_A03_t03.dart
+++ b/LanguageFeatures/Spread-collections/Syntax_A03_t03.dart
@@ -11,10 +11,11 @@
/// @description Checks that it is a set if collection has one type argument, it
/// is a map if collection has two arguments and exception is thrown if there are
/// three or more type arguments.
-/// @compile-error
/// @author iarkh@unipro.ru
-
main() {
var a = <int, int, int, int>{};
+// ^^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
}