Skip to content

Commit a278df9

Browse files
committed
Spelling
1 parent 8adc5db commit a278df9

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

compiler/src/dotty/tools/dotc/typer/Applications.scala

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@ trait Applications extends Compatibility {
11711171
* type by means of a type ascription, as long as the widened type is
11721172
* still compatible with the expected type.
11731173
* The underlying type is the intersection of all class parents of the
1174-
* orginal type.
1174+
* original type.
11751175
*/
11761176
def widenEnumCase(tree: Tree, pt: Type)(using Context): Tree =
11771177
val sym = tree.symbol
@@ -1383,7 +1383,7 @@ trait Applications extends Compatibility {
13831383

13841384
// named pattern
13851385
// TODO: Errors report the wrong position
1386-
// TODO: Use propper error reporting
1386+
// TODO: Use proper error reporting
13871387
// TODO: Maybe the 'reorder' method above can be reused, or be template
13881388
if (bunchedArgs != Nil && argTypes != Nil) {
13891389

@@ -1401,28 +1401,29 @@ trait Applications extends Compatibility {
14011401
.map(_.group(1))
14021402
.zipWithIndex
14031403
.toMap
1404-
// TODO: The test should accutally be: is unapplyFn generated by the compiler because we have a case class?
1404+
// TODO: The test should actually be: is unapplyFn generated by the compiler because we have a case class?
14051405
else if unapplyFn.tpe.widen.paramInfoss.head.head.typeSymbol.is(CaseClass) then
14061406
unapplyFn.tpe.widen.paramInfoss.head.head.fields.map(_.name.toString).zipWithIndex.toMap
14071407
else
14081408
// TODO: Report member
14091409
report.error("Doesn't support named patterns")
14101410
Map.empty
1411+
// TODO: Is is necessary to convert names to strings?
14111412
.compose{ case name: Name => name.show }
14121413

14131414
val namedArgs = bunchedArgs
14141415
.flatMap {
14151416
case pattern @ NamedArg(positionOfName(_), _) => Seq(pattern)
1416-
case pattern @ NamedArg(unkownName, _) =>
1417-
report.error(s"'${unkownName.show}' is unknown", pattern)
1417+
case pattern @ NamedArg(unknownName, _) =>
1418+
report.error(s"'${unknownName.show}' is unknown", pattern)
14181419
Seq.empty
14191420
case unnamedArgument =>
14201421
report.error("Only named arguments allowed here", unnamedArgument)
14211422
Seq.empty
14221423
}
14231424
.groupMapReduce(arg => positionOfName(arg.name))(identity)(
14241425
(first, second) => {
1425-
// TODO: Document design decission here
1426+
// TODO: Document design decision here
14261427
report.error(s"'${second.name}' was already used before", second);
14271428
first
14281429
})

0 commit comments

Comments
 (0)