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

Unified Diff: tests/compiler/dart2js/backend_dart/dart_backend_test.dart

Issue 764023005: Generate typedef node from the element. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix unittest Created 6 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/compiler/lib/src/dart_backend/outputter.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/backend_dart/dart_backend_test.dart
diff --git a/tests/compiler/dart2js/backend_dart/dart_backend_test.dart b/tests/compiler/dart2js/backend_dart/dart_backend_test.dart
index 7392142e3d961a12c121a766d7dd14b77f48887d..3ec0c3457ca2deec5eefaed68bd965a97614e320 100644
--- a/tests/compiler/dart2js/backend_dart/dart_backend_test.dart
+++ b/tests/compiler/dart2js/backend_dart/dart_backend_test.dart
@@ -214,7 +214,7 @@ class A {
// Maybe typedef should be included in the result too, but it
// works fine without it.
testDart2Dart('''
-typedef void foofunc(arg);
+typedef void foofunc(_0);
main() {
new A((arg) {});
}
@@ -600,7 +600,10 @@ class DynoMap implements Map<Element, ElementAst> {
final compiler;
DynoMap(this.compiler);
- ElementAst operator[](Element element) => new ElementAst(element);
+ ElementAst operator[](AstElement element) {
+ return new ElementAst(element.resolvedAst.node,
+ element.resolvedAst.elements);
+ }
noSuchMethod(Invocation invocation) => throw 'unimplemented method';
}
@@ -669,13 +672,13 @@ main() {
}
''';
var expectedResult = '''
-typedef void MyFunction<T_B extends num>(T_B arg);
+typedef void MyFunction<T_B extends num>(T_B _0);
class T {}
class B<T_B> {}
class A<T_B> extends B<T_B> {
T_B f;
}
-typedef void MyFunction_A<T_B extends num>(T_B arg);
+typedef void MyFunction_A<T_B extends num>(T_B _0);
class T_A {}
class B_A<T_B> {}
class A_A<T_B> extends B_A<T_B> {
« no previous file with comments | « pkg/compiler/lib/src/dart_backend/outputter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698