[cfe] Add license headers to the patterns testcaes
Part of https://github.com/dart-lang/sdk/issues/49749 Change-Id: I61cd83124083f2e017101be3ea020e04583023e3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267600 Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
This commit is contained in:
committed by
Commit Queue
parent
d43dd08a26
commit
523257ab8a
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case true:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case true as Object:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
if (x case true) {}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case true!:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case true?:
|
||||
|
||||
+4
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
void f(x) {
|
||||
if (x case 0 when true) {}
|
||||
}
|
||||
|
||||
+4
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
void f(x) {
|
||||
switch (x) {
|
||||
case 0 when true:
|
||||
|
||||
+4
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
void f(x) {
|
||||
if (x case 0 as int when true) {}
|
||||
}
|
||||
|
||||
+4
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
void f(x) {
|
||||
switch (x) {
|
||||
case 0 as int when true:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
const y = 1;
|
||||
switch (x) {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
class C {
|
||||
int? f;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
class C {
|
||||
int? f;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
if (x case var y as int) {}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case [1 as int]:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case int? _ as double? & Object? _:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case int? _ & double? _ as Object?:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case int? _ as double? | Object? _:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case int? _ | double? _ as Object?:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case {'a': 1 as int}:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case (1 as int):
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case (: var n as int, 2):
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case (n: 1 as int, 2):
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case (1 as int, 2):
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
const y = 1;
|
||||
switch (x) {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
const y = 1;
|
||||
switch (x) {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
const y = 1;
|
||||
if (x case y) {}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
const y = 1;
|
||||
switch (x) {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
const y = 1;
|
||||
switch (x) {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case 1.0:
|
||||
|
||||
@@ -2,7 +2,7 @@ library /*isNonNullableByDefault*/;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/patterns/double_literal_inside_case.dart:3:10: Error: Case expression '1.0' does not have a primitive operator '=='.
|
||||
// pkg/front_end/testcases/patterns/double_literal_inside_case.dart:7:10: Error: Case expression '1.0' does not have a primitive operator '=='.
|
||||
// case 1.0:
|
||||
// ^
|
||||
//
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ library /*isNonNullableByDefault*/;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/patterns/double_literal_inside_case.dart:3:10: Error: Case expression '1.0' does not have a primitive operator '=='.
|
||||
// pkg/front_end/testcases/patterns/double_literal_inside_case.dart:7:10: Error: Case expression '1.0' does not have a primitive operator '=='.
|
||||
// case 1.0:
|
||||
// ^
|
||||
//
|
||||
|
||||
@@ -2,7 +2,7 @@ library /*isNonNullableByDefault*/;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/patterns/double_literal_inside_case.dart:3:10: Error: Case expression '1.0' does not have a primitive operator '=='.
|
||||
// pkg/front_end/testcases/patterns/double_literal_inside_case.dart:7:10: Error: Case expression '1.0' does not have a primitive operator '=='.
|
||||
// case 1.0:
|
||||
// ^
|
||||
//
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ library /*isNonNullableByDefault*/;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/patterns/double_literal_inside_case.dart:3:10: Error: Case expression '1.0' does not have a primitive operator '=='.
|
||||
// pkg/front_end/testcases/patterns/double_literal_inside_case.dart:7:10: Error: Case expression '1.0' does not have a primitive operator '=='.
|
||||
// case 1.0:
|
||||
// ^
|
||||
//
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ library /*isNonNullableByDefault*/;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/patterns/double_literal_inside_case.dart:3:10: Error: Case expression '1.0' does not have a primitive operator '=='.
|
||||
// pkg/front_end/testcases/patterns/double_literal_inside_case.dart:7:10: Error: Case expression '1.0' does not have a primitive operator '=='.
|
||||
// case 1.0:
|
||||
// ^
|
||||
//
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case 1.0 as Object:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
if (x case 1.0) {}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case 1.0!:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case 1.0?:
|
||||
|
||||
+4
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
f() {
|
||||
try {
|
||||
true ? : 2;
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ library /*isNonNullableByDefault*/;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:3:13: Error: Expected an identifier, but got ':'.
|
||||
// pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:7:13: Error: Expected an identifier, but got ':'.
|
||||
// Try inserting an identifier before ':'.
|
||||
// true ? : 2;
|
||||
// ^
|
||||
@@ -12,7 +12,7 @@ import "dart:core" as core;
|
||||
|
||||
static method f() → dynamic {
|
||||
try {
|
||||
true ?{invalid-type} invalid-expression "pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:3:13: Error: This couldn't be parsed.
|
||||
true ?{invalid-type} invalid-expression "pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:7:13: Error: This couldn't be parsed.
|
||||
true ? : 2;
|
||||
^" : 2;
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ library /*isNonNullableByDefault*/;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:3:13: Error: Expected an identifier, but got ':'.
|
||||
// pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:7:13: Error: Expected an identifier, but got ':'.
|
||||
// Try inserting an identifier before ':'.
|
||||
// true ? : 2;
|
||||
// ^
|
||||
@@ -12,7 +12,7 @@ import "dart:core" as core;
|
||||
|
||||
static method f() → dynamic {
|
||||
try {
|
||||
true ?{invalid-type} invalid-expression "pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:3:13: Error: This couldn't be parsed.
|
||||
true ?{invalid-type} invalid-expression "pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:7:13: Error: This couldn't be parsed.
|
||||
true ? : 2;
|
||||
^" : 2;
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ library /*isNonNullableByDefault*/;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:3:13: Error: Expected an identifier, but got ':'.
|
||||
// pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:7:13: Error: Expected an identifier, but got ':'.
|
||||
// Try inserting an identifier before ':'.
|
||||
// true ? : 2;
|
||||
// ^
|
||||
@@ -12,7 +12,7 @@ import "dart:core" as core;
|
||||
|
||||
static method f() → dynamic {
|
||||
try {
|
||||
true ?{invalid-type} invalid-expression "pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:3:13: Error: This couldn't be parsed.
|
||||
true ?{invalid-type} invalid-expression "pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:7:13: Error: This couldn't be parsed.
|
||||
true ? : 2;
|
||||
^" : 2;
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ library /*isNonNullableByDefault*/;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:3:13: Error: Expected an identifier, but got ':'.
|
||||
// pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:7:13: Error: Expected an identifier, but got ':'.
|
||||
// Try inserting an identifier before ':'.
|
||||
// true ? : 2;
|
||||
// ^
|
||||
@@ -12,7 +12,7 @@ import "dart:core" as core;
|
||||
|
||||
static method f() → dynamic {
|
||||
try {
|
||||
true ?{invalid-type} invalid-expression "pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:3:13: Error: This couldn't be parsed.
|
||||
true ?{invalid-type} invalid-expression "pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:7:13: Error: This couldn't be parsed.
|
||||
true ? : 2;
|
||||
^" : 2;
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ library /*isNonNullableByDefault*/;
|
||||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:3:13: Error: Expected an identifier, but got ':'.
|
||||
// pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:7:13: Error: Expected an identifier, but got ':'.
|
||||
// Try inserting an identifier before ':'.
|
||||
// true ? : 2;
|
||||
// ^
|
||||
@@ -12,7 +12,7 @@ import "dart:core" as core;
|
||||
|
||||
static method f() → dynamic {
|
||||
try {
|
||||
true ?{invalid-type} invalid-expression "pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:3:13: Error: This couldn't be parsed.
|
||||
true ?{invalid-type} invalid-expression "pkg/front_end/testcases/patterns/error_recovery_after_question_suffix_in_expression.dart:7:13: Error: This couldn't be parsed.
|
||||
true ? : 2;
|
||||
^" : 2;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
class C {
|
||||
int? f;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
class C {
|
||||
int? f;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
class C {
|
||||
int? f;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
class C<T> {}
|
||||
|
||||
test(dynamic x) {
|
||||
|
||||
+4
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
class C<T> {
|
||||
T? f;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case final y:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case final y as Object:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
if (x case final y) {}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case final y!:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case final y?:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case 1:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case 1 as Object:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
if (x case 1) {}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case 1!:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case 1?:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case [1, 2]:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case []:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case []:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case <int>[1, 2]:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case [1] as Object:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case [1]!:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case [1]?:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
if (x case int? _ & double? _) {}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case int? _ & double? _ & Object? _:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case int? _ & double? _ | Object? _:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case int? _ | double? _ & Object? _:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
if (x case int? _ | double? _) {}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case int? _ | double? _ | Object? _:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case {'a': 1, 'b': 2}:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case {}:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case <String, int>{'a': 1, 'b': 2}:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case {'a': 1} as Object:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
if (x case {'a': 1, 'b': 2}) {}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case {'a': 1}!:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case {'a': 1}?:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
const y = 1;
|
||||
switch (x) {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
class C {
|
||||
int? f;
|
||||
}
|
||||
|
||||
+4
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
class C {
|
||||
int? f;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
if (x case var y!) {}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case [1!]:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case 1! & 2:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case 1 & 2!:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case 1! | 2:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case 1 | 2!:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case {'a': 1!}:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case (1!):
|
||||
|
||||
+4
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case (: var n!, 2):
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case (n: 1!, 2):
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case (1!, 2):
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
const y = 1;
|
||||
switch (x) {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
class C {
|
||||
int? f;
|
||||
}
|
||||
|
||||
+4
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
class C {
|
||||
int? f;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
if (x case var y?) {}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case [1?]:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case 1? & 2:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
switch (x) {
|
||||
case 1 & 2?:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user