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

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

Issue 1498573002: Hide inference hints. Fixes #24563. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Move TODO 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
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 7d26753550f7eff2449e0ab94d0f06f41c8992c0..83533078df271aa1c44a59dbf55f1c5411d4011a 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -12587,6 +12587,18 @@ class StrongModeDownwardsInferenceTest extends ResolverTestCase {
expect(functionReturnValue(4).staticType, typeProvider.stringType);
}
+ void test_inference_hints() {
+ Source source = addSource(r'''
+ void main () {
+ var x = 3;
+ List<int> l0 = [];
+ }
+ ''');
+ LibraryElement library = resolve2(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
void test_instanceCreation() {
String code = r'''
class A<S, T> {
@@ -13819,25 +13831,6 @@ class TypeOverrideManagerTest extends EngineTestCase {
@reflectiveTest
class TypePropagationTest extends ResolverTestCase {
- void test_invocation_target_prefixed() {
- addNamedSource(
- '/helper.dart',
- '''
-library helper;
-int max(int x, int y) => 0;
-''');
- String code = '''
-import 'helper.dart' as helper;
-main() {
- helper.max(10, 10); // marker
-}''';
- SimpleIdentifier methodName =
- _findMarkedIdentifier(code, "(10, 10); // marker");
- MethodInvocation methodInvoke = methodName.parent;
- expect(methodInvoke.methodName.staticElement, isNotNull);
- expect(methodInvoke.methodName.propagatedElement, isNull);
- }
-
void fail_mergePropagatedTypesAtJoinPoint_1() {
// https://code.google.com/p/dart/issues/detail?id=19929
_assertTypeOfMarkedExpression(
@@ -14657,6 +14650,25 @@ main() {
}
}
+ void test_invocation_target_prefixed() {
+ addNamedSource(
+ '/helper.dart',
+ '''
+library helper;
+int max(int x, int y) => 0;
+''');
+ String code = '''
+import 'helper.dart' as helper;
+main() {
+ helper.max(10, 10); // marker
+}''';
+ SimpleIdentifier methodName =
+ _findMarkedIdentifier(code, "(10, 10); // marker");
+ MethodInvocation methodInvoke = methodName.parent;
+ expect(methodInvoke.methodName.staticElement, isNotNull);
+ expect(methodInvoke.methodName.propagatedElement, isNull);
+ }
+
void test_is_conditional() {
Source source = addSource(r'''
class A {}
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/test/src/task/strong/strong_test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698