opt assignable_expression_test into 2.19
opt switch related tests back to 2.19 opt map/set hashCode override tests back to 2.19 Change-Id: Ib5c44fc17de43eaf9bcad71d7a326c5fcbff02bf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285800 Auto-Submit: Jake Macdonald <jakemac@google.com> Reviewed-by: Bob Nystrom <rnystrom@google.com> Commit-Queue: Jake Macdonald <jakemac@google.com>
This commit is contained in:
committed by
Commit Queue
parent
a4687a0e2b
commit
41bc0b4d07
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
//
|
||||
// @dart=2.19
|
||||
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
//
|
||||
// @dart=2.19
|
||||
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
//
|
||||
// @dart=2.19
|
||||
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
//
|
||||
// @dart=2.19
|
||||
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
|
||||
@@ -27,17 +27,3 @@ int labelDoesNotExistSwitch(int x) {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
const var2 = wrongTypeSwitch(1);
|
||||
// ^^^^^^^^^^^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
|
||||
int wrongTypeSwitch(int x) {
|
||||
switch (x) {
|
||||
case "string":
|
||||
// ^^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.CASE_EXPRESSION_TYPE_IS_NOT_SWITCH_EXPRESSION_SUBTYPE
|
||||
// [cfe] Type 'String' of the case expression is not a subtype of type 'int' of this switch expression.
|
||||
return 100;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// 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.
|
||||
//
|
||||
// @dart=2.19
|
||||
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// 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.
|
||||
//
|
||||
// @dart=2.19
|
||||
|
||||
|
||||
// Introduce an aliased type.
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
//
|
||||
// @dart=2.19
|
||||
|
||||
// Test reporting a compile-time error if case expressions are of type double.
|
||||
// Test reporting a compile-time error if case expressions are of type double,
|
||||
// prior to Dart 3.0 and patterns.
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
//
|
||||
// @dart=2.19
|
||||
|
||||
// Regression test for crash in VM parser (issue 29370).
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
//
|
||||
// @dart=2.19
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// for 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 switch statement.
|
||||
//
|
||||
// @dart=2.19
|
||||
|
||||
// Tests some switch-case statements blocks that should and should not
|
||||
// cause static warnings.
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
//
|
||||
// @dart=2.19
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
//
|
||||
// @dart=2.19
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
//
|
||||
// @dart=2.19
|
||||
|
||||
// Test to detect syntactically illegal left-hand-side (assignable)
|
||||
// expressions.
|
||||
|
||||
Reference in New Issue
Block a user