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

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

Issue 1533823006: Constant instance creation dependencies also should be computed. (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/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 cadb94a847a3736aa4f1df79b0a69dea5110e698..349cd0ac16e06bfe771b8505e3e908d168c81bf3 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
@@ -1462,6 +1462,19 @@ class A {
verify([source]);
}
+ void test_constWithNonConstantArgument_constField() {
+ Source source = addSource(r'''
+class A {
+ const A(x);
+}
+main() {
+ const A(double.INFINITY);
+}''');
+ computeLibrarySourceErrors(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
void test_constWithNonConstantArgument_literals() {
Source source = addSource(r'''
class A {
« 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