Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(795)

Unified Diff: pkg/analyzer/test/generated/compile_time_error_code_test.dart

Issue 1644683002: A missing enum case in a switch is a warning, not a compile-time error. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/test/generated/compile_time_error_code_test.dart
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
index 15ef8ad9fd9f8a0e3da15cd6948d0fe0e11df4d8..9c4f87c851354d93be77986d8ac4b3e51f255c45 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -3547,24 +3547,6 @@ class A {
verify([source]);
}
- void test_missingEnumConstantInSwitch() {
- Source source = addSource(r'''
-enum E { ONE, TWO, THREE, FOUR }
-bool odd(E e) {
- switch (e) {
- case E.ONE:
- case E.THREE: return true;
- }
- return false;
-}''');
- computeLibrarySourceErrors(source);
- assertErrors(source, [
- CompileTimeErrorCode.MISSING_ENUM_CONSTANT_IN_SWITCH,
- CompileTimeErrorCode.MISSING_ENUM_CONSTANT_IN_SWITCH
- ]);
- verify([source]);
- }
-
void test_mixinDeclaresConstructor_classDeclaration() {
Source source = addSource(r'''
class A {
« no previous file with comments | « pkg/analyzer/lib/src/generated/error_verifier.dart ('k') | pkg/analyzer/test/generated/static_warning_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698