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

Unified Diff: pkg/analyzer/test/src/task/dart_test.dart

Issue 1493833003: Issue 25050. Fix for NPE in ConstantEvaluationEngine when duplicate fields. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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/constant.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/src/task/dart_test.dart
diff --git a/pkg/analyzer/test/src/task/dart_test.dart b/pkg/analyzer/test/src/task/dart_test.dart
index fb2602542349cc357383c9643134884182841869..3fecdd141ba8332f1e005dc9591d638811fd3616 100644
--- a/pkg/analyzer/test/src/task/dart_test.dart
+++ b/pkg/analyzer/test/src/task/dart_test.dart
@@ -4410,6 +4410,27 @@ main(int p) {
]);
}
+ test_perform_ConstantValidator_duplicateFields() {
+ Source source = newSource(
+ '/test.dart',
+ '''
+class Test {
+ final int x = 1;
+ final int x = 2;
+ const Test();
+}
+
+main() {
+ const Test();
+}
+''');
+ LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
+ computeResult(target, VERIFY_ERRORS, matcher: isVerifyUnitTask);
+ // validate
+ _fillErrorListener(VERIFY_ERRORS);
+ errorListener.assertNoErrors();
+ }
+
test_perform_directiveError() {
Source source = newSource(
'/test.dart',
« no previous file with comments | « pkg/analyzer/lib/src/generated/constant.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698