-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
When I tried to complete null, I accidentally received the collection method:
scala> null. Elements addString count getChars lines reduceRightOption stripLineEnd toMap Self aggregate deep getClass linesIterator regionMatches stripMargin toSeq WithFilter andThen diff getStackTraceString linesWithSeparators replace stripPrefix toSet != apply distinct groupBy map replaceAll stripSuffix toShort ## applyOrElse drop grouped matches replaceAllLiterally subSequence toStream % array dropRight hasDefiniteSize max replaceFirst substring toString & asInstanceOf dropWhile hashCode maxBy repr sum toTraversable && canEqual elemManifest head min reverse synchronized toUpperCase * capitalize elemTag headOption minBy reverseIterator tail toVector + charAt endsWith indexOf mkString reverseMap tails transform ++ chars ensuring indexOfSlice ne reversed take transpose ++: clone eq indexWhere newBuilder runWith takeRight trim +: codePointAt equals indices nonEmpty sameElements takeWhile unary_! - codePointBefore equalsIgnoreCase init notify scan thisCollection unary_+ -> codePointCount exists inits notifyAll scanLeft to unary_- / codePoints filter intern offsetByCodePoints scanRight toArray unary_~ /: collect filterNot intersect orElse segmentLength toBoolean union :+ collectFirst finalize invert padTo self toBuffer unzip :\ combinations find isDefinedAt par seq toByte unzip3 < companion flatMap isEmpty parCombiner size toChar update << compare flatten isInstanceOf partition sizeHintIfCheap toCharArray updated <= compareTo fold isTraversableAgain patch slice toCollection view <init> compareToIgnoreCase foldLeft iterator permutations sliding toDouble wait == compose foldRight last prefixLength sortBy toFloat withFilter > concat forall lastIndexOf product sortWith toIndexedSeq zip >= contains foreach lastIndexOfSlice r sorted toInt zipAll >> containsSlice format lastIndexWhere reduce span toIterable zipWithIndex >>> contentEquals formatLocal lastOption reduceLeft split toIterator zipped ^ copyToArray formatted length reduceLeftOption splitAt toList | __arrayOfChars copyToBuffer genericBuilder lengthCompare reduceOption startsWith toLong || __sequenceOfChars corresponds getBytes lift reduceRight stringPrefix toLowerCase
But I can't call them:
scala> null.isEmpty 1 |null.isEmpty |^^^^^^^^^^^^ |value `isEmpty` is not a member of Null
And the <init> method also appears in the completion content:
scala> 0. ResultWithoutStep <init> compareTo isInfinite max toBinaryString unary_+ != == doubleValue isInfinity min toByte unary_- ## > ensuring isInstanceOf ne toChar unary_~ % >= eq isNaN notify toDegrees underlying & >> equals isNegInfinity notifyAll toDouble unifiedPrimitiveEquals * >>> finalize isPosInfinity num toFloat unifiedPrimitiveHashcode + ^ floatValue isValidByte ord toHexString until - abs floor isValidChar round toInt wait -> asInstanceOf formatted isValidInt self toLong | / byteValue getClass isValidLong shortValue toOctalString < ceil hashCode isValidShort signum toRadians << clone intValue isWhole synchronized toShort <= compare integralNum longValue to toString scala> (). != + <init> asInstanceOf equals getClass isInstanceOf ## -> == ensuring formatted hashCode toString