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

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

Issue 2990383002: Emit a hint when using generic method comment syntax (issue 30356) (Closed)
Patch Set: Created 3 years, 4 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4a9fd0c7d0a95ba4c20d2d156e4c326e0a83d8d6..d8b1513efbc4b68be6c0ba75becf16b37d85ec09 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -1644,6 +1644,23 @@ class B implements A {
verify([source]);
}
+ test_deferredImportWithInvalidUri() async {
+ Source source = addSource(r'''
+import '[invalid uri]' deferred as p;
+main() {
+ p.loadLibrary();
+}''');
+ await computeAnalysisResult(source);
+ if (enableNewAnalysisDriver) {
+ assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
+ } else {
+ assertErrors(source, [
+ CompileTimeErrorCode.URI_DOES_NOT_EXIST,
+ StaticWarningCode.UNDEFINED_IDENTIFIER
+ ]);
+ }
+ }
+
test_duplicateConstructorName_named() async {
Source source = addSource(r'''
class A {
@@ -2498,29 +2515,6 @@ var b2 = const bool.fromEnvironment('x', defaultValue: 1);''');
verify([source]);
}
- test_genericFunctionTypedParameter_commentSyntax() async {
- // Once dartbug.com/28515 is fixed, this syntax should no longer generate an
- // error.
- // TODO(paulberry): When dartbug.com/28515 is fixed, convert this into a
- // NonErrorResolverTest.
- resetWith(options: new AnalysisOptionsImpl()..strongMode = true);
- Source source = addSource('void g(/*=T*/ f/*<T>*/(/*=T*/ x)) {}');
- await computeAnalysisResult(source);
- var expectedErrorCodes = <ErrorCode>[
- CompileTimeErrorCode.GENERIC_FUNCTION_TYPED_PARAM_UNSUPPORTED
- ];
- if (enableNewAnalysisDriver) {
- // Due to dartbug.com/28515, some additional errors appear when using the
- // new analysis driver.
- expectedErrorCodes.addAll([
- StaticWarningCode.UNDEFINED_CLASS,
- StaticWarningCode.UNDEFINED_CLASS
- ]);
- }
- assertErrors(source, expectedErrorCodes);
- verify([source]);
- }
-
test_getterAndMethodWithSameName() async {
Source source = addSource(r'''
class A {
@@ -5948,23 +5942,6 @@ f() sync* {
verify([source]);
}
- test_deferredImportWithInvalidUri() async {
- Source source = addSource(r'''
-import '[invalid uri]' deferred as p;
-main() {
- p.loadLibrary();
-}''');
- await computeAnalysisResult(source);
- if (enableNewAnalysisDriver) {
- assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
- } else {
- assertErrors(source, [
- CompileTimeErrorCode.URI_DOES_NOT_EXIST,
- StaticWarningCode.UNDEFINED_IDENTIFIER
- ]);
- }
- }
-
test_sharedDeferredPrefix() async {
await resolveWithErrors(<String>[
r'''
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698