Incorporated feedback on a couple recent commits. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24060 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
56190dc123
commit
8e1b3a42ed
|
@ -966,7 +966,7 @@ abstract class Erasure extends AddInterfaces with typechecker.Analyzer with ast.
|
|||
// This must be because some earlier transformation is being skipped on ##, but so
|
||||
// far I don't know what. We also crash on null.## but unless we want to implement
|
||||
// my good idea that null.## works (like null == "abc" works) we have to NPE.
|
||||
val arg = qual.tpe.typeSymbol match {
|
||||
val arg = qual.tpe.typeSymbolDirect match {
|
||||
case UnitClass => BLOCK(qual, REF(BoxedUnit_UNIT)) // ({ expr; UNIT }).##
|
||||
case NullClass => Typed(qual, TypeTree(ObjectClass.tpe)) // (null: Object).##
|
||||
case _ => qual
|
||||
|
|
|
@ -212,12 +212,13 @@ self =>
|
|||
def subsetOf(that: Set[A]) = this forall that
|
||||
|
||||
/** An iterator over all subsets of this set of the given size.
|
||||
* If the requested size is impossible, an empty iterator is returned.
|
||||
*
|
||||
* @param len the size of the subsets.
|
||||
* @return the iterator.
|
||||
*/
|
||||
def subsets(len: Int): Iterator[This] = {
|
||||
if (len < 0 || len > size) throw new IllegalArgumentException(len.toString)
|
||||
if (len < 0 || len > size) Iterator.empty
|
||||
else new SubsetsItr(self.toIndexedSeq, len)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue