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

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

Issue 2435013003: Teach analyzer parser to handle native const factories/const constructors. (Closed)
Patch Set: add a test Created 4 years, 2 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/non_error_resolver_test.dart
diff --git a/pkg/analyzer/test/generated/non_error_resolver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_test.dart
index fd4487f6e961b8856a82a6163730f8c8e4fe13a0..f172ec6ed1146c987ca34851215464c1c1a2da44 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
@@ -3727,6 +3727,18 @@ int m(a) native 'string';''');
// Cannot verify the AST because the import's URI cannot be resolved.
}
+ void test_nativeConstConstructor() {
+ Source source = addSource(r'''
+import 'dart-ext:x';
+class Foo {
+ const Foo() native 'Foo_Foo';
+ const factory Foo.foo() native 'Foo_Foo_foo';
+}''');
+ computeLibrarySourceErrors(source);
+ assertNoErrors(source);
+ // Cannot verify the AST because the import's URI cannot be resolved.
+ }
+
void test_newWithAbstractClass_factory() {
Source source = addSource(r'''
abstract class A {
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698