Skip to content

Commit 5071386

Browse files
committed
Dependency: #15899
Duplicate of #15899, once merged, frop this
1 parent 6a12242 commit 5071386

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
223223
case tp: PolyType =>
224224
changePrec(GlobalPrec) {
225225
"[" ~ paramsText(tp) ~ "]" ~ lambdaHash(tp) ~
226-
(Str(" => ") provided !tp.resultType.isInstanceOf[MethodType]) ~
226+
(Str(": ") provided !tp.resultType.isInstanceOf[MethodType]) ~
227227
toTextGlobal(tp.resultType)
228228
}
229229
case AnnotatedType(tpe, annot) =>

compiler/test-resources/repl/i5345

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
scala> def x[A, B]: Conversion[A, B] = _ => ???
2-
def x[A, B] => Conversion[A, B]
2+
def x[A, B]: Conversion[A, B]

language-server/test/dotty/tools/languageserver/CompletionTest.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -642,8 +642,8 @@ class CompletionTest {
642642
@Test def completeExtensionMethodWithTypeParameter: Unit = {
643643
code"""object Foo
644644
|extension (foo: Foo.type) def xxxx[A]: Int = 1
645-
|object Main { Foo.xx${m1} }"""
646-
.completion(("xxxx", Method, "[A] => Int"))
645+
|object Main { Foo.xx${m1} }""".withSource
646+
.completion(m1, Set(("xxxx", Method, "[A]: Int")))
647647
}
648648

649649
@Test def completeExtensionMethodWithParameterAndTypeParameter: Unit = {
@@ -761,8 +761,8 @@ class CompletionTest {
761761
|given Bar with {}
762762
|given Baz with {}
763763
|extension [A](using bar: Bar)(a: A)(using baz: Baz) def xxxx[B]: Either[A, B] = Left(a)
764-
|object Main { 123.xx${m1} }"""
765-
.completion(("xxxx", Method, "(using baz: Baz): [B] => Either[Int, B]"))
764+
|object Main { 123.xx${m1} }""".withSource
765+
.completion(m1, Set(("xxxx", Method, "(using baz: Baz)[B]: Either[Int, B]")))
766766
}
767767

768768
@Test def completeExtensionMethodWithTypeBounds: Unit = {
@@ -771,8 +771,8 @@ class CompletionTest {
771771
|given Bar with {}
772772
|extension [A >: Bar](a: A) def xxxx[B <: a.type]: Either[A, B] = Left(a)
773773
|val foo = new Foo {}
774-
|object Main { foo.xx${m1} }"""
775-
.completion(("xxxx", Method, "[B <: (foo : Foo)] => Either[Foo, B]"))
774+
|object Main { foo.xx${m1} }""".withSource
775+
.completion(m1, Set(("xxxx", Method, "[B <: (foo : Foo)]: Either[Foo, B]")))
776776
}
777777

778778
@Test def completeInheritedExtensionMethod: Unit = {

tests/neg-custom-args/fatal-warnings/i9408a.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
-- Error: tests/neg-custom-args/fatal-warnings/i9408a.scala:26:20 ------------------------------------------------------
1010
26 | val length: Int = "qwerty" // error
1111
| ^^^^^^^^
12-
|The conversion (Test5.implicitLength : [A] => String => Int) will not be applied implicitly here in Scala 3 because only implicit methods and instances of Conversion class will continue to work as implicit views.
12+
|The conversion (Test5.implicitLength : [A]: String => Int) will not be applied implicitly here in Scala 3 because only implicit methods and instances of Conversion class will continue to work as implicit views.
1313
-- Error: tests/neg-custom-args/fatal-warnings/i9408a.scala:31:20 ------------------------------------------------------
1414
31 | val length: Int = "qwerty" // error
1515
| ^^^^^^^^
@@ -21,4 +21,4 @@
2121
-- Error: tests/neg-custom-args/fatal-warnings/i9408a.scala:59:2 -------------------------------------------------------
2222
59 | 123.foo // error
2323
| ^^^
24-
|The conversion (Test11.a2foo : [A] => A => Test11.Foo) will not be applied implicitly here in Scala 3 because only implicit methods and instances of Conversion class will continue to work as implicit views.
24+
|The conversion (Test11.a2foo : [A]: A => Test11.Foo) will not be applied implicitly here in Scala 3 because only implicit methods and instances of Conversion class will continue to work as implicit views.

0 commit comments

Comments
 (0)