From 99fcdf758e5b52f77a138bc777692dd2461e0a9c Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Fri, 22 May 2015 09:27:07 +1000 Subject: SI-9321 Clarify spec for inheritance of qualified private MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I checked the intent with Martin, who said: > [...] qualified private members are inherited like other members, > it’s just that their access is restricted. I've locked this in with a test as well. --- test/files/pos/t9321.scala | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/files/pos/t9321.scala (limited to 'test/files/pos') diff --git a/test/files/pos/t9321.scala b/test/files/pos/t9321.scala new file mode 100644 index 0000000000..ed3a816656 --- /dev/null +++ b/test/files/pos/t9321.scala @@ -0,0 +1,10 @@ +object p { + trait A { + private[p] val qualifiedPrivateMember = 1 + } + + def useQualifiedPrivate(b: Mix) = + b.qualifiedPrivateMember // allowed +} + +trait Mix extends p.A -- cgit v1.2.3 From f8fbd5dbf031a04343c795cfa99cf768add65f05 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Tue, 16 Jun 2015 17:00:25 -0700 Subject: SI-9356 more careful assertion in back-end Calling `exists` on a `Symbol` triggers unpickling, which failed for reasons I did not investigate. Replaced `sym.exists` by `sym != NoSymbol`, which is good enough here. Also replaced assertion by a `devWarning`, since the logic seems too ad-hoc to actually crash the compiler when it's invalidated. Partially reverts b45a91fe22. See also #1532. --- .../scala/tools/nsc/backend/jvm/GenASM.scala | 20 +++++++++----------- test/files/pos/t9356/Foo_2.scala | 6 ++++++ test/files/pos/t9356/MyAnnotation.java | 12 ++++++++++++ test/files/pos/t9356/Test_3.scala | 3 +++ 4 files changed, 30 insertions(+), 11 deletions(-) create mode 100644 test/files/pos/t9356/Foo_2.scala create mode 100644 test/files/pos/t9356/MyAnnotation.java create mode 100644 test/files/pos/t9356/Test_3.scala (limited to 'test/files/pos') diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala index f866c0d038..76af40b330 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala @@ -617,18 +617,16 @@ abstract class GenASM extends SubComponent with BytecodeWriters { self => val internalName = cachedJN.toString() val trackedSym = jsymbol(sym) reverseJavaName.get(internalName) match { - case Some(oldsym) if oldsym.exists && trackedSym.exists => - assert( - // In contrast, neither NothingClass nor NullClass show up bytecode-level. - (oldsym == trackedSym) || (oldsym == RuntimeNothingClass) || (oldsym == RuntimeNullClass) || (oldsym.isModuleClass && (oldsym.sourceModule == trackedSym.sourceModule)), - s"""|Different class symbols have the same bytecode-level internal name: - | name: $internalName - | oldsym: ${oldsym.fullNameString} - | tracked: ${trackedSym.fullNameString} - """.stripMargin - ) - case _ => + case None => reverseJavaName.put(internalName, trackedSym) + case Some(oldsym) => + // TODO: `duplicateOk` seems pretty ad-hoc (a more aggressive version caused SI-9356 because it called oldSym.exists, which failed in the unpickler; see also SI-5031) + def duplicateOk = oldsym == NoSymbol || trackedSym == NoSymbol || (syntheticCoreClasses contains oldsym) || (oldsym.isModuleClass && (oldsym.sourceModule == trackedSym.sourceModule)) + if (oldsym != trackedSym && !duplicateOk) + devWarning(s"""|Different class symbols have the same bytecode-level internal name: + | name: $internalName + | oldsym: ${oldsym.fullNameString} + | tracked: ${trackedSym.fullNameString}""".stripMargin) } } diff --git a/test/files/pos/t9356/Foo_2.scala b/test/files/pos/t9356/Foo_2.scala new file mode 100644 index 0000000000..ab7bb44d0e --- /dev/null +++ b/test/files/pos/t9356/Foo_2.scala @@ -0,0 +1,6 @@ +class C + +trait Foo { + @annot.MyAnnotation(cls = classOf[C]) + def function: Any = ??? +} diff --git a/test/files/pos/t9356/MyAnnotation.java b/test/files/pos/t9356/MyAnnotation.java new file mode 100644 index 0000000000..b6c00e7356 --- /dev/null +++ b/test/files/pos/t9356/MyAnnotation.java @@ -0,0 +1,12 @@ +package annot; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +public @interface MyAnnotation { + Class cls(); +} diff --git a/test/files/pos/t9356/Test_3.scala b/test/files/pos/t9356/Test_3.scala new file mode 100644 index 0000000000..fa1b76c9e1 --- /dev/null +++ b/test/files/pos/t9356/Test_3.scala @@ -0,0 +1,3 @@ +class Foo1 extends Foo + +class Foo2 extends Foo \ No newline at end of file -- cgit v1.2.3 From ce7d2e95ce1f2bc6e601fb31f4c1fefa39d0d222 Mon Sep 17 00:00:00 2001 From: Janek Bogucki Date: Thu, 18 Jun 2015 08:30:44 +0100 Subject: Fix some typos (a-c) --- src/compiler/scala/tools/nsc/backend/opt/Inliners.scala | 2 +- .../scala/tools/nsc/classpath/ZipAndJarFileLookupFactory.scala | 2 +- src/compiler/scala/tools/nsc/symtab/SymbolLoaders.scala | 2 +- src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala | 2 +- src/compiler/scala/tools/nsc/typechecker/Typers.scala | 2 +- src/reflect/scala/reflect/internal/AnnotationCheckers.scala | 2 +- src/reflect/scala/reflect/internal/Symbols.scala | 2 +- src/scaladoc/scala/tools/nsc/doc/model/Entity.scala | 4 ++-- .../scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala | 2 +- test/files/jvm/bytecode-test-example/Test.scala | 2 +- test/files/jvm/t7006/Foo_1.scala | 2 +- test/files/neg/names-defaults-neg.check | 4 ++-- test/files/neg/names-defaults-neg.scala | 4 ++-- test/files/pos/t6575b.scala | 2 +- test/files/run/t6502.scala | 2 +- test/pending/pos/t1786.scala | 2 +- test/pending/run/idempotency-partial-functions.scala | 2 +- test/scaladoc/resources/implicits-base-res.scala | 2 +- 18 files changed, 21 insertions(+), 21 deletions(-) (limited to 'test/files/pos') diff --git a/src/compiler/scala/tools/nsc/backend/opt/Inliners.scala b/src/compiler/scala/tools/nsc/backend/opt/Inliners.scala index 8f6fc65706..8cd2a14066 100644 --- a/src/compiler/scala/tools/nsc/backend/opt/Inliners.scala +++ b/src/compiler/scala/tools/nsc/backend/opt/Inliners.scala @@ -773,7 +773,7 @@ abstract class Inliners extends SubComponent { staleOut += block - tfa.remainingCALLs.remove(instr) // this bookkpeeping is done here and not in MTFAGrowable.reinit due to (1st) convenience and (2nd) necessity. + tfa.remainingCALLs.remove(instr) // this bookkeeping is done here and not in MTFAGrowable.reinit due to (1st) convenience and (2nd) necessity. tfa.isOnWatchlist.remove(instr) // ditto tfa.warnIfInlineFails.remove(instr) diff --git a/src/compiler/scala/tools/nsc/classpath/ZipAndJarFileLookupFactory.scala b/src/compiler/scala/tools/nsc/classpath/ZipAndJarFileLookupFactory.scala index 84e21a3ccd..85c7c3c843 100644 --- a/src/compiler/scala/tools/nsc/classpath/ZipAndJarFileLookupFactory.scala +++ b/src/compiler/scala/tools/nsc/classpath/ZipAndJarFileLookupFactory.scala @@ -61,7 +61,7 @@ object ZipAndJarFlatClassPathFactory extends ZipAndJarFileLookupFactory { } /** - * This type of classpath is closly related to the support for JSR-223. + * This type of classpath is closely related to the support for JSR-223. * Its usage can be observed e.g. when running: * jrunscript -classpath scala-compiler.jar;scala-reflect.jar;scala-library.jar -l scala * with a particularly prepared scala-library.jar. It should have all classes listed in the manifest like e.g. this entry: diff --git a/src/compiler/scala/tools/nsc/symtab/SymbolLoaders.scala b/src/compiler/scala/tools/nsc/symtab/SymbolLoaders.scala index a22428075c..4f5589fd7c 100644 --- a/src/compiler/scala/tools/nsc/symtab/SymbolLoaders.scala +++ b/src/compiler/scala/tools/nsc/symtab/SymbolLoaders.scala @@ -373,7 +373,7 @@ abstract class SymbolLoaders { protected def doComplete(root: Symbol) { root.sourceModule.initialize } } - /** used from classfile parser to avoid cyclies */ + /** used from classfile parser to avoid cycles */ var parentsLevel = 0 var pendingLoadActions: List[() => Unit] = Nil } diff --git a/src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala b/src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala index 6302e34ac9..451b72d498 100644 --- a/src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala +++ b/src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala @@ -248,7 +248,7 @@ trait MatchTranslation { if (caseDefs forall treeInfo.isCatchCase) caseDefs else { val swatches = { // switch-catches - // SI-7459 must duplicate here as we haven't commited to switch emission, and just figuring out + // SI-7459 must duplicate here as we haven't committed to switch emission, and just figuring out // if we can ends up mutating `caseDefs` down in the use of `substituteSymbols` in // `TypedSubstitution#Substitution`. That is called indirectly by `emitTypeSwitch`. val bindersAndCases = caseDefs.map(_.duplicate) map { caseDef => diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 27a574a449..8dd65a78ed 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -4443,7 +4443,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper def onError(typeErrors: Seq[AbsTypeError], warnings: Seq[(Position, String)]): Tree = { if (Statistics.canEnable) Statistics.stopTimer(failedApplyNanos, start) - // If the problem is with raw types, copnvert to existentials and try again. + // If the problem is with raw types, convert to existentials and try again. // See #4712 for a case where this situation arises, if ((fun.symbol ne null) && fun.symbol.isJavaDefined) { val newtpe = rawToExistential(fun.tpe) diff --git a/src/reflect/scala/reflect/internal/AnnotationCheckers.scala b/src/reflect/scala/reflect/internal/AnnotationCheckers.scala index 74310e1c34..1ba014d19d 100644 --- a/src/reflect/scala/reflect/internal/AnnotationCheckers.scala +++ b/src/reflect/scala/reflect/internal/AnnotationCheckers.scala @@ -60,7 +60,7 @@ trait AnnotationCheckers { * mode (see method adapt in trait Typers). * * An implementation cannot rely on canAdaptAnnotations being called before. If the implementing - * class cannot do the adaptiong, it should return the tree unchanged. + * class cannot do the adapting, it should return the tree unchanged. */ @deprecated("Create an AnalyzerPlugin and use adaptAnnotations", "2.10.1") def adaptAnnotations(tree: Tree, mode: Mode, pt: Type): Tree = tree diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala index abe966920b..285d59c5e2 100644 --- a/src/reflect/scala/reflect/internal/Symbols.scala +++ b/src/reflect/scala/reflect/internal/Symbols.scala @@ -987,7 +987,7 @@ trait Symbols extends api.Symbols { self: SymbolTable => || isLocalToBlock ) ) - /** Is this symbol effectively final or a concrete term member of sealed class whose childred do not override it */ + /** Is this symbol effectively final or a concrete term member of sealed class whose children do not override it */ final def isEffectivelyFinalOrNotOverridden: Boolean = isEffectivelyFinal || (isTerm && !isDeferred && isNotOverridden) /** Is this symbol owned by a package? */ diff --git a/src/scaladoc/scala/tools/nsc/doc/model/Entity.scala b/src/scaladoc/scala/tools/nsc/doc/model/Entity.scala index 7fe8903c76..c2b1fa6bfb 100644 --- a/src/scaladoc/scala/tools/nsc/doc/model/Entity.scala +++ b/src/scaladoc/scala/tools/nsc/doc/model/Entity.scala @@ -484,10 +484,10 @@ trait ImplicitConversion { /** The entity for the method that performed the conversion, if it's documented (or just its name, otherwise) */ def convertorMethod: Either[MemberEntity, String] - /** A short name of the convertion */ + /** A short name of the conversion */ def conversionShortName: String - /** A qualified name uniquely identifying the convertion (currently: the conversion method's qualified name) */ + /** A qualified name uniquely identifying the conversion (currently: the conversion method's qualified name) */ def conversionQualifiedName: String /** The entity that performed the conversion */ diff --git a/src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala b/src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala index f984b4579f..27c3d39269 100644 --- a/src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala +++ b/src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala @@ -475,7 +475,7 @@ trait ModelFactoryImplicitSupport { } /** - * Make implicits explicit - Not used curently + * Make implicits explicit - Not used currently */ // object implicitToExplicit extends TypeMap { // def apply(tp: Type): Type = mapOver(tp) match { diff --git a/test/files/jvm/bytecode-test-example/Test.scala b/test/files/jvm/bytecode-test-example/Test.scala index d668059cb7..0da54d5bde 100644 --- a/test/files/jvm/bytecode-test-example/Test.scala +++ b/test/files/jvm/bytecode-test-example/Test.scala @@ -17,7 +17,7 @@ object Test extends BytecodeTest { def countNullChecks(insnList: InsnList): Int = { /** Is given instruction a null check? * NOTE - * This will detect direct null compparsion as in + * This will detect direct null comparison as in * if (x == null) ... * and not indirect as in * val foo = null diff --git a/test/files/jvm/t7006/Foo_1.scala b/test/files/jvm/t7006/Foo_1.scala index 995619ce6b..3985557d9f 100644 --- a/test/files/jvm/t7006/Foo_1.scala +++ b/test/files/jvm/t7006/Foo_1.scala @@ -5,6 +5,6 @@ class Foo_1 { } finally { print("hello") } - while(true){} // ensure infinite loop doesn't break the algoirthm + while(true){} // ensure infinite loop doesn't break the algorithm } } diff --git a/test/files/neg/names-defaults-neg.check b/test/files/neg/names-defaults-neg.check index 2db24b6f32..a43bf66811 100644 --- a/test/files/neg/names-defaults-neg.check +++ b/test/files/neg/names-defaults-neg.check @@ -64,7 +64,7 @@ names-defaults-neg.scala:49: error: ambiguous reference to overloaded definition both method g in object t7 of type (a: B)String and method g in object t7 of type (a: C, b: Int*)String match argument types (C) - t7.g(new C()) // ambigous reference + t7.g(new C()) // ambiguous reference ^ names-defaults-neg.scala:53: error: parameter 'b' is already specified at parameter position 2 test5(a = 1, b = "dkjl", b = "dkj") @@ -79,7 +79,7 @@ names-defaults-neg.scala:61: error: ambiguous reference to overloaded definition both method f in object t8 of type (b: String, a: Int)String and method f in object t8 of type (a: Int, b: Object)String match argument types (a: Int,b: String) and expected result type Any - println(t8.f(a = 0, b = "1")) // ambigous reference + println(t8.f(a = 0, b = "1")) // ambiguous reference ^ names-defaults-neg.scala:69: error: wrong number of arguments for pattern A1(x: Int,y: String) A1() match { case A1(_) => () } diff --git a/test/files/neg/names-defaults-neg.scala b/test/files/neg/names-defaults-neg.scala index 042f73708c..a97b590bf2 100644 --- a/test/files/neg/names-defaults-neg.scala +++ b/test/files/neg/names-defaults-neg.scala @@ -46,7 +46,7 @@ object Test extends App { def g(a: C, b: Int*) = "third" def g(a: B) = "fourth" } - t7.g(new C()) // ambigous reference + t7.g(new C()) // ambiguous reference // vararg def test5(a: Int, b: String*) = a @@ -58,7 +58,7 @@ object Test extends App { def f(a: Int, b: Object) = "first" def f(b: String, a: Int) = "second" } - println(t8.f(a = 0, b = "1")) // ambigous reference + println(t8.f(a = 0, b = "1")) // ambiguous reference // case class copy does not exist if there's a vararg diff --git a/test/files/pos/t6575b.scala b/test/files/pos/t6575b.scala index d3e58b2a16..c89424287a 100644 --- a/test/files/pos/t6575b.scala +++ b/test/files/pos/t6575b.scala @@ -1,5 +1,5 @@ // inferred types were okay here as Function nodes aren't -// translated into anoymous subclasses of AbstractFunctionN +// translated into anonymous subclasses of AbstractFunctionN // until after the typer. // // So this test is just confirmation. diff --git a/test/files/run/t6502.scala b/test/files/run/t6502.scala index 52fabef6b8..d6b15a0189 100644 --- a/test/files/run/t6502.scala +++ b/test/files/run/t6502.scala @@ -123,7 +123,7 @@ object Test extends StoreReporterDirectTest { } def test6(): Unit = { - // Avoid java.lang.NoClassDefFoundError triggered by the old appoach of using a Java + // Avoid java.lang.NoClassDefFoundError triggered by the old approach of using a Java // classloader to parse .class files in order to read their names. val jar = "test6.jar" compileCode(app6, jar) diff --git a/test/pending/pos/t1786.scala b/test/pending/pos/t1786.scala index 6299eb9eae..16ce4301bc 100644 --- a/test/pending/pos/t1786.scala +++ b/test/pending/pos/t1786.scala @@ -1,5 +1,5 @@ /** This a consequence of the current type checking algorithm, where bounds are checked only after variables are instantiated. - * I believe this will change once we go to contraint-based type inference. + * I believe this will change once we go to constraint-based type inference. * Alternatively, we can pursue a more extensive fix to SI-6169 * * The below code shows a compiler flaw in that the wildcard "_" as value for a bounded type parameter either diff --git a/test/pending/run/idempotency-partial-functions.scala b/test/pending/run/idempotency-partial-functions.scala index b26c442599..c9d650ca89 100644 --- a/test/pending/run/idempotency-partial-functions.scala +++ b/test/pending/run/idempotency-partial-functions.scala @@ -6,7 +6,7 @@ import scala.tools.reflect.Eval // Related to SI-6187 // // Moved to pending as we are currently blocked by the inability -// to reify the parent types of the anoymous function class, +// to reify the parent types of the anonymous function class, // which are not part of the tree, but rather only part of the // ClassInfoType. object Test extends App { diff --git a/test/scaladoc/resources/implicits-base-res.scala b/test/scaladoc/resources/implicits-base-res.scala index 1d17e9a6d3..559d21997f 100644 --- a/test/scaladoc/resources/implicits-base-res.scala +++ b/test/scaladoc/resources/implicits-base-res.scala @@ -52,7 +52,7 @@ object A { * def convToGtColonDoubleA(x: Double) // enrichA3: no constraints * def convToManifestA(x: Double) // enrichA7: no constraints * def convToMyNumericA(x: Double) // enrichA6: (if showAll is set) with a constraint that there is x: MyNumeric[Double] implicit in scope - * def convToNumericA(x: Double) // enrichA1: no constraintsd + * def convToNumericA(x: Double) // enrichA1: no constraints * def convToEnrichedA(x: Bar[Foo[Double]]) // enrichA5: no constraints, SHADOWED * def convToEnrichedA(x: Double) // enrichA0: no constraints, SHADOWED * def convToTraversableOps(x: Double) // enrichA7: no constraints -- cgit v1.2.3 From 2dcc4c42fdcefee08add9dbdcf619ab5da745674 Mon Sep 17 00:00:00 2001 From: Michał Pociecha Date: Wed, 17 Jun 2015 11:46:31 +0200 Subject: Fix another several typos I just used text search to check whether there are no more typos like these corrected by janekdb, and by the way fixed also some other ones which I saw. --- src/compiler/scala/tools/nsc/typechecker/Typers.scala | 2 +- src/scaladoc/scala/tools/nsc/doc/Settings.scala | 4 ++-- src/scaladoc/scala/tools/nsc/doc/model/Entity.scala | 2 +- .../scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala | 4 ++-- src/scaladoc/scala/tools/nsc/doc/model/diagram/DiagramFactory.scala | 2 +- test/files/neg/t2866.check | 2 +- test/files/neg/t2866.scala | 2 +- test/files/pos/t6648.scala | 2 +- test/scaladoc/run/implicits-base.scala | 2 +- test/scaladoc/scalacheck/HtmlFactoryTest.scala | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) (limited to 'test/files/pos') diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 8dd65a78ed..b5129af9ec 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -4988,7 +4988,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper TypeTreeWithDeferredRefCheck(){ () => // wrap the tree and include the bounds check -- refchecks will perform this check (that the beta reduction was indeed allowed) and unwrap // we can't simply use original in refchecks because it does not contains types - // (and the only typed trees we have have been mangled so they're not quite the original tree anymore) + // (and the only typed trees we have been mangled so they're not quite the original tree anymore) checkBounds(result, tpt1.tpe.prefix, tpt1.symbol.owner, tpt1.symbol.typeParams, argtypes, "") result // you only get to see the wrapped tree after running this check :-p } setType (result.tpe) setPos(result.pos) diff --git a/src/scaladoc/scala/tools/nsc/doc/Settings.scala b/src/scaladoc/scala/tools/nsc/doc/Settings.scala index 44683f1755..067b2b2c29 100644 --- a/src/scaladoc/scala/tools/nsc/doc/Settings.scala +++ b/src/scaladoc/scala/tools/nsc/doc/Settings.scala @@ -143,7 +143,7 @@ class Settings(error: String => Unit, val printMsg: String => Unit = println(_)) "dot" // by default, just pick up the system-wide dot ) - /** The maxium nuber of normal classes to show in the diagram */ + /** The maximum number of normal classes to show in the diagram */ val docDiagramsMaxNormalClasses = IntSetting( "-diagrams-max-classes", "The maximum number of superclasses or subclasses to show in a diagram", @@ -152,7 +152,7 @@ class Settings(error: String => Unit, val printMsg: String => Unit = println(_)) _ => None ) - /** The maxium nuber of implcit classes to show in the diagram */ + /** The maximum number of implicit classes to show in the diagram */ val docDiagramsMaxImplicitClasses = IntSetting( "-diagrams-max-implicits", "The maximum number of implicitly converted classes to show in a diagram", diff --git a/src/scaladoc/scala/tools/nsc/doc/model/Entity.scala b/src/scaladoc/scala/tools/nsc/doc/model/Entity.scala index c2b1fa6bfb..90de51d763 100644 --- a/src/scaladoc/scala/tools/nsc/doc/model/Entity.scala +++ b/src/scaladoc/scala/tools/nsc/doc/model/Entity.scala @@ -298,7 +298,7 @@ trait DocTemplateEntity extends MemberTemplateEntity { /** The shadowing information for the implicitly added members */ def implicitsShadowing: Map[MemberEntity, ImplicitMemberShadowing] - /** Classes that can be implcitly converted to this class */ + /** Classes that can be implicitly converted to this class */ def incomingImplicitlyConvertedClasses: List[(DocTemplateEntity, ImplicitConversion)] /** Classes to which this class can be implicitly converted to diff --git a/src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala b/src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala index 27c3d39269..559bcea80d 100644 --- a/src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala +++ b/src/scaladoc/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala @@ -396,7 +396,7 @@ trait ModelFactoryImplicitSupport { def isHiddenConversion = settings.hiddenImplicits(conversionQualifiedName) - override def toString = "Implcit conversion from " + sym.tpe + " to " + toType + " done by " + convSym + override def toString = "Implicit conversion from " + sym.tpe + " to " + toType + " done by " + convSym } /* ========================= HELPER METHODS ========================== */ @@ -557,7 +557,7 @@ trait ModelFactoryImplicitSupport { * * The trick here is that the resultType does not matter - the condition for removal it that paramss have the same * structure (A => B => C may not override (A, B) => C) and that all the types involved are - * of the implcit conversion's member are subtypes of the parent members' parameters */ + * of the implicit conversion's member are subtypes of the parent members' parameters */ def isDistinguishableFrom(t1: Type, t2: Type): Boolean = { // Vlad: I tried using matches but it's not exactly what we need: // (p: AnyRef)AnyRef matches ((t: String)AnyRef returns false -- but we want that to be true diff --git a/src/scaladoc/scala/tools/nsc/doc/model/diagram/DiagramFactory.scala b/src/scaladoc/scala/tools/nsc/doc/model/diagram/DiagramFactory.scala index 87d7ece8f2..093899231e 100644 --- a/src/scaladoc/scala/tools/nsc/doc/model/diagram/DiagramFactory.scala +++ b/src/scaladoc/scala/tools/nsc/doc/model/diagram/DiagramFactory.scala @@ -51,7 +51,7 @@ trait DiagramFactory extends DiagramDirectiveParser { case p: (TemplateEntity, TypeEntity) if !classExcluded(p._1) => NormalNode(p._2, Some(p._1))() }.reverse - // incoming implcit conversions + // incoming implicit conversions lazy val incomingImplicitNodes = tpl.incomingImplicitlyConvertedClasses.map { case (incomingTpl, conv) => ImplicitNode(makeType(incomingTpl.sym.tpe, tpl), Some(incomingTpl))(implicitTooltip(from=incomingTpl, to=tpl, conv=conv)) diff --git a/test/files/neg/t2866.check b/test/files/neg/t2866.check index 340fb8da22..bc0da7e355 100644 --- a/test/files/neg/t2866.check +++ b/test/files/neg/t2866.check @@ -5,7 +5,7 @@ t2866.scala:42: error: ambiguous implicit values: both value two of type Int and value one in object A of type => Int match expected type Int - assert(implicitly[Int] == 2) // !!! Not ambiguous in 2.8.0. Ambigous in 2.7.6 + assert(implicitly[Int] == 2) // !!! Not ambiguous in 2.8.0. Ambiguous in 2.7.6 ^ t2866.scala:50: error: ambiguous implicit values: both value two of type Int diff --git a/test/files/neg/t2866.scala b/test/files/neg/t2866.scala index 55ebff9710..6be8bf9e89 100644 --- a/test/files/neg/t2866.scala +++ b/test/files/neg/t2866.scala @@ -39,7 +39,7 @@ object Test { import A.one assert(implicitly[Int] == 1) implicit val two = 2 - assert(implicitly[Int] == 2) // !!! Not ambiguous in 2.8.0. Ambigous in 2.7.6 + assert(implicitly[Int] == 2) // !!! Not ambiguous in 2.8.0. Ambiguous in 2.7.6 } locally { diff --git a/test/files/pos/t6648.scala b/test/files/pos/t6648.scala index 9593ebfee9..b8f24870cc 100644 --- a/test/files/pos/t6648.scala +++ b/test/files/pos/t6648.scala @@ -10,7 +10,7 @@ class Transformer { } object transformer1 extends Transformer { - // Adding explicit type arguments, or making the impilcit view + // Adding explicit type arguments, or making the implicit view // seqToNodeSeq explicit avoids the crash NodeSeq.foo { // These both avoid the crash: diff --git a/test/scaladoc/run/implicits-base.scala b/test/scaladoc/run/implicits-base.scala index 8f8652cdb3..ea87a670bb 100644 --- a/test/scaladoc/run/implicits-base.scala +++ b/test/scaladoc/run/implicits-base.scala @@ -94,7 +94,7 @@ object Test extends ScaladocModelTest { assert(isShadowed(conv._member("convToEnrichedA"))) assert(conv._member("convToEnrichedA").resultType.name == "Double") - // def convToNumericA: Double // enrichA1: no constraintsd + // def convToNumericA: Double // enrichA1: no constraints conv = B._conversion(A.qualifiedName + ".enrichA1") assert(conv.members.length == 1) assert(conv.constraints.length == 0) diff --git a/test/scaladoc/scalacheck/HtmlFactoryTest.scala b/test/scaladoc/scalacheck/HtmlFactoryTest.scala index 6a6b1f8901..578e0382eb 100644 --- a/test/scaladoc/scalacheck/HtmlFactoryTest.scala +++ b/test/scaladoc/scalacheck/HtmlFactoryTest.scala @@ -711,7 +711,7 @@ object Test extends Properties("HtmlFactory") { property("class") = files.get("com/example/p1/Clazz.html") match { case Some(node: scala.xml.Node) => { - property("implicit convertion") = + property("implicit conversion") = node.toString contains "implicit " property("gt4s") = -- cgit v1.2.3 From 2530699c103460c0e8388179aa91db6cedb89ecc Mon Sep 17 00:00:00 2001 From: Janek Bogucki Date: Sun, 21 Jun 2015 22:44:30 +0100 Subject: Fix 36 typos (d-f) --- src/compiler/scala/reflect/quasiquotes/Holes.scala | 2 +- src/compiler/scala/tools/nsc/PhaseAssembly.scala | 2 +- src/compiler/scala/tools/nsc/backend/icode/GenICode.scala | 4 ++-- .../scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala | 2 +- src/compiler/scala/tools/nsc/backend/jvm/BCodeSkelBuilder.scala | 2 +- src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala | 2 +- src/compiler/scala/tools/nsc/backend/jvm/opt/ByteCodeRepository.scala | 2 +- src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala | 4 ++-- src/compiler/scala/tools/nsc/settings/ScalaSettings.scala | 2 +- src/compiler/scala/tools/nsc/transform/Delambdafy.scala | 2 +- src/compiler/scala/tools/nsc/transform/patmat/Logic.scala | 2 +- src/compiler/scala/tools/nsc/transform/patmat/MatchTreeMaking.scala | 2 +- src/library/scala/collection/immutable/Stream.scala | 2 +- src/reflect/scala/reflect/internal/ReificationSupport.scala | 2 +- .../scala/tools/nsc/doc/html/page/diagram/DotDiagramGenerator.scala | 2 +- src/scaladoc/scala/tools/nsc/doc/model/ModelFactory.scala | 2 +- test/files/jvm/unreachable/Test.scala | 2 +- test/files/neg/t3995.scala | 2 +- test/files/neg/t8237-default.scala | 2 +- test/files/neg/t8463.scala | 2 +- test/files/pos/SI-4012-b.scala | 2 +- test/files/pos/delambdafy-patterns.scala | 2 +- test/files/pos/t7200b.scala | 2 +- test/files/run/deeps.scala | 2 +- test/files/run/finally.scala | 2 +- test/files/run/iq.scala | 2 +- test/files/run/names-defaults.scala | 2 +- test/files/run/nullable-lazyvals.scala | 2 +- test/files/run/t6240-universe-code-gen.scala | 4 ++-- test/files/run/t8601-closure-elim.scala | 2 +- test/files/run/t8708_b/Test_2.scala | 2 +- test/files/specialized/constant_lambda.scala | 2 +- test/scaladoc/run/groups.scala | 2 +- 33 files changed, 36 insertions(+), 36 deletions(-) (limited to 'test/files/pos') diff --git a/src/compiler/scala/reflect/quasiquotes/Holes.scala b/src/compiler/scala/reflect/quasiquotes/Holes.scala index 6fa6b9b37a..47084fc317 100644 --- a/src/compiler/scala/reflect/quasiquotes/Holes.scala +++ b/src/compiler/scala/reflect/quasiquotes/Holes.scala @@ -151,7 +151,7 @@ trait Holes { self: Quasiquotes => else None } - /** Map high-rank unquotee onto an expression that eveluates as a list of given rank. + /** Map high-rank unquotee onto an expression that evaluates as a list of given rank. * * All possible combinations of representations are given in the table below: * diff --git a/src/compiler/scala/tools/nsc/PhaseAssembly.scala b/src/compiler/scala/tools/nsc/PhaseAssembly.scala index 4b32aab5ee..ef9818c62d 100644 --- a/src/compiler/scala/tools/nsc/PhaseAssembly.scala +++ b/src/compiler/scala/tools/nsc/PhaseAssembly.scala @@ -226,7 +226,7 @@ trait PhaseAssembly { } /** Given the phases set, will build a dependency graph from the phases set - * Using the aux. method of the DependencyGraph to create nodes and egdes. + * Using the aux. method of the DependencyGraph to create nodes and edges. */ private def phasesSetToDepGraph(phsSet: mutable.HashSet[SubComponent]): DependencyGraph = { val graph = new DependencyGraph() diff --git a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala index 137954b52d..3e23291e92 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala @@ -1022,7 +1022,7 @@ abstract class GenICode extends SubComponent { tree match { case Literal(Constant(null)) if generatedType == NullReference && expectedType != UNIT => // literal null on the stack (as opposed to a boxed null, see SI-8233), - // we can bypass `adapt` which would otherwise emitt a redundant [DROP, CONSTANT(null)] + // we can bypass `adapt` which would otherwise emit a redundant [DROP, CONSTANT(null)] // except one case: when expected type is UNIT (unboxed) where we need to emit just a DROP case _ => adapt(generatedType, expectedType, resCtx, tree.pos) @@ -2108,7 +2108,7 @@ abstract class GenICode extends SubComponent { /** * Represent a label in the current method code. In order * to support forward jumps, labels can be created without - * having a deisgnated target block. They can later be attached + * having a designated target block. They can later be attached * by calling `anchor`. */ class Label(val symbol: Symbol) { diff --git a/src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala b/src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala index 058b6a161d..64c9901a3e 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala @@ -387,7 +387,7 @@ abstract class TypeFlowAnalysis { Moreover, it's often the case that the last CALL_METHOD of interest ("of interest" equates to "being tracked in `isOnWatchlist`) isn't the last instruction on the block. There are cases where the typeflows computed past this `lastInstruction` are needed, and cases when they aren't. - The reasoning behind this decsision is described in `populatePerimeter()`. All `blockTransfer()` needs to do (in order to know at which instruction it can stop) + The reasoning behind this decision is described in `populatePerimeter()`. All `blockTransfer()` needs to do (in order to know at which instruction it can stop) is querying `isOnPerimeter`. Upon visiting a CALL_METHOD that's an inlining candidate, the relevant pieces of information about the pre-instruction typestack are collected for future use. diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BCodeSkelBuilder.scala b/src/compiler/scala/tools/nsc/backend/jvm/BCodeSkelBuilder.scala index a2fd22d24c..0f67852804 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/BCodeSkelBuilder.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/BCodeSkelBuilder.scala @@ -90,7 +90,7 @@ abstract class BCodeSkelBuilder extends BCodeHelpers { override def getCurrentCUnit(): CompilationUnit = { cunit } - /* ---------------- helper utils for generating classes and fiels ---------------- */ + /* ---------------- helper utils for generating classes and fields ---------------- */ def genPlainClass(cd: ClassDef) { assert(cnode == null, "GenBCode detected nested methods.") diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala b/src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala index fffb9286b8..356af36455 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala @@ -322,7 +322,7 @@ class BTypesFromSymbols[G <: Global](val global: G) extends BTypes { val javaCompatMembers = { if (linkedClass != NoSymbol && isTopLevelModuleClass(linkedClass)) // phase travel to exitingPickler: this makes sure that memberClassesForInnerClassTable only sees member - // classes, not local classes of the companion module (E in the exmaple) that were lifted by lambdalift. + // classes, not local classes of the companion module (E in the example) that were lifted by lambdalift. exitingPickler(memberClassesForInnerClassTable(linkedClass)) else Nil diff --git a/src/compiler/scala/tools/nsc/backend/jvm/opt/ByteCodeRepository.scala b/src/compiler/scala/tools/nsc/backend/jvm/opt/ByteCodeRepository.scala index 607b7145d6..dbf19744fa 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/opt/ByteCodeRepository.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/opt/ByteCodeRepository.scala @@ -127,7 +127,7 @@ class ByteCodeRepository(val classPath: ClassFileLookup[AbstractFile], val isJav case Nil => Left(failedClasses) } - // In a MethodInsnNode, the `owner` field may be an array descriptor, for exmple when invoking `clone`. We don't have a method node to return in this case. + // In a MethodInsnNode, the `owner` field may be an array descriptor, for example when invoking `clone`. We don't have a method node to return in this case. if (ownerInternalNameOrArrayDescriptor.charAt(0) == '[') Left(MethodNotFound(name, descriptor, ownerInternalNameOrArrayDescriptor, Nil)) else diff --git a/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala b/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala index 5f51a94673..bd5bab28b5 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala @@ -262,7 +262,7 @@ object LocalOptImpls { * the same index, but distinct start / end ranges are different variables, they may have not the * same type or name. */ - def removeUnusedLocalVariableNodes(method: MethodNode)(fistLocalIndex: Int = parametersSize(method), renumber: Int => Int = identity): Boolean = { + def removeUnusedLocalVariableNodes(method: MethodNode)(firstLocalIndex: Int = parametersSize(method), renumber: Int => Int = identity): Boolean = { def variableIsUsed(start: AbstractInsnNode, end: LabelNode, varIndex: Int): Boolean = { start != end && (start match { case v: VarInsnNode if v.`var` == varIndex => true @@ -276,7 +276,7 @@ object LocalOptImpls { val local = localsIter.next() val index = local.index // parameters and `this` (the lowest indices, starting at 0) are never removed or renumbered - if (index >= fistLocalIndex) { + if (index >= firstLocalIndex) { if (!variableIsUsed(local.start, local.end, index)) localsIter.remove() else if (renumber(index) != index) local.index = renumber(index) } diff --git a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala index 953e43eaca..d3cdf69d30 100644 --- a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala +++ b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala @@ -76,7 +76,7 @@ trait ScalaSettings extends AbsScalaSettings val implicitConversions = Choice("implicitConversions", "Allow definition of implicit functions called views") val higherKinds = Choice("higherKinds", "Allow higher-kinded types") val existentials = Choice("existentials", "Existential types (besides wildcard types) can be written and inferred") - val macros = Choice("experimental.macros", "Allow macro defintion (besides implementation and application)") + val macros = Choice("experimental.macros", "Allow macro definition (besides implementation and application)") } val language = { val description = "Enable or disable language features" diff --git a/src/compiler/scala/tools/nsc/transform/Delambdafy.scala b/src/compiler/scala/tools/nsc/transform/Delambdafy.scala index 55ab73028e..5a7f6c52da 100644 --- a/src/compiler/scala/tools/nsc/transform/Delambdafy.scala +++ b/src/compiler/scala/tools/nsc/transform/Delambdafy.scala @@ -444,7 +444,7 @@ abstract class Delambdafy extends Transform with TypingTransformers with ast.Tre def adaptAndPostErase(tree: Tree, pt: Type): (Boolean, Tree) = { val (needsAdapt, adaptedTree) = adapt(tree, pt) val trans = postErasure.newTransformer(unit) - val postErasedTree = trans.atOwner(currentOwner)(trans.transform(adaptedTree)) // SI-8017 elimnates ErasedValueTypes + val postErasedTree = trans.atOwner(currentOwner)(trans.transform(adaptedTree)) // SI-8017 eliminates ErasedValueTypes (needsAdapt, postErasedTree) } diff --git a/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala b/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala index 227c45b3a7..49a4990722 100644 --- a/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala +++ b/src/compiler/scala/tools/nsc/transform/patmat/Logic.scala @@ -510,7 +510,7 @@ trait ScalaLogic extends Interface with Logic with TreeAndTypeAnalysis { def propForEqualsTo(c: Const): Prop = {observed(); symForEqualsTo.getOrElse(c, False)} // [implementation NOTE: don't access until all potential equalities have been registered using registerEquality]p - /** the information needed to construct the boolean proposition that encods the equality proposition (V = C) + /** the information needed to construct the boolean proposition that encodes the equality proposition (V = C) * * that models a type test pattern `_: C` or constant pattern `C`, where the type test gives rise to a TypeConst C, * and the constant pattern yields a ValueConst C diff --git a/src/compiler/scala/tools/nsc/transform/patmat/MatchTreeMaking.scala b/src/compiler/scala/tools/nsc/transform/patmat/MatchTreeMaking.scala index e1fe220556..e0fcc05de2 100644 --- a/src/compiler/scala/tools/nsc/transform/patmat/MatchTreeMaking.scala +++ b/src/compiler/scala/tools/nsc/transform/patmat/MatchTreeMaking.scala @@ -642,7 +642,7 @@ trait MatchTreeMaking extends MatchCodeGen with Debugging { } // override def apply - // debug.patmat("before fixerupper: "+ xTree) + // debug.patmat("before fixerUpper: "+ xTree) // currentRun.trackerFactory.snapshot() // debug.patmat("after fixerupper") // currentRun.trackerFactory.snapshot() diff --git a/src/library/scala/collection/immutable/Stream.scala b/src/library/scala/collection/immutable/Stream.scala index 7edd36dc22..17cf02cce6 100644 --- a/src/library/scala/collection/immutable/Stream.scala +++ b/src/library/scala/collection/immutable/Stream.scala @@ -153,7 +153,7 @@ import scala.language.implicitConversions * * - The fact that `tail` works at all is of interest. In the definition of * `fibs` we have an initial `(0, 1, Stream(...))` so `tail` is deterministic. - * If we deinfed `fibs` such that only `0` were concretely known then the act + * If we defined `fibs` such that only `0` were concretely known then the act * of determining `tail` would require the evaluation of `tail` which would * cause an infinite recursion and stack overflow. If we define a definition * where the tail is not initially computable then we're going to have an diff --git a/src/reflect/scala/reflect/internal/ReificationSupport.scala b/src/reflect/scala/reflect/internal/ReificationSupport.scala index eddfec82e7..d393a841b7 100644 --- a/src/reflect/scala/reflect/internal/ReificationSupport.scala +++ b/src/reflect/scala/reflect/internal/ReificationSupport.scala @@ -802,7 +802,7 @@ trait ReificationSupport { self: SymbolTable => require(enums.nonEmpty, "enumerators can't be empty") enums.head match { case SyntacticValFrom(_, _) => - case t => throw new IllegalArgumentException(s"$t is not a valid fist enumerator of for loop") + case t => throw new IllegalArgumentException(s"$t is not a valid first enumerator of for loop") } enums.tail.foreach { case SyntacticValEq(_, _) | SyntacticValFrom(_, _) | SyntacticFilter(_) => diff --git a/src/scaladoc/scala/tools/nsc/doc/html/page/diagram/DotDiagramGenerator.scala b/src/scaladoc/scala/tools/nsc/doc/html/page/diagram/DotDiagramGenerator.scala index b541cf721b..320a8e23b2 100644 --- a/src/scaladoc/scala/tools/nsc/doc/html/page/diagram/DotDiagramGenerator.scala +++ b/src/scaladoc/scala/tools/nsc/doc/html/page/diagram/DotDiagramGenerator.scala @@ -383,7 +383,7 @@ class DotDiagramGenerator(settings: doc.Settings, dotRunner: DotRunner) extends if (dotId.count(_ == '|') == 1) { val Array(klass, id) = dotId.toString.split("\\|") /* Sometimes dot "forgets" to add the image -- that's very annoying, but it seems pretty random, and simple - * tests like excute 20K times and diff the output don't trigger the bug -- so it's up to us to place the image + * tests like execute 20K times and diff the output don't trigger the bug -- so it's up to us to place the image * back in the node */ val kind = getKind(klass) if (kind != "") diff --git a/src/scaladoc/scala/tools/nsc/doc/model/ModelFactory.scala b/src/scaladoc/scala/tools/nsc/doc/model/ModelFactory.scala index 03d71f15a3..3cbcbc433e 100644 --- a/src/scaladoc/scala/tools/nsc/doc/model/ModelFactory.scala +++ b/src/scaladoc/scala/tools/nsc/doc/model/ModelFactory.scala @@ -478,7 +478,7 @@ class ModelFactory(val global: Global, val settings: doc.Settings) { override lazy val comment = { def nonRootTemplate(sym: Symbol): Option[DocTemplateImpl] = if (sym eq RootPackage) None else findTemplateMaybe(sym) - /* Variable precendence order for implicitly added members: Take the variable defifinitions from ... + /* Variable precendence order for implicitly added members: Take the variable definitions from ... * 1. the target of the implicit conversion * 2. the definition template (owner) * 3. the current template diff --git a/test/files/jvm/unreachable/Test.scala b/test/files/jvm/unreachable/Test.scala index 3f520eb106..4c0fcb2ae8 100644 --- a/test/files/jvm/unreachable/Test.scala +++ b/test/files/jvm/unreachable/Test.scala @@ -6,7 +6,7 @@ import scala.collection.JavaConverters._ object Test extends BytecodeTest { def show: Unit = { val classNode = loadClassNode("Foo_1") - // Foo_1 is full of unreachable code which if not elimintated + // Foo_1 is full of unreachable code which if not eliminated // will result in NOPs as can be confirmed by adding -Ydisable-unreachable-prevention // to Foo_1.flags for (methodNode <- classNode.methods.asScala) { diff --git a/test/files/neg/t3995.scala b/test/files/neg/t3995.scala index b03617ac86..c79f2a5865 100644 --- a/test/files/neg/t3995.scala +++ b/test/files/neg/t3995.scala @@ -27,6 +27,6 @@ object Test { // can be accessed with unambiguous stable prefixes, the implicits infos // which are members of these companion objects." // - // The skolem is stable, but it doen't seem much good to us + // The skolem is stable, but it does not seem much good to us (new Lift).apply("") } diff --git a/test/files/neg/t8237-default.scala b/test/files/neg/t8237-default.scala index f695aa523f..a4370046bd 100644 --- a/test/files/neg/t8237-default.scala +++ b/test/files/neg/t8237-default.scala @@ -1,4 +1,4 @@ -// This test case was extracte from `names-defaults-neg.scala` +// This test case was extracted from `names-defaults-neg.scala` // It pinpoints an improvement an error message that results from // a type inference failure object Test extends App { diff --git a/test/files/neg/t8463.scala b/test/files/neg/t8463.scala index 7c954fd834..1337f8bece 100644 --- a/test/files/neg/t8463.scala +++ b/test/files/neg/t8463.scala @@ -7,7 +7,7 @@ object Test { /* If SI-8230 is fixed, and `viewExists` is changed to no longer leak ambiguity errors, you might expect the check file for this test to - change as folloes: + change as follows: @@ -1,18 +1,10 @@ -t8463.scala:5: error: no type parameters for method apply: (activity: diff --git a/test/files/pos/SI-4012-b.scala b/test/files/pos/SI-4012-b.scala index 6bc8592766..f6d84963e4 100644 --- a/test/files/pos/SI-4012-b.scala +++ b/test/files/pos/SI-4012-b.scala @@ -6,7 +6,7 @@ object Sub extends Super[Int] { // it is expected that super[Super].superb crashes, since // specialization does parent class rewiring, and the super // of Sub becomes Super$mcII$sp and not Super. But I consider - // this normal behavior -- if you want, I can modify duplicatiors + // this normal behavior -- if you want, I can modify duplicators // to make this work, but I consider it's best to keep this // let the user know Super is not the superclass anymore. // super[Super].superb - Vlad diff --git a/test/files/pos/delambdafy-patterns.scala b/test/files/pos/delambdafy-patterns.scala index 95d498629b..ca9eaa67e3 100644 --- a/test/files/pos/delambdafy-patterns.scala +++ b/test/files/pos/delambdafy-patterns.scala @@ -2,7 +2,7 @@ class DelambdafyPatterns { def bar: Unit = () def wildcardPatternInTryCatch: Unit => Unit = (x: Unit) => // patterns in try..catch are preserved so we need to be - // careful when it comes to free variable detction + // careful when it comes to free variable detection // in particular a is _not_ free variable, also the // `_` identifier has no symbol attached to it try bar catch { diff --git a/test/files/pos/t7200b.scala b/test/files/pos/t7200b.scala index 9d579c6ef9..59be898fd0 100644 --- a/test/files/pos/t7200b.scala +++ b/test/files/pos/t7200b.scala @@ -10,7 +10,7 @@ trait Foo { object O extends Foo { def coflatMap[A <: T](f: A) = { val f2 = coflatMap(f) // inferred in 2.9.2 / 2.10.0 as [Nothing] - f2.t // so this does't type check. + f2.t // so this fails to type check. f2 } } diff --git a/test/files/run/deeps.scala b/test/files/run/deeps.scala index 6049cc6024..1546112ed5 100644 --- a/test/files/run/deeps.scala +++ b/test/files/run/deeps.scala @@ -3,7 +3,7 @@ //############################################################################ //############################################################################ -// need to revisit array equqality +// need to revisit array equality object Test { def testEquals1 { diff --git a/test/files/run/finally.scala b/test/files/run/finally.scala index 2c01edaaef..b66354ca03 100644 --- a/test/files/run/finally.scala +++ b/test/files/run/finally.scala @@ -93,7 +93,7 @@ object Test extends App { } } - // nested finallies with return value + // nested finally blocks with return value def nestedFinalies: Int = try { try { diff --git a/test/files/run/iq.scala b/test/files/run/iq.scala index 1eb1d40e37..0ccf67a2e9 100644 --- a/test/files/run/iq.scala +++ b/test/files/run/iq.scala @@ -69,7 +69,7 @@ object iq { val (_, q7) = q6.dequeue //val q8 = q7 + 10 + 11 //deprecated val q8 = q7.enqueue(10).enqueue(11) - /* Test dequeu + /* Test dequeue * Expected: q8: Queue(2,3,4,5,6,7,8,9,10,11) */ Console.println("q8: " + q8) diff --git a/test/files/run/names-defaults.scala b/test/files/run/names-defaults.scala index b7ed490cbc..c364425ec9 100644 --- a/test/files/run/names-defaults.scala +++ b/test/files/run/names-defaults.scala @@ -86,7 +86,7 @@ object Test extends App { def f(a: Object) = "first" val f: String => String = a => "second" } - println(t5.f(new Sub1())) // firsst + println(t5.f(new Sub1())) // first println(t5.f("dfklj")) // second object t6 { diff --git a/test/files/run/nullable-lazyvals.scala b/test/files/run/nullable-lazyvals.scala index c201e74e75..be5d82f3a7 100644 --- a/test/files/run/nullable-lazyvals.scala +++ b/test/files/run/nullable-lazyvals.scala @@ -24,7 +24,7 @@ object Test extends App { // test that try-finally does not generated a liftedTry // helper. This would already fail the first part of the test, - // but this check will help diganose it (if the single access to a + // but this check will help diagnose it (if the single access to a // private field does not happen directly in the lazy val, it won't // be nulled). for (f <- foo.getClass.getDeclaredMethods) { diff --git a/test/files/run/t6240-universe-code-gen.scala b/test/files/run/t6240-universe-code-gen.scala index 9f7061ee1b..60e1f76b54 100644 --- a/test/files/run/t6240-universe-code-gen.scala +++ b/test/files/run/t6240-universe-code-gen.scala @@ -13,8 +13,8 @@ object Test extends App { (sym.isMethod && sym.asMethod.isLazy) || sym.isModule ) - val forcables = tp.members.sorted.filter(isLazyAccessorOrObject) - forcables.map { + val forceables = tp.members.sorted.filter(isLazyAccessorOrObject) + forceables.map { sym => val path = s"$prefix.${sym.name}" " " + ( diff --git a/test/files/run/t8601-closure-elim.scala b/test/files/run/t8601-closure-elim.scala index 2c5b03af77..ebeb16e0c7 100644 --- a/test/files/run/t8601-closure-elim.scala +++ b/test/files/run/t8601-closure-elim.scala @@ -11,7 +11,7 @@ object Test extends BytecodeTest { val classNode = loadClassNode("Foo") val methodNode = getMethod(classNode, "b") val ops = methodNode.instructions.iterator.asScala.map(_.getOpcode).toList - assert(!ops.contains(asm.Opcodes.NEW), ops)// should be allocation free if the closure is eliminiated + assert(!ops.contains(asm.Opcodes.NEW), ops)// should be allocation free if the closure is eliminated } test("b") } diff --git a/test/files/run/t8708_b/Test_2.scala b/test/files/run/t8708_b/Test_2.scala index c978490609..fae3c677ec 100644 --- a/test/files/run/t8708_b/Test_2.scala +++ b/test/files/run/t8708_b/Test_2.scala @@ -13,7 +13,7 @@ object Test extends DirectTest { val c = g.rootMirror.getRequiredClass("p.C") println(c.info.decls) val t = c.info.member(g.newTypeName("T")) - // this test ensrues that the dummy class symbol is not entered in the + // this test ensures that the dummy class symbol is not entered in the // scope of trait T during unpickling. println(t.info.decls) }) diff --git a/test/files/specialized/constant_lambda.scala b/test/files/specialized/constant_lambda.scala index bb9a97403e..7c5358ce10 100644 --- a/test/files/specialized/constant_lambda.scala +++ b/test/files/specialized/constant_lambda.scala @@ -1,4 +1,4 @@ -// during development of late delmabdafying there was a problem where +// during development of late delambdafying there was a problem where // specialization would undo some of the work done in uncurry if the body of the // lambda had a constant type. That would result in a compiler crash as // when the delambdafy phase got a tree shape it didn't understand diff --git a/test/scaladoc/run/groups.scala b/test/scaladoc/run/groups.scala index c9e4a8679b..ad5cca89b8 100644 --- a/test/scaladoc/run/groups.scala +++ b/test/scaladoc/run/groups.scala @@ -38,7 +38,7 @@ object Test extends ScaladocModelTest { * @groupdesc C Group C is introduced by B */ trait B { - /** baz descriptopn + /** baz description * @group C */ def baz = 3 } -- cgit v1.2.3 From ada9fa0b91ddb64f6d15f7616b455247cbcf2243 Mon Sep 17 00:00:00 2001 From: Janek Bogucki Date: Mon, 22 Jun 2015 23:32:33 +0100 Subject: Fix 25 typos (g-i) --- src/compiler/scala/reflect/quasiquotes/Reifiers.scala | 2 +- src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala | 2 +- src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala | 2 +- src/compiler/scala/tools/nsc/typechecker/Implicits.scala | 2 +- src/compiler/scala/tools/nsc/typechecker/Infer.scala | 2 +- src/compiler/scala/tools/nsc/util/DocStrings.scala | 2 +- src/library/scala/collection/generic/Sorted.scala | 2 +- src/reflect/scala/reflect/api/FlagSets.scala | 2 +- src/reflect/scala/reflect/api/Printers.scala | 2 +- src/reflect/scala/reflect/internal/util/StripMarginInterpolator.scala | 2 +- test/files/jvm/javaReflection/Test.scala | 2 +- test/files/jvm/protectedacc.scala | 2 +- test/files/neg/t8431.scala | 2 +- test/files/pos/t8947/Macro_1.scala | 2 +- test/files/run/blame_eye_triple_eee-double.check | 2 +- test/files/run/blame_eye_triple_eee-double.scala | 2 +- test/files/run/blame_eye_triple_eee-float.check | 2 +- test/files/run/blame_eye_triple_eee-float.scala | 2 +- test/files/run/names-defaults.scala | 2 +- test/files/run/t0631.scala | 2 +- test/files/run/t2526.scala | 2 +- test/files/run/t7817-tree-gen.scala | 2 +- test/files/scalacheck/quasiquotes/RuntimeErrorProps.scala | 2 +- test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala | 2 +- test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOpts.scala | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) (limited to 'test/files/pos') diff --git a/src/compiler/scala/reflect/quasiquotes/Reifiers.scala b/src/compiler/scala/reflect/quasiquotes/Reifiers.scala index e753c9787a..8462debe21 100644 --- a/src/compiler/scala/reflect/quasiquotes/Reifiers.scala +++ b/src/compiler/scala/reflect/quasiquotes/Reifiers.scala @@ -322,7 +322,7 @@ trait Reifiers { self: Quasiquotes => * in the domain of the fill function; * * 2. fold the groups into a sequence of lists added together with ++ using - * fill reification for holeMap and fallback reification for non-holeMap. + * fill reification for holeMap and fallback reification for non-holeMap. * * Example: * diff --git a/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala b/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala index 1b6631e7a4..8911a3a28c 100644 --- a/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala +++ b/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala @@ -378,7 +378,7 @@ abstract class DeadCodeElimination extends SubComponent { } else { i match { case NEW(REFERENCE(sym)) => - log(s"Eliminated instantation of $sym inside $m") + log(s"Eliminated instantiation of $sym inside $m") case STORE_LOCAL(l) if clobbers contains ((bb, idx)) => // if an unused instruction was a clobber of a used store to a reference or array type // then we'll replace it with the store of a null to make sure the reference is diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala index ea46116976..438a71061e 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala @@ -599,7 +599,7 @@ abstract class ICodeReader extends ClassfileParser { } case JVM.invokedynamic => // TODO, this is just a place holder. A real implementation must parse the class constant entry - debuglog("Found JVM invokedynamic instructionm, inserting place holder ICode INVOKE_DYNAMIC.") + debuglog("Found JVM invokedynamic instruction, inserting place holder ICode INVOKE_DYNAMIC.") containsInvokeDynamic = true val poolEntry = in.nextChar.toInt in.skip(2) diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala index 5ecca5abce..80e06eb8fa 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala @@ -985,7 +985,7 @@ trait Implicits { if (implicitInfoss.forall(_.isEmpty)) SearchFailure else new ImplicitComputation(implicitInfoss, isLocalToCallsite) findBest() - /** Produce an implicict info map, i.e. a map from the class symbols C of all parts of this type to + /** Produce an implicit info map, i.e. a map from the class symbols C of all parts of this type to * the implicit infos in the companion objects of these class symbols C. * The parts of a type is the smallest set of types that contains * - the type itself diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala index f9582a54ff..ea0a9bb243 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala @@ -934,7 +934,7 @@ trait Infer extends Checkable { def infer_s = map3(tparams, tvars, targs)((tparam, tvar, targ) => s"$tparam=$tvar/$targ") mkString "," printTyping(tree, s"infer expr instance from pt=$pt, $infer_s") - // SI-7899 infering by-name types is unsound. The correct behaviour is conditional because the hole is + // SI-7899 inferring by-name types is unsound. The correct behaviour is conditional because the hole is // exploited in Scalaz (Free.scala), as seen in: run/t7899-regression. def dropByNameIfStrict(tp: Type): Type = if (settings.inferByName) tp else dropByName(tp) def targsStrict = if (targs eq null) null else targs mapConserve dropByNameIfStrict diff --git a/src/compiler/scala/tools/nsc/util/DocStrings.scala b/src/compiler/scala/tools/nsc/util/DocStrings.scala index 352816803f..4ff7067a21 100755 --- a/src/compiler/scala/tools/nsc/util/DocStrings.scala +++ b/src/compiler/scala/tools/nsc/util/DocStrings.scala @@ -184,7 +184,7 @@ object DocStrings { extractSectionTag(str, section) -> section } - /** Extract the section tag, treating the section tag as an indentifier */ + /** Extract the section tag, treating the section tag as an identifier */ def extractSectionTag(str: String, section: (Int, Int)): String = str.substring(section._1, skipTag(str, section._1)) diff --git a/src/library/scala/collection/generic/Sorted.scala b/src/library/scala/collection/generic/Sorted.scala index a0b0e1318b..b2e63daaba 100644 --- a/src/library/scala/collection/generic/Sorted.scala +++ b/src/library/scala/collection/generic/Sorted.scala @@ -36,7 +36,7 @@ trait Sorted[K, +This <: Sorted[K, This]] { /** Creates a ranged projection of this collection. Any mutations in the * ranged projection will update this collection and vice versa. * - * Note: keys are not garuanteed to be consistent between this collection + * Note: keys are not guaranteed to be consistent between this collection * and the projection. This is the case for buffers where indexing is * relative to the projection. * diff --git a/src/reflect/scala/reflect/api/FlagSets.scala b/src/reflect/scala/reflect/api/FlagSets.scala index bcad84a3f0..d3294dad9b 100644 --- a/src/reflect/scala/reflect/api/FlagSets.scala +++ b/src/reflect/scala/reflect/api/FlagSets.scala @@ -48,7 +48,7 @@ import scala.language.implicitConversions * ''Of Note:'' This part of the Reflection API is being considered as a candidate for redesign. It is * quite possible that in future releases of the reflection API, flag sets could be replaced with something else. * - * For more details about `FlagSet`s and other aspects of Scala reflection, see the + * For more details about `FlagSet`s and other aspects of Scala reflection, see the * [[http://docs.scala-lang.org/overviews/reflection/overview.html Reflection Guide]] * * @group ReflectionAPI diff --git a/src/reflect/scala/reflect/api/Printers.scala b/src/reflect/scala/reflect/api/Printers.scala index 01b9759c70..c0abc5120c 100644 --- a/src/reflect/scala/reflect/api/Printers.scala +++ b/src/reflect/scala/reflect/api/Printers.scala @@ -130,7 +130,7 @@ import java.io.{ PrintWriter, StringWriter } * TermName("y")#2541#GET)) * }}} * - * For more details about `Printer`s and other aspects of Scala reflection, see the + * For more details about `Printer`s and other aspects of Scala reflection, see the * [[http://docs.scala-lang.org/overviews/reflection/overview.html Reflection Guide]] * * @group ReflectionAPI diff --git a/src/reflect/scala/reflect/internal/util/StripMarginInterpolator.scala b/src/reflect/scala/reflect/internal/util/StripMarginInterpolator.scala index e622e78d57..35858cdc78 100644 --- a/src/reflect/scala/reflect/internal/util/StripMarginInterpolator.scala +++ b/src/reflect/scala/reflect/internal/util/StripMarginInterpolator.scala @@ -13,7 +13,7 @@ trait StripMarginInterpolator { * The margin of each line is defined by whitespace leading up to a '|' character. * This margin is stripped '''before''' the arguments are interpolated into to string. * - * String escape sequences are '''not''' processed; this interpolater is designed to + * String escape sequences are '''not''' processed; this interpolator is designed to * be used with triple quoted Strings. * * {{{ diff --git a/test/files/jvm/javaReflection/Test.scala b/test/files/jvm/javaReflection/Test.scala index ae5a36eeb2..199399fec8 100644 --- a/test/files/jvm/javaReflection/Test.scala +++ b/test/files/jvm/javaReflection/Test.scala @@ -31,7 +31,7 @@ getSimpleName / getCanonicalName / isAnonymousClass / isLocalClass / isSynthetic These should be avoided, they yield unexpected results: - isAnonymousClass is always false. Scala-defined classes are never anonymous for Java - reflection. Java reflection insepects the class name to decide whether a class is + reflection. Java reflection inspects the class name to decide whether a class is anonymous, based on the name spec referenced above. Also, the implementation of "isAnonymousClass" calls "getSimpleName", which may throw. diff --git a/test/files/jvm/protectedacc.scala b/test/files/jvm/protectedacc.scala index 89e70b90d8..43d218fa89 100644 --- a/test/files/jvm/protectedacc.scala +++ b/test/files/jvm/protectedacc.scala @@ -74,7 +74,7 @@ package p { package b { import a._; - /** Test interraction with Scala inherited methods and currying. */ + /** Test interaction with Scala inherited methods and currying. */ class B extends A { class C { def m = { diff --git a/test/files/neg/t8431.scala b/test/files/neg/t8431.scala index 032a1f394d..bc45bb62ae 100644 --- a/test/files/neg/t8431.scala +++ b/test/files/neg/t8431.scala @@ -48,7 +48,7 @@ class TestExplicit { {val c1 = convert2(s); c1.combined} } -// These ones work before and after; infering G=Null doesn't need to contribute an undetermined type param. +// These ones work before and after; inferring G=Null doesn't need to contribute an undetermined type param. class Test3 { import C.{cbf, convert1, convert2} val s: Invariant[Null] = ??? diff --git a/test/files/pos/t8947/Macro_1.scala b/test/files/pos/t8947/Macro_1.scala index 4a5de3decb..ace389f339 100644 --- a/test/files/pos/t8947/Macro_1.scala +++ b/test/files/pos/t8947/Macro_1.scala @@ -35,7 +35,7 @@ object X { // symtab.EmptyTree.setAttachments(symtab.NoPosition) // } // - // To make this visible to the macro implementaiton, it will need to be compiled in an earlier stage, + // To make this visible to the macro implementation, it will need to be compiled in an earlier stage, // e.g a separate SBT sub-project. } diff --git a/test/files/run/blame_eye_triple_eee-double.check b/test/files/run/blame_eye_triple_eee-double.check index 5e46d91a8f..53eac99ecd 100644 --- a/test/files/run/blame_eye_triple_eee-double.check +++ b/test/files/run/blame_eye_triple_eee-double.check @@ -6,4 +6,4 @@ if (x != x) is good if (NaN != x) is good x matching was good NaN matching was good -loop with NaN was goood +loop with NaN was good diff --git a/test/files/run/blame_eye_triple_eee-double.scala b/test/files/run/blame_eye_triple_eee-double.scala index 1640aead40..4dcbfe7a7a 100644 --- a/test/files/run/blame_eye_triple_eee-double.scala +++ b/test/files/run/blame_eye_triple_eee-double.scala @@ -56,6 +56,6 @@ object Test extends App { else z = NaN i += 1 } - if (z.isNaN && i == 10) println("loop with NaN was goood") + if (z.isNaN && i == 10) println("loop with NaN was good") else println("loop with NaN was broken") } diff --git a/test/files/run/blame_eye_triple_eee-float.check b/test/files/run/blame_eye_triple_eee-float.check index 5e46d91a8f..53eac99ecd 100644 --- a/test/files/run/blame_eye_triple_eee-float.check +++ b/test/files/run/blame_eye_triple_eee-float.check @@ -6,4 +6,4 @@ if (x != x) is good if (NaN != x) is good x matching was good NaN matching was good -loop with NaN was goood +loop with NaN was good diff --git a/test/files/run/blame_eye_triple_eee-float.scala b/test/files/run/blame_eye_triple_eee-float.scala index 4deb9f3d60..bcc6b195d5 100644 --- a/test/files/run/blame_eye_triple_eee-float.scala +++ b/test/files/run/blame_eye_triple_eee-float.scala @@ -56,6 +56,6 @@ object Test extends App { else z = NaN i += 1 } - if (z.isNaN && i == 10) println("loop with NaN was goood") + if (z.isNaN && i == 10) println("loop with NaN was good") else println("loop with NaN was broken") } diff --git a/test/files/run/names-defaults.scala b/test/files/run/names-defaults.scala index c364425ec9..7fb4a04546 100644 --- a/test/files/run/names-defaults.scala +++ b/test/files/run/names-defaults.scala @@ -239,7 +239,7 @@ object Test extends App { // result type of default getters: parameter type, except if this one mentions any type // parameter, in which case the result type is inferred. examples: - // result type of default getter is "String => String". if it were infered, the compiler + // result type of default getter is "String => String". if it were inferred, the compiler // would put "Nothing => Nothing", which is useless def transform(s: String, f: String => String = identity _) = f(s) println(transform("my text")) diff --git a/test/files/run/t0631.scala b/test/files/run/t0631.scala index c401ed31cb..8d672574ec 100644 --- a/test/files/run/t0631.scala +++ b/test/files/run/t0631.scala @@ -11,6 +11,6 @@ object Test extends App { case class Bar(x: Foo) val b = new Bar(new Foo) - // this should not call Foo.equals, but simply compare object identiy of b + // this should not call Foo.equals, but simply compare object identity of b println(b == b) } diff --git a/test/files/run/t2526.scala b/test/files/run/t2526.scala index 53f3059135..9f3c48ec61 100644 --- a/test/files/run/t2526.scala +++ b/test/files/run/t2526.scala @@ -38,7 +38,7 @@ object Test { /* * Checks foreach of `actual` goes over all the elements in `expected` - * We duplicate the method above because there is no common inteface between Traversable and + * We duplicate the method above because there is no common interface between Traversable and * Iterator and we want to avoid converting between collections to ensure that we test what * we mean to test. */ diff --git a/test/files/run/t7817-tree-gen.scala b/test/files/run/t7817-tree-gen.scala index a8317fda6e..094c0d6289 100644 --- a/test/files/run/t7817-tree-gen.scala +++ b/test/files/run/t7817-tree-gen.scala @@ -1,6 +1,6 @@ import scala.tools.partest._ -// Testing that `mkAttributedRef` doesn't incude the package object test.`package`, +// Testing that `mkAttributedRef` doesn't include the package object test.`package`, // under joint and separate compilation. package testSep { class C { object O } } diff --git a/test/files/scalacheck/quasiquotes/RuntimeErrorProps.scala b/test/files/scalacheck/quasiquotes/RuntimeErrorProps.scala index a3b6137f68..40fb42d63c 100644 --- a/test/files/scalacheck/quasiquotes/RuntimeErrorProps.scala +++ b/test/files/scalacheck/quasiquotes/RuntimeErrorProps.scala @@ -68,7 +68,7 @@ object RuntimeErrorProps extends QuasiquoteProperties("errors") { q"for(..$enums) 0" } - property("for inlalid enum") = testFails { + property("for invalid enum") = testFails { val enums = q"foo" :: Nil q"for(..$enums) 0" } diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala index b8c5f85c49..0309bb97cc 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala @@ -503,7 +503,7 @@ class InlinerTest extends ClearAfterClass { |class C extends T """.stripMargin val List(c, t, tClass) = compile(code) - // the static implementaiton method is inlined into the mixin, so there's no invocation in the mixin + // the static implementation method is inlined into the mixin, so there's no invocation in the mixin assertNoInvoke(getSingleMethod(c, "f")) } diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOpts.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOpts.scala index 1ce1b88ff2..5ef2458c0a 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOpts.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOpts.scala @@ -56,7 +56,7 @@ class MethodLevelOpts extends ClearAfterClass { } @Test - def inlineReturnInCachtNotTry(): Unit = { + def inlineReturnInCatchNotTry(): Unit = { val code = "def f: Int = return { try 1 catch { case _: Throwable => 2 } }" // cannot inline the IRETURN into the try block (because RETURN may throw IllegalMonitorState) val m = singleMethod(methodOptCompiler)(code) -- cgit v1.2.3