aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Checking.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-06-30 18:42:29 +0200
committerMartin Odersky <odersky@gmail.com>2016-07-11 13:35:07 +0200
commit34a068b7f6039637d6f1330e3d071f5bf75e9cec (patch)
treeef7b435c50e4110971721836ebdaf9e0d07b4328 /src/dotty/tools/dotc/typer/Checking.scala
parent32c0135b59fe02a70ed0b1a693251a0028d479c8 (diff)
downloaddotty-34a068b7f6039637d6f1330e3d071f5bf75e9cec.tar.gz
dotty-34a068b7f6039637d6f1330e3d071f5bf75e9cec.tar.bz2
dotty-34a068b7f6039637d6f1330e3d071f5bf75e9cec.zip
Drop Config.checkKinds
Allows us to drop also the involved knownHK method. Lots of other cleanups.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Checking.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Checking.scala8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/typer/Checking.scala b/src/dotty/tools/dotc/typer/Checking.scala
index e77222beb..3aa63aeeb 100644
--- a/src/dotty/tools/dotc/typer/Checking.scala
+++ b/src/dotty/tools/dotc/typer/Checking.scala
@@ -34,7 +34,8 @@ object Checking {
import tpd._
/** A general checkBounds method that can be used for TypeApply nodes as
- * well as for AppliedTypeTree nodes.
+ * well as for AppliedTypeTree nodes. Also checks that type arguments to
+ * *-type parameters are fully applied.
*/
def checkBounds(args: List[tpd.Tree], boundss: List[TypeBounds], instantiate: (Type, List[Type]) => Type)(implicit ctx: Context) = {
(args, boundss).zipped.foreach { (arg, bound) =>
@@ -223,9 +224,6 @@ object Checking {
val checker = new CheckNonCyclicMap(sym, reportErrors)(ctx.addMode(Mode.CheckCyclic))
try checker.checkInfo(info)
catch {
- case ex: AssertionError =>
- println(s"assertion error for $info")
- throw ex
case ex: CyclicReference =>
if (reportErrors) {
ctx.error(i"illegal cyclic reference: ${checker.where} ${checker.lastChecked} of $sym refers back to the type itself", sym.pos)
@@ -364,7 +362,7 @@ object Checking {
// try to dealias to avoid a leak error
val savedErrors = errors
errors = prevErrors
- val tp2 = apply(tp.info.bounds.hi)
+ val tp2 = apply(tp.superType)
if (errors eq prevErrors) tp1 = tp2
else errors = savedErrors
}