@@ -1171,7 +1171,7 @@ trait Applications extends Compatibility {
1171
1171
* type by means of a type ascription, as long as the widened type is
1172
1172
* still compatible with the expected type.
1173
1173
* The underlying type is the intersection of all class parents of the
1174
- * orginal type.
1174
+ * original type.
1175
1175
*/
1176
1176
def widenEnumCase (tree : Tree , pt : Type )(using Context ): Tree =
1177
1177
val sym = tree.symbol
@@ -1383,7 +1383,7 @@ trait Applications extends Compatibility {
1383
1383
1384
1384
// named pattern
1385
1385
// TODO: Errors report the wrong position
1386
- // TODO: Use propper error reporting
1386
+ // TODO: Use proper error reporting
1387
1387
// TODO: Maybe the 'reorder' method above can be reused, or be template
1388
1388
if (bunchedArgs != Nil && argTypes != Nil ) {
1389
1389
@@ -1401,28 +1401,29 @@ trait Applications extends Compatibility {
1401
1401
.map(_.group(1 ))
1402
1402
.zipWithIndex
1403
1403
.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?
1405
1405
else if unapplyFn.tpe.widen.paramInfoss.head.head.typeSymbol.is(CaseClass ) then
1406
1406
unapplyFn.tpe.widen.paramInfoss.head.head.fields.map(_.name.toString).zipWithIndex.toMap
1407
1407
else
1408
1408
// TODO: Report member
1409
1409
report.error(" Doesn't support named patterns" )
1410
1410
Map .empty
1411
+ // TODO: Is is necessary to convert names to strings?
1411
1412
.compose{ case name : Name => name.show }
1412
1413
1413
1414
val namedArgs = bunchedArgs
1414
1415
.flatMap {
1415
1416
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)
1418
1419
Seq .empty
1419
1420
case unnamedArgument =>
1420
1421
report.error(" Only named arguments allowed here" , unnamedArgument)
1421
1422
Seq .empty
1422
1423
}
1423
1424
.groupMapReduce(arg => positionOfName(arg.name))(identity)(
1424
1425
(first, second) => {
1425
- // TODO: Document design decission here
1426
+ // TODO: Document design decision here
1426
1427
report.error(s " ' ${second.name}' was already used before " , second);
1427
1428
first
1428
1429
})
0 commit comments