From aeb733147881d8da68d1e520b14112dc826a3977 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sat, 15 Jun 2013 14:28:23 -0400 Subject: Cleanups in type printing. More consistency as to how to understand aliases, singletons, specialized symbols, subclasses. Fewer weird special casings, like normalizing tuples and functions during type printing, but nothing else. I avoid "normalize" entirely now, and do not make special cases for dealiasing, which is already well handled when printing error messages. Look at the change to test/files/neg/t2641.check to get a sense of why we should resist calling normalize during the early days of a compilation run. Anonymous and refinement classes can be printed far more usefully by revealing their parents, and that too is here. Hardened toString against undesirable side effects. Make toString final to discourage any further rogue toString overriders. Make safeToString a little safer. --- test/files/neg/t1432.check | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test/files/neg/t1432.check') diff --git a/test/files/neg/t1432.check b/test/files/neg/t1432.check index 180cb05e67..d6cee4f5ed 100644 --- a/test/files/neg/t1432.check +++ b/test/files/neg/t1432.check @@ -1,6 +1,7 @@ -t1432.scala:10: error: type mismatch; - found : (Int, Bug_NoUnique.Wrap[Bug_NoUnique.Wrap[Unit]] => Double) - required: (Int, Unit => Double) +t1432.scala:12: error: type mismatch; + found : (Int, Bug_NoUnique.Alias2[Bug_NoUnique.Wrap[Unit]] => Double) + required: Bug_NoUnique.TypeCon[Unit] + (which expands to) (Int, Unit => Double) def test(x : TypeCon[Wrap[Unit]]) : TypeCon[Unit] = wrap(x) ^ one error found -- cgit v1.2.3