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

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

Issue 1472183002: add a failing test case to demonstrate a substitution issue (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | 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 fa2436ec423d871fb35a7c14d9089f3018d1fec3..9fef4c782101d25892a1105afa986e6b3dca51cc 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -12219,6 +12219,22 @@ main() {
expect(ft.toString(), '(String) → List<int>');
}
+ void fail_genericMethod_nested() {
+ // TODO(jmesserly): this test currently fails because we incorrectly capture
+ // S in FunctionTypeImpl.substitute. We should probably rename free
+ // variables during substitution to avoid it.
+ _resolveTestUnit(r'''
+class C<T> {
+ /*=T*/ f/*<S>*/(/*=S*/ x) {
+ new C<S>().f/*<int>*/(3);
+ return null;
+ }
+}
+''');
+ SimpleIdentifier f = _findIdentifier('f/*<int>*/(3);');
+ expect(f.staticType.toString(), '(int) → S');
+ }
+
void test_genericMethod_functionTypedParameter() {
if (!AnalysisEngine.instance.useTaskModel) {
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698