diff options
author | Sean McDirmid <sean.mcdirmid@gmail.com> | 2006-01-18 13:32:11 +0000 |
---|---|---|
committer | Sean McDirmid <sean.mcdirmid@gmail.com> | 2006-01-18 13:32:11 +0000 |
commit | 792fe29856c942ac509bea9c9aa312be4c00c256 (patch) | |
tree | ccefa31289f81f48e7498e7279187e4eaba27105 /src | |
parent | ae23ef23441ab396847db50bbffb75237bda2c47 (diff) | |
download | scala-792fe29856c942ac509bea9c9aa312be4c00c256.tar.gz scala-792fe29856c942ac509bea9c9aa312be4c00c256.tar.bz2 scala-792fe29856c942ac509bea9c9aa312be4c00c256.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/util/ClassPath.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/util/ClassPath.scala b/src/compiler/scala/tools/nsc/util/ClassPath.scala index 0a88e8bbac..afb12542a2 100644 --- a/src/compiler/scala/tools/nsc/util/ClassPath.scala +++ b/src/compiler/scala/tools/nsc/util/ClassPath.scala @@ -46,8 +46,8 @@ object ClassPath { class Context(val classes : List[AbstractFile], val sources : List[Source]) { def find(name : String, isDir : boolean) = if (isPackage) { def find0(classes : List[AbstractFile], sources : List[Source]) : Context = { - assert(classes.length == sources.length); - if (classes.isEmpty) new Context(Nil, Nil); + //assert(classes.length == sources.length); + if (classes.isEmpty || sources.isEmpty) new Context(Nil, Nil); else { val ret = find0(classes.tail, sources.tail); @@ -75,10 +75,10 @@ object ClassPath { def isPackage = { - assert(classes.length == sources.length); + //assert(classes.length == sources.length); if (classes.isEmpty) true; else if (classes.head != null) classes.head.isDirectory(); - else if (sources.head != null && sources.head.location != null) sources.head.location.isDirectory(); + else if (!sources.isEmpty && sources.head != null && sources.head.location != null) sources.head.location.isDirectory(); else true; } |