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

Unified Diff: tests/lib/mirrors/stringify.dart

Issue 24019007: Fix reparsing of function parameters that include type parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « tests/lib/mirrors/parameter_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/mirrors/stringify.dart
diff --git a/tests/lib/mirrors/stringify.dart b/tests/lib/mirrors/stringify.dart
index ddb066848300d952dd656d86f3a065218b50647b..369f2c130c403bef81b88ca2e1445fce4bab240c 100644
--- a/tests/lib/mirrors/stringify.dart
+++ b/tests/lib/mirrors/stringify.dart
@@ -83,6 +83,13 @@ stringifyParameter(ParameterMirror parameter) {
return 'Parameter($buffer)';
}
+stringifyTypeVariable(TypeVariableMirror typeVariable) {
+ var buffer = new StringBuffer();
+ writeDeclarationOn(typeVariable, buffer);
+ buffer.write(', upperBound = ${stringify(typeVariable.upperBound)}');
+ return 'TypeVariable($buffer)';
+}
+
stringifyType(TypeMirror type) {
var buffer = new StringBuffer();
writeDeclarationOn(type, buffer);
@@ -116,6 +123,7 @@ stringify(value) {
if (value is String) return value;
if (value is Symbol) return stringifySymbol(value);
if (value is ClassMirror) return stringifyClass(value);
+ if (value is TypeVariableMirror) return stringifyTypeVariable(value);
if (value is TypeMirror) return stringifyType(value);
if (value == null) return '<null>';
throw 'Unexpected value: $value';
« no previous file with comments | « tests/lib/mirrors/parameter_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698