Skip to content

Commit 5ef8dee

Browse files
committed
Implement review suggestions
1 parent bd5e331 commit 5ef8dee

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

compiler/src/dotty/tools/dotc/core/Types.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -1928,7 +1928,7 @@ object Types extends TypeUtils {
19281928
case res => res
19291929
}
19301930
defn.FunctionNOf(
1931-
mt.paramInfos.mapConserve:
1931+
mt.paramInfos.mapConserve:
19321932
_.translateFromRepeated(toArray = isJava)
19331933
.mapIntoAnnot(defn.IntoParamAnnot, null),
19341934
result1, isContextual)
@@ -1989,7 +1989,7 @@ object Types extends TypeUtils {
19891989
val tp1 = tp.mapIntoAnnot(from, to)
19901990
if annot.symbol == from then
19911991
if to == null then tp1
1992-
else AnnotatedType(tp1, Annotation(to, from.span))
1992+
else AnnotatedType(tp1, Annotation(to, annot.span))
19931993
else self.derivedAnnotatedType(tp1, annot)
19941994
case AppliedType(tycon, arg :: Nil) if tycon.typeSymbol == defn.RepeatedParamClass =>
19951995
val arg1 = arg.mapIntoAnnot(from, to)

docs/_docs/reference/experimental/into-modifier.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Note that a vararg parameter type with into modifiers needs to be put in parenth
6363
## Retrofitting Scala 2 libraries
6464

6565
There is also an annotation `@into` in the `scala.annotation` package that has
66-
has the same effect as an `into` modifier. It is intended to be used for retrofitting Scala 2 library code so that Scala 3 conversions can be applied to arguments without language imports. For instance, the definitions of
66+
the same effect as an `into` modifier. It is intended to be used for retrofitting Scala 2 library code so that Scala 3 conversions can be applied to arguments without language imports. For instance, the definitions of
6767
`++` and `flatMap` in the Scala 2.13 `List` class could be retrofitted as follows.
6868
```scala
6969
def ++ (elems: IterableOnce[A] @into): List[A]

tests/warn/convertible.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ object Test:
3232
c1("abc") // warn, eta expansion does not preserve into
3333

3434
val c2 = if ??? then g else g3
35-
c2("abc") // warn, eta expesnion does not preserve into
35+
c2("abc") // warn, eta expansion does not preserve into
3636

3737
val c3 = if ??? then g3 else g
38-
c3("abc") // warn, eta expesnion does not preserve into
38+
c3("abc") // warn, eta expansion does not preserve into
3939

4040
def h1[X](x: X)(y: X): Unit = ()
4141

4242
def h(x: into Text) =
4343
val y = h1(x)
44-
y("abc") // warn, eta expesnion does not preserve into
44+
y("abc") // warn, eta expansion does not preserve into

0 commit comments

Comments
 (0)