forked from dart-lang/co19
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Authored by @sgrekhov. Fixes dart-lang#1423. Fixed indents, added missing semicolon.
- Loading branch information
Showing
209 changed files
with
2,019 additions
and
2,033 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Language/Classes/Instance_Methods/Operators/allowed_names_t22.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Language/Expressions/Function_Invocation/async_generator_invokation_t03.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Language/Expressions/Identifier_Reference/built_in_identifier_t11.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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>'. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.