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

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

Issue 1134343003: Fix constant evaluation dependency analysis for const external factories. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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/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 8e3882c49fc4860c1ea6349cd0d631db6df3c7c1..a3cf7764e632bc052b6a391a75fc84ff97e0f26b 100644
--- a/pkg/analyzer/test/src/task/dart_test.dart
+++ b/pkg/analyzer/test/src/task/dart_test.dart
@@ -1382,6 +1382,20 @@ const y = 1;
expect(evaluationResult.value.intValue, 2);
}
+ test_external_const_factory() {
+ EvaluationResultImpl evaluationResult = _computeTopLevelVariableConstValue(
+ 'x', '''
+const x = const C.foo();
+
+class C extends B {
+ external const factory C.foo();
+}
+
+class B {}
+''');
+ expect(evaluationResult, isNotNull);
+ }
+
test_simple_constant() {
EvaluationResultImpl evaluationResult = _computeTopLevelVariableConstValue(
'x', '''
« 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