Skip to content

Commit 2b4e765

Browse files
committed
Typos corrected.
More verbose assertions. Unnecessary semicolons removed.
1 parent 18cf5d2 commit 2b4e765

14 files changed

+17
-17
lines changed

src/dotty/tools/dotc/core/Constants.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ object Constants {
8585

8686
def booleanValue: Boolean =
8787
if (tag == BooleanTag) value.asInstanceOf[Boolean]
88-
else throw new Error("value " + value + " is not a boolean");
88+
else throw new Error("value " + value + " is not a boolean")
8989

9090
def byteValue: Byte = tag match {
9191
case ByteTag => value.asInstanceOf[Byte]

src/dotty/tools/dotc/core/Contexts.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ object Contexts {
411411

412412
/** Allocate and return next free superclass id */
413413
private[core] def nextSuperId: Int = {
414-
lastSuperId += 1;
414+
lastSuperId += 1
415415
if (lastSuperId >= classOfId.length) {
416416
val tmp = new Array[ClassSymbol](classOfId.length * 2)
417417
classOfId.copyToArray(tmp)

src/dotty/tools/dotc/core/Names.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ object Names {
251251
private def equals(index: Int, cs: Array[Char], offset: Int, len: Int): Boolean = {
252252
var i = 0
253253
while ((i < len) && (chrs(index + i) == cs(offset + i)))
254-
i += 1;
254+
i += 1
255255
i == len
256256
}
257257

src/dotty/tools/dotc/core/Scopes.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ object Scopes {
231231
if (e1 == e)
232232
hashTable(index) = e.tail
233233
else {
234-
while (e1.tail != e) e1 = e1.tail;
234+
while (e1.tail != e) e1 = e1.tail
235235
e1.tail = e.tail
236236
}
237237
}
@@ -243,7 +243,7 @@ object Scopes {
243243
final def unlink(sym: Symbol)(implicit ctx: Context): Unit = {
244244
var e = lookupEntry(sym.name)
245245
while (e ne null) {
246-
if (e.sym == sym) unlink(e);
246+
if (e.sym == sym) unlink(e)
247247
e = lookupNextEntry(e)
248248
}
249249
}

src/dotty/tools/dotc/core/SymbolLoaders.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class SymbolLoaders {
120120
*/
121121
def binaryOnly(owner: Symbol, name: String)(implicit ctx: Context): Boolean =
122122
name == "package" &&
123-
(owner.fullName == "scala" || owner.fullName == "scala.reflect")
123+
(owner.fullName.toString == "scala" || owner.fullName.toString == "scala.reflect")
124124

125125
/** Initialize toplevel class and module symbols in `owner` from class path representation `classRep`
126126
*/

src/dotty/tools/dotc/core/TyperState.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class TyperState(val reporter: Reporter) extends DotClass with Showable {
3131
}
3232

3333
/** A fresh typer state with the same constraint as this one.
34-
* @param isCommittable The constraint can be committed to an exclosing context.
34+
* @param isCommittable The constraint can be committed to an enclosing context.
3535
*/
3636
def fresh(isCommittable: Boolean): TyperState = this
3737

src/dotty/tools/dotc/core/pickling/PickleBuffer.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class PickleBuffer(data: Array[Byte], from: Int, to: Int) {
110110
do {
111111
b = readByte()
112112
x = (x << 7) + (b & 0x7f)
113-
} while ((b & 0x80) != 0L);
113+
} while ((b & 0x80) != 0L)
114114
x
115115
}
116116

@@ -158,7 +158,7 @@ class PickleBuffer(data: Array[Byte], from: Int, to: Int) {
158158
* @return ...
159159
*/
160160
def until[T](end: Int, op: () => T): List[T] =
161-
if (readIndex == end) List() else op() :: until(end, op);
161+
if (readIndex == end) List() else op() :: until(end, op)
162162

163163
/** Perform operation <code>op</code> the number of
164164
* times specified. Concatenate the results into a list.

src/dotty/tools/dotc/printing/PlainPrinter.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ class PlainPrinter(_ctx: Context) extends Printer {
2323
ctx.toTextRecursions -= 1
2424
}
2525
else {
26-
recursionLimitExceeeded()
26+
recursionLimitExceeded()
2727
"..."
2828
}
2929

30-
protected def recursionLimitExceeeded() = {
30+
protected def recursionLimitExceeded() = {
3131
ctx.warning("Exceeded recursion depth attempting to print type.")
3232
(new Throwable).printStackTrace
3333
}

src/dotty/tools/dotc/printing/RefinedPrinter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import scala.annotation.switch
1313

1414
class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
1515

16-
override protected def recursionLimitExceeeded() = {}
16+
override protected def recursionLimitExceeded() = {}
1717

1818
protected val PrintableFlags = (ModifierFlags | Label | Module).toCommonFlags
1919

src/dotty/tools/dotc/util/HashSet.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package dotty.tools.dotc.util
22

3-
/** A hash set that allows some priviliged protected access to its internals
3+
/** A hash set that allows some privileged protected access to its internals
44
*/
55
class HashSet[T >: Null <: AnyRef](initialCapacity: Int, loadFactor: Float = 0.25f) extends Set[T] with scala.collection.generic.Clearable {
66
private var used: Int = _

src/dotty/tools/dotc/util/NameTransformer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ object NameTransformer {
9999
def decode(name0: String): String = {
100100
//System.out.println("decode: " + name);//DEBUG
101101
val name = if (name0.endsWith("<init>")) name0.substring(0, name0.length() - ("<init>").length()) + "this"
102-
else name0;
102+
else name0
103103
var buf: StringBuilder = null
104104
val len = name.length()
105105
var i = 0

src/dotty/tools/dotc/util/Positions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ object Positions {
1717

1818
/** A position indicates a range between a start offset and an end offset.
1919
* Positions can be synthetic or source-derived. A source-derived position
20-
* has in addition a pointlies somewhere between start and end. The point
20+
* has in addition a point lies somewhere between start and end. The point
2121
* is roughly where the ^ would go if an error was diagnosed at that position.
2222
* All quantities are encoded opaquely in a Long.
2323
*/

src/dotty/tools/dotc/util/ShowPickled.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ object ShowPickled {
239239
case SYMANNOT =>
240240
printSymbolRef(); printTypeRef(); buf.until(end, printAnnotArgRef)
241241
case ANNOTATEDtpe =>
242-
printTypeRef(); buf.until(end, printAnnotInfoRef);
242+
printTypeRef(); buf.until(end, printAnnotInfoRef)
243243
case ANNOTINFO =>
244244
printTypeRef(); buf.until(end, printAnnotArgRef)
245245
case ANNOTARGARRAY =>

tests/neg/privates.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
trait T {
2-
private def foo = 0;
2+
private def foo = 0
33
private[this] def bar = 0
44

55
}

0 commit comments

Comments
 (0)