diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-10-14 08:37:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-14 08:37:03 +0200 |
commit | 8bfaadaae141e83db7f515b042fcee26ed0e54fd (patch) | |
tree | 26e9773c3c9da3a384895680941399aa1e1e311a /src | |
parent | 6095454e05ba4446fca446c5b53e80180d69b127 (diff) | |
parent | ddbbb8350ec210d63b552ee133cf872ff95eaea2 (diff) | |
download | dotty-8bfaadaae141e83db7f515b042fcee26ed0e54fd.tar.gz dotty-8bfaadaae141e83db7f515b042fcee26ed0e54fd.tar.bz2 dotty-8bfaadaae141e83db7f515b042fcee26ed0e54fd.zip |
Merge pull request #1565 from Blaisorblade/warnings
Small fixes to some warnings/comment typos
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/ast/Trees.scala | 4 | ||||
-rw-r--r-- | src/dotty/tools/dotc/transform/TreeTransform.scala | 4 | ||||
-rw-r--r-- | src/dotty/tools/dotc/typer/TypeAssigner.scala | 2 | ||||
-rw-r--r-- | src/strawman/collections/CollectionStrawMan4.scala | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/dotty/tools/dotc/ast/Trees.scala b/src/dotty/tools/dotc/ast/Trees.scala index 1fb3557db..2c02e7d1e 100644 --- a/src/dotty/tools/dotc/ast/Trees.scala +++ b/src/dotty/tools/dotc/ast/Trees.scala @@ -48,7 +48,7 @@ object Trees { * the existing tree transparently, assigning its `tpe` field, * provided it was `null` before. * - It is impossible to embed untyped trees in typed ones. - * - Typed trees can be embedded untyped ones provided they are rooted + * - Typed trees can be embedded in untyped ones provided they are rooted * in a TypedSplice node. * - Type checking an untyped tree should remove all embedded `TypedSplice` * nodes. @@ -853,7 +853,7 @@ object Trees { val cpy: TreeCopier - /** A class for copying trees. The copy methods avid creating a new tree + /** A class for copying trees. The copy methods avoid creating a new tree * If all arguments stay the same. * * Note: Some of the copy methods take a context. diff --git a/src/dotty/tools/dotc/transform/TreeTransform.scala b/src/dotty/tools/dotc/transform/TreeTransform.scala index 52a3ad94e..45fa3d607 100644 --- a/src/dotty/tools/dotc/transform/TreeTransform.scala +++ b/src/dotty/tools/dotc/transform/TreeTransform.scala @@ -42,7 +42,7 @@ object TreeTransforms { * the general dispatch overhead as opposed to the concrete work done in transformations. So that leaves us with * 0.2sec, or roughly 600M processor cycles. * - * Now, to the amount of work that needs to be done. The codebase produces of about 250'000 trees after typechecking. + * Now, to the amount of work that needs to be done. The codebase produces an average of about 250'000 trees after typechecking. * Transformations are likely to make this bigger so let's assume 300K trees on average. We estimate to have about 100 * micro-transformations. Let's say 5 transformation groups of 20 micro-transformations each. (by comparison, * scalac has in excess of 20 phases, and most phases do multiple transformations). There are then 30M visits @@ -208,7 +208,7 @@ object TreeTransforms { if (cls.getDeclaredMethods.exists(_.getName == name)) cls != classOf[TreeTransform] else hasRedefinedMethod(cls.getSuperclass, name) - /** Create an index array `next` of size one larger than teh size of `transforms` such that + /** Create an index array `next` of size one larger than the size of `transforms` such that * for each index i, `next(i)` is the smallest index j such that * * i <= j diff --git a/src/dotty/tools/dotc/typer/TypeAssigner.scala b/src/dotty/tools/dotc/typer/TypeAssigner.scala index 696ecfedb..861847b11 100644 --- a/src/dotty/tools/dotc/typer/TypeAssigner.scala +++ b/src/dotty/tools/dotc/typer/TypeAssigner.scala @@ -416,7 +416,7 @@ trait TypeAssigner { def assignType(tree: untpd.SeqLiteral, elems: List[Tree], elemtpt: Tree)(implicit ctx: Context) = { val ownType = tree match { - case tree: JavaSeqLiteral => defn.ArrayOf(elemtpt.tpe) + case tree: untpd.JavaSeqLiteral => defn.ArrayOf(elemtpt.tpe) case _ => if (ctx.erasedTypes) defn.SeqType else defn.SeqType.appliedTo(elemtpt.tpe) } tree.withType(ownType) diff --git a/src/strawman/collections/CollectionStrawMan4.scala b/src/strawman/collections/CollectionStrawMan4.scala index fb95ea59f..7e8de2c82 100644 --- a/src/strawman/collections/CollectionStrawMan4.scala +++ b/src/strawman/collections/CollectionStrawMan4.scala @@ -216,7 +216,7 @@ object CollectionStrawMan4 { object ListBuffer extends IterableFactory[ListBuffer] { def fromIterable[B](coll: Iterable[B]): ListBuffer[B] = coll match { - case pd @ View.Partitioned(partition: View.Partition[B]) => + case pd @ View.Partitioned(partition: View.Partition[B] @unchecked) => partition.distribute(new ListBuffer[B]()) new ListBuffer[B] ++= pd.forced.get case _ => @@ -267,7 +267,7 @@ object CollectionStrawMan4 { Array.copy(fst.elems, fst.start, elems, 0, fst.length) Array.copy(snd.elems, snd.start, elems, fst.length, snd.length) new ArrayBuffer(elems, elems.length) - case pd @ View.Partitioned(partition: View.Partition[B]) => + case pd @ View.Partitioned(partition: View.Partition[B] @unchecked) => partition.distribute(new ArrayBuffer[B]()) pd.forced.get.asInstanceOf[ArrayBuffer[B]] case c if c.knownLength >= 0 => |