From 03f13046f0a6cde36cba2a9649aad8996ba7550a Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Thu, 30 Mar 2017 22:54:15 +0200 Subject: Fix a bug(I guess?) hidden by scalac sometimes not emitting outer checks --- compiler/src/dotty/tools/io/ClassPath.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'compiler/src/dotty/tools/io') diff --git a/compiler/src/dotty/tools/io/ClassPath.scala b/compiler/src/dotty/tools/io/ClassPath.scala index 3afbed838..413d095c4 100644 --- a/compiler/src/dotty/tools/io/ClassPath.scala +++ b/compiler/src/dotty/tools/io/ClassPath.scala @@ -242,8 +242,8 @@ abstract class ClassPath { case Some((pkg, rest)) => val rep = packages find (_.name == pkg) flatMap (_ findClass rest) rep map { - case x: ClassRep => x - case x => throw new FatalError("Unexpected ClassRep '%s' found searching for name '%s'".format(x, name)) + case x: AnyClassRep => x + case x => throw new FatalError("Unexpected ClassRep '%s' found searching for name '%s'".format(x, name)) } case _ => classes find (_.name == name) @@ -256,6 +256,7 @@ abstract class ClassPath { } def sortString = join(split(asClasspathString).sorted: _*) + override def equals(that: Any) = that match { case x: ClassPath => this.sortString == x.sortString case _ => false -- cgit v1.2.3