Skip to content

Commit

Permalink
Fixes dart-lang#1423. Indents fixed (dart-lang#1424)
Browse files Browse the repository at this point in the history
Authored by @sgrekhov.

Fixes dart-lang#1423. Fixed indents, added missing semicolon.
  • Loading branch information
sgrekhov authored Sep 13, 2022
1 parent dc5f1a4 commit 5df439d
Show file tree
Hide file tree
Showing 209 changed files with 2,019 additions and 2,033 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ class C {
void _s() {}

set s(var value) {}
// ^
// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION
// [cfe] 's' is already declared in this scope.
// ^
// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION
// [cfe] 's' is already declared in this scope.
set _s(var value) {}
// ^^
// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION
// [cfe] '_s' is already declared in this scope.
// ^^
// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION
// [cfe] '_s' is already declared in this scope.
}

main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ class F {
// [analyzer] unspecified
// [cfe] unspecified
factory F.baz() = D.baz;
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_MISSING_CONSTRUCTOR
// [cfe] Redirection constructor target not found: 'D.baz'
// ^^^^^
// [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_MISSING_CONSTRUCTOR
// [cfe] Redirection constructor target not found: 'D.baz'
}

class D {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

class C {
C() : x = -1, this.init();
// ^
// ^
// [analyzer] unspecified
// [cfe] unspecified
C.init();
Expand Down
30 changes: 15 additions & 15 deletions Language/Classes/Getters/static_t01.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@ class C2 extends C1 {

main() {
C1.g1;
// ^^
// [analyzer] COMPILE_TIME_ERROR.STATIC_ACCESS_TO_INSTANCE_MEMBER
// [cfe] Member not found: 'g1'.
// ^^
// [analyzer] COMPILE_TIME_ERROR.STATIC_ACCESS_TO_INSTANCE_MEMBER
// [cfe] Member not found: 'g1'.
C1.g2;
// ^^
// [analyzer] COMPILE_TIME_ERROR.STATIC_ACCESS_TO_INSTANCE_MEMBER
// [cfe] Member not found: 'g2'.
// ^^
// [analyzer] COMPILE_TIME_ERROR.STATIC_ACCESS_TO_INSTANCE_MEMBER
// [cfe] Member not found: 'g2'.
C2.g1;
// ^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
// [cfe] Member not found: 'g1'.
// ^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
// [cfe] Member not found: 'g1'.
C2.g2;
// ^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
// [cfe] Member not found: 'g2'.
// ^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
// [cfe] Member not found: 'g2'.
C2.g3;
// ^^
// [analyzer] COMPILE_TIME_ERROR.STATIC_ACCESS_TO_INSTANCE_MEMBER
// [cfe] Member not found: 'g3'.
// ^^
// [analyzer] COMPILE_TIME_ERROR.STATIC_ACCESS_TO_INSTANCE_MEMBER
// [cfe] Member not found: 'g3'.
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ typedef Future futureFuncParam(int p1, [int? p2]);
main() {
futureFuncParam ffp1 = (int p1, [int? p2]) async { return 5; };
ffp1 = (bool p1, [int? p2]) async { return 1; };
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
// [cfe] A value of type 'Future<int> Function(bool, [int?])' can't be assigned to a variable of type 'Future<dynamic> Function(int, [int?])'.
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
// [cfe] A value of type 'Future<int> Function(bool, [int?])' can't be assigned to a variable of type 'Future<dynamic> Function(int, [int?])'.
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// 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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,61 +11,60 @@
/// a compile error
/// @author rodionov

class A {
test() {
abstract();
// ^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD
// [cfe] The method 'abstract' isn't defined for the class 'A'.
1 + as;
// ^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
// [cfe] The getter 'as' isn't defined for the class 'A'.
// ^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
// [cfe] The getter 'as' isn't defined for the class 'A'.
1 << export;
// ^^^^^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
// [cfe] The getter 'export' isn't defined for the class 'A'.
// ^^^^^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
// [cfe] The getter 'export' isn't defined for the class 'A'.
external ^ 0;
// ^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
// [cfe] The getter 'external' isn't defined for the class 'A'.
1 * factory;
// ^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
// [cfe] The getter 'factory' isn't defined for the class 'A'.
// ^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
// [cfe] The getter 'factory' isn't defined for the class 'A'.
1 >= get;
// ^^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
// [cfe] The getter 'get' isn't defined for the class 'A'.
// ^^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
// [cfe] The getter 'get' isn't defined for the class 'A'.
var x = implements;
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
// [cfe] The getter 'implements' isn't defined for the class 'A'.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
// [cfe] The getter 'implements' isn't defined for the class 'A'.
1 == import;
// ^^^^^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
// [cfe] The getter 'import' isn't defined for the class 'A'.
// ^^^^^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
// [cfe] The getter 'import' isn't defined for the class 'A'.
1 == library;
// ^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
// [cfe] The getter 'library' isn't defined for the class 'A'.
// ^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
// [cfe] The getter 'library' isn't defined for the class 'A'.
operator.x;
// ^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
// [cfe] The getter 'operator' isn't defined for the class 'A'.
1 == part;
// ^^^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
// [cfe] The getter 'part' isn't defined for the class 'A'.
// ^^^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
// [cfe] The getter 'part' isn't defined for the class 'A'.
--set;
// ^^^
// [analyzer] unspecified
// [cfe] unspecified
true && static;
// ^^^^^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
// [cfe] The getter 'static' isn't defined for the class 'A'.
// ^^^^^^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER
// [cfe] The getter 'static' isn't defined for the class 'A'.
++typedef;
// ^^^^^^^
// [analyzer] unspecified
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

Expand Down
18 changes: 9 additions & 9 deletions Language/Expressions/Identifier_Reference/syntax_t08.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@

main() {
int? aç;
// ^
// [analyzer] SYNTACTIC_ERROR.ILLEGAL_CHARACTER
// [cfe] The non-ASCII character 'ç' (U+00E7) can't be used in identifiers, only in strings and comments.
// ^
// [analyzer] SYNTACTIC_ERROR.ILLEGAL_CHARACTER
// [cfe] The non-ASCII character 'ç' (U+00E7) can't be used in identifiers, only in strings and comments.
String çb = "It's wrong!";
// ^
// [analyzer] SYNTACTIC_ERROR.ILLEGAL_CHARACTER
// [cfe] The non-ASCII character 'ç' (U+00E7) can't be used in identifiers, only in strings and comments.
// ^
// [analyzer] SYNTACTIC_ERROR.ILLEGAL_CHARACTER
// [cfe] The non-ASCII character 'ç' (U+00E7) can't be used in identifiers, only in strings and comments.
var wrong_ç;
// ^
// [analyzer] SYNTACTIC_ERROR.ILLEGAL_CHARACTER
// [cfe] The non-ASCII character 'ç' (U+00E7) can't be used in identifiers, only in strings and comments.
// ^
// [analyzer] SYNTACTIC_ERROR.ILLEGAL_CHARACTER
// [cfe] The non-ASCII character 'ç' (U+00E7) can't be used in identifiers, only in strings and comments.
ç;
//^
// [analyzer] unspecified
Expand Down
33 changes: 16 additions & 17 deletions Language/Expressions/If_null_Expressions/static_type_t01.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,32 @@
///
/// @author [email protected]

main() {
var x = (null ?? 2) as int?;
var y = (x ?? 2.0) as num?;
var d = 3.14 as double?;
var s = "Lily was here" as String?;
x = d ?? 1;
// ^^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
// ^
// [cfe] A value of type 'num' can't be assigned to a variable of type 'int?'.
// ^^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
// ^
// [cfe] A value of type 'num' can't be assigned to a variable of type 'int?'.
x = null ?? 1;
x = null ?? null;
x = x ?? 'aaa';
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
// ^
// [cfe] A value of type 'Object' can't be assigned to a variable of type 'int?'.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
// ^
// [cfe] A value of type 'Object' can't be assigned to a variable of type 'int?'.
x = s ?? 1;
// ^^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
// ^
// [cfe] A value of type 'Object' can't be assigned to a variable of type 'int?'.
// ^^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
// ^
// [cfe] A value of type 'Object' can't be assigned to a variable of type 'int?'.
x = s ?? true;
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
// ^
// [cfe] A value of type 'Object' can't be assigned to a variable of type 'int?'.
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
// ^
// [cfe] A value of type 'Object' can't be assigned to a variable of type 'int?'.
return x;
}
16 changes: 8 additions & 8 deletions Language/Expressions/Maps/equal_keys_t01.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@

main() {
const m1 = <int, String>{1: "val1", 1: "val2"};
// ^
// [cfe] Constant evaluation error:
// ^
// [analyzer] COMPILE_TIME_ERROR.EQUAL_KEYS_IN_CONST_MAP
// ^
// [cfe] Constant evaluation error:
// ^
// [analyzer] COMPILE_TIME_ERROR.EQUAL_KEYS_IN_CONST_MAP
var m2 = const <String, int>{"key1": 1, "key1": 2};
// ^
// [cfe] Constant evaluation error:
// ^^^^^^
// [analyzer] COMPILE_TIME_ERROR.EQUAL_KEYS_IN_CONST_MAP
// ^
// [cfe] Constant evaluation error:
// ^^^^^^
// [analyzer] COMPILE_TIME_ERROR.EQUAL_KEYS_IN_CONST_MAP
}
19 changes: 9 additions & 10 deletions Language/Generics/FutureOr_A01_t02.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,19 @@
/// assigned to [FutureOr] variable.
/// @author [email protected]

import "dart:async";

main() {
FutureOr<int> x1 = "12345";
// ^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
// [cfe] A value of type 'String' can't be assigned to a variable of type 'FutureOr<int>'.
// ^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
// [cfe] A value of type 'String' can't be assigned to a variable of type 'FutureOr<int>'.
FutureOr<String> x2 = 11;
// ^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
// [cfe] A value of type 'int' can't be assigned to a variable of type 'FutureOr<String>'.
// ^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
// [cfe] A value of type 'int' can't be assigned to a variable of type 'FutureOr<String>'.
FutureOr<String> x3 = [1, 2, 3, 4, 5];
// ^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
// [cfe] A value of type 'List<int>' can't be assigned to a variable of type 'FutureOr<String>'.
// ^^^^^^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
// [cfe] A value of type 'List<int>' can't be assigned to a variable of type 'FutureOr<String>'.
}
24 changes: 12 additions & 12 deletions Language/Generics/Superbounded_types/class_A02_t01.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ main() {
A a5 = new A<Never>();

A a6 = new A<A<dynamic>>();
// ^
// [cfe] Type argument 'A<dynamic>' doesn't conform to the bound 'A<T>' of the type variable 'T' on 'A'.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
// ^
// [cfe] Type argument 'A<dynamic>' doesn't conform to the bound 'A<T>' of the type variable 'T' on 'A'.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
A a7 = new A<A<Object?>>();
// ^
// [cfe] Type argument 'A<Object?>' doesn't conform to the bound 'A<T>' of the type variable 'T' on 'A'.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
// ^
// [cfe] Type argument 'A<Object?>' doesn't conform to the bound 'A<T>' of the type variable 'T' on 'A'.
// ^^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
A a8 = new A<A<void>>();
// ^
// [cfe] Type argument 'A<void>' doesn't conform to the bound 'A<T>' of the type variable 'T' on 'A'.
// ^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
// ^
// [cfe] Type argument 'A<void>' doesn't conform to the bound 'A<T>' of the type variable 'T' on 'A'.
// ^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
A a9 = new A<A<Null>>();
// ^^^^^^^
// [analyzer] unspecified
Expand Down
Loading

0 comments on commit 5df439d

Please sign in to comment.