rustc: For one-tuples, make parsing and printing the type work

and add a test to reflect-visit-data
This commit is contained in:
Tim Chevalier
2013-02-18 17:45:56 -08:00
parent 612553cb39
commit aa284de1fc
6 changed files with 26 additions and 5 deletions

View File

@@ -414,6 +414,9 @@ pub fn print_type_ex(s: @ps, &&ty: @ast::Ty, print_colons: bool) {
ast::ty_tup(elts) => {
popen(s);
commasep(s, inconsistent, elts, print_type);
if elts.len() == 1 {
word(s.s, ~",");
}
pclose(s);
}
ast::ty_bare_fn(f) => {