From 620f339bbaadad57daa696007660bb887372e927 Mon Sep 17 00:00:00 2001 From: Hubert Plociniczak Date: Wed, 7 Sep 2011 12:17:54 +0000 Subject: First refactoring related to Error trees. There are no more direct calls to context.error from Typers and Infer, so more work needs to be done to finish it for Implicits and Namers. I am pushing it to trunk so that all of you can share my pain (and complain). Please do not add any more context.error randomly in that code, instead deal with it appropriately (by creating specific error tree). I was trying to be as informative when it comes to error tree names as possible, but if you feel like changing names to something more appropriate then feel free to do so. When it comes to printing error messages I tried to follow test suite as closily as possible but obviously there were few changes to some tests (mostly positive, I believe). On my machine performance drawback was neglible but I am working on more aggressive caching to reduce the penalty of containsError() calls even more. Any suggestions welcome. At the moment the code supports both styles i.e. throwing type errors for the cases that are not yet handled and generating error trees. But in the future we will drop the former completely (apart from cyclic errors which can pop up almost everywhere). Review by odersky, extempore and anyone who feels like it. --- test/files/neg/t2918.check | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/files/neg/t2918.check') diff --git a/test/files/neg/t2918.check b/test/files/neg/t2918.check index e67f24ec57..d125895463 100644 --- a/test/files/neg/t2918.check +++ b/test/files/neg/t2918.check @@ -1,7 +1,7 @@ -t2918.scala:2: error: cyclic aliasing or subtyping involving type A - def g[X, A[X] <: A[X]](x: A[X]) = x - ^ t2918.scala:2: error: A does not take type parameters - def g[X, A[X] <: A[X]](x: A[X]) = x + def g[X, A[X] <: A[X]](x: A[X]) = x ^ +t2918.scala:2: error: cyclic aliasing or subtyping involving type A + def g[X, A[X] <: A[X]](x: A[X]) = x + ^ two errors found -- cgit v1.2.3