Skip to content

Commit

Permalink
Merge pull request scala#9442 from som-snytt/issue/12318
Browse files Browse the repository at this point in the history
  • Loading branch information
lrytz authored Jan 20, 2021
2 parents b5f244f + daa5a28 commit 8a0feb3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 20 deletions.
3 changes: 1 addition & 2 deletions src/compiler/scala/tools/nsc/typechecker/Typers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ package scala
package tools.nsc
package typechecker

import scala.annotation.{nowarn, tailrec}
import scala.annotation.tailrec
import scala.collection.mutable
import scala.reflect.internal.{Chars, TypesStats}
import scala.reflect.internal.util.{FreshNameCreator, ListOfNil, Statistics, StatisticsStatics}
Expand Down Expand Up @@ -3857,7 +3857,6 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
/**
* Convert an annotation constructor call into an AnnotationInfo.
*/
@nowarn("cat=lint-nonlocal-return")
def typedAnnotation(ann: Tree, annotee: Option[Tree], mode: Mode = EXPRmode): AnnotationInfo = {
var hasError: Boolean = false
var unmappable: Boolean = false
Expand Down
26 changes: 13 additions & 13 deletions src/compiler/templates/tool-unix.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,6 @@ if [[ -z "$TOOL_CLASSPATH" ]]; then
done
fi

if [[ -n "$cygwin" ]]; then
if [[ "$OS" = "Windows_NT" ]] && cygpath -m .>/dev/null 2>/dev/null ; then
format=mixed
else
format=windows
fi
SCALA_HOME="$(cygpath --$format "$SCALA_HOME")"
if [[ -n "$JAVA_HOME" ]]; then
JAVA_HOME="$(cygpath --$format "$JAVA_HOME")"
fi
TOOL_CLASSPATH="$(cygpath --path --$format "$TOOL_CLASSPATH")"
fi

if [[ -n "$cygwin$mingw$msys" ]]; then
case "$TERM" in
rxvt* | xterm* | cygwin*)
Expand Down Expand Up @@ -184,6 +171,19 @@ done
# reset "$@@" to the remaining args
set -- "${scala_args[@@]}"

if [[ -n "$cygwin" ]]; then
if [[ "$OS" = "Windows_NT" ]] && cygpath -m .>/dev/null 2>/dev/null ; then
format=mixed
else
format=windows
fi
SCALA_HOME="$(cygpath --$format "$SCALA_HOME")"
if [[ -n "$JAVA_HOME" ]]; then
JAVA_HOME="$(cygpath --$format "$JAVA_HOME")"
fi
TOOL_CLASSPATH="$(cygpath --path --$format "$TOOL_CLASSPATH")"
fi

if [[ -z "$JAVACMD" && -n "$JAVA_HOME" && -x "$JAVA_HOME/bin/java" ]]; then
JAVACMD="$JAVA_HOME/bin/java"
fi
Expand Down
3 changes: 0 additions & 3 deletions src/library/scala/collection/mutable/Growable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ package scala
package collection
package mutable

import scala.annotation.nowarn

/** This trait forms part of collections that can be augmented
* using a `+=` operator and that can be cleared of all elements using
* a `clear` method.
Expand Down Expand Up @@ -56,7 +54,6 @@ trait Growable[-A] extends Clearable {
* @param xs the IterableOnce producing the elements to $add.
* @return the $coll itself.
*/
@nowarn("msg=will most likely never compare equal")
def addAll(xs: IterableOnce[A]): this.type = {
if (xs.asInstanceOf[AnyRef] eq this) addAll(Buffer.from(xs)) // avoid mutating under our own iterator
else {
Expand Down
3 changes: 1 addition & 2 deletions src/library/scala/collection/mutable/Shrinkable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
package scala
package collection.mutable

import scala.annotation.{nowarn, tailrec}
import scala.annotation.tailrec

/** This trait forms part of collections that can be reduced
* using a `-=` operator.
Expand Down Expand Up @@ -52,7 +52,6 @@ trait Shrinkable[-A] {
* @param xs the iterator producing the elements to remove.
* @return the $coll itself
*/
@nowarn("msg=will most likely never compare equal")
def subtractAll(xs: collection.IterableOnce[A]): this.type = {
@tailrec def loop(xs: collection.LinearSeq[A]): Unit = {
if (xs.nonEmpty) {
Expand Down

0 comments on commit 8a0feb3

Please sign in to comment.