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

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

Issue 1355393003: JS inline handles -dynamic (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Readability improvements Created 5 years, 3 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/static_type_analyzer.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/resolver_test.dart
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index 902744058eeeb20a8d4857e958e81e1df47c2253..6f7d3db9f825009422ab20302e77beba2d4819c4 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -12025,6 +12025,22 @@ main() {
expect(declaration.initializer.propagatedType, isNull);
}
+ void test_pseudoGeneric_max_doubleInt() {
+ String code = r'''
+import 'dart:math';
+main() {
+ var foo = max(1.0, 2);
+}
+''';
+ _resolveTestUnit(code);
+
+ SimpleIdentifier identifier = _findIdentifier('foo');
+ VariableDeclaration declaration =
+ identifier.getAncestor((node) => node is VariableDeclaration);
+ expect(declaration.initializer.staticType.name, 'num');
+ expect(declaration.initializer.propagatedType, isNull);
+ }
+
void test_pseudoGeneric_then() {
String code = r'''
import 'dart:async';
« no previous file with comments | « pkg/analyzer/lib/src/generated/static_type_analyzer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698