From 6828fe708c0109e26fddc44072681dba2f95c75c Mon Sep 17 00:00:00 2001 From: odersky Date: Fri, 4 Oct 2024 18:49:35 +0200 Subject: [PATCH] Apply suggestions from code review --- compiler/src/dotty/tools/dotc/typer/Typer.scala | 3 ++- docs/_docs/reference/other-new-features/named-tuples.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/typer/Typer.scala b/compiler/src/dotty/tools/dotc/typer/Typer.scala index 57bbc3ee98e8..0ca4f9486f09 100644 --- a/compiler/src/dotty/tools/dotc/typer/Typer.scala +++ b/compiler/src/dotty/tools/dotc/typer/Typer.scala @@ -4755,7 +4755,8 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer } /** Hook for inheriting Typers to do a last-effort adaptation. If a different - * tree is returned, we will readpat that one, ptherwise we issue a type error afterwards. + * tree is returned, we will re-adapt that one, otherwise we issue a type error afterwards. +`` */ protected def healAdapt(tree: Tree, pt: Type)(using Context): Tree = tree diff --git a/docs/_docs/reference/other-new-features/named-tuples.md b/docs/_docs/reference/other-new-features/named-tuples.md index bf1ae4ca7046..3813db4defe1 100644 --- a/docs/_docs/reference/other-new-features/named-tuples.md +++ b/docs/_docs/reference/other-new-features/named-tuples.md @@ -99,7 +99,7 @@ Bob match We allow named patterns not just for named tuples but also for case classes. For instance: ```scala city match - case c @ City(name = "London") => println(p.population) + case c @ City(name = "London") => println(c.population) case City(name = n, zip = 1026, population = pop) => println(pop) ```