Skip to content

Commit ba67efa

Browse files
committed
address review
1 parent f1c1195 commit ba67efa

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -475,11 +475,10 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
475475
val manifest = synthesize(fullyDefinedType(arg, "Manifest argument", span), kind, topLevel = true)
476476
if manifest != EmptyTree then
477477
report.deprecationWarning(
478-
i"""Compiler synthesis of Manifest and OptManifest is deprecated,
479-
|and calls should be replaced by `reflect.classTag[$arg]`.
480-
|Alternatively, the using new metaprogramming features of Scala 3
481-
|could help avoid the need for runtime type information, see
482-
|https://docs.scala-lang.org/scala3/reference/metaprogramming.html""", ctx.source.atSpan(span))
478+
i"""Compiler synthesis of Manifest and OptManifest is deprecated, instead
479+
|replace with the type `scala.reflect.ClassTag[$arg]`.
480+
|Alternatively, consider using the new metaprogramming features of Scala 3,
481+
|see https://docs.scala-lang.org/scala3/reference/metaprogramming.html""", ctx.source.atSpan(span))
483482
manifest
484483
case _ =>
485484
EmptyTree
Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
-- Error: tests/neg-custom-args/deprecation/manifest-summoning.scala:1:34 ----------------------------------------------
22
1 |val foo = manifest[List[? <: Int]] // error
33
| ^
4-
| Compiler synthesis of Manifest and OptManifest is deprecated,
5-
| and calls should be replaced by `reflect.classTag[List[? <: Int]]`.
6-
| Alternatively, the using new metaprogramming features of Scala 3
7-
| could help avoid the need for runtime type information, see
8-
| https://docs.scala-lang.org/scala3/reference/metaprogramming.html
4+
| Compiler synthesis of Manifest and OptManifest is deprecated, instead
5+
| replace with the type `scala.reflect.ClassTag[List[? <: Int]]`.
6+
| Alternatively, consider using the new metaprogramming features of Scala 3,
7+
| see https://docs.scala-lang.org/scala3/reference/metaprogramming.html
98
-- Error: tests/neg-custom-args/deprecation/manifest-summoning.scala:2:41 ----------------------------------------------
109
2 |val bar = optManifest[Array[? <: String]] // error
1110
| ^
12-
| Compiler synthesis of Manifest and OptManifest is deprecated,
13-
| and calls should be replaced by `reflect.classTag[Array[? <: String]]`.
14-
| Alternatively, the using new metaprogramming features of Scala 3
15-
| could help avoid the need for runtime type information, see
16-
| https://docs.scala-lang.org/scala3/reference/metaprogramming.html
11+
| Compiler synthesis of Manifest and OptManifest is deprecated, instead
12+
| replace with the type `scala.reflect.ClassTag[Array[? <: String]]`.
13+
| Alternatively, consider using the new metaprogramming features of Scala 3,
14+
| see https://docs.scala-lang.org/scala3/reference/metaprogramming.html

0 commit comments

Comments
 (0)