File tree 2 files changed +4
-4
lines changed
src/dotty/tools/dotc/typer
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -78,9 +78,9 @@ class CrossVersionChecks extends MiniPhase:
78
78
79
79
def maybeWarn (annotee : Symbol , annot : Annotation ) =
80
80
if ! skipWarning then
81
- val msg = annot.argumentConstant (0 ).map(" : " + _.stringValue ).getOrElse(" " )
82
- val since = annot.argumentConstant (1 ).map(" since " + _.stringValue ).getOrElse(" " )
83
- report.deprecationWarning(em " ${annotee.showLocated} is deprecated ${since}${msg }" , pos)
81
+ val message = annot.argumentConstantString (0 ).filter( ! _.isEmpty). map(" : " + _).getOrElse(" " )
82
+ val since = annot.argumentConstantString (1 ).filter( ! _.isEmpty). map(" since " + _).getOrElse(" " )
83
+ report.deprecationWarning(em " ${annotee.showLocated} is deprecated ${since}${message }" , pos)
84
84
85
85
// Also check for deprecation of the companion class for synthetic methods in the companion module
86
86
sym.getAnnotation(defn.DeprecatedAnnot ) match
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ scala> def f(thread: Thread) = thread.stop()
11
11
-- Deprecation Warning: --------------------------------------------------------
12
12
1 | def f(thread: Thread) = thread.stop()
13
13
| ^^^^^^^^^^^
14
- |method stop in class Thread is deprecated since : see corresponding Javadoc for more information.
14
+ |method stop in class Thread is deprecated: see corresponding Javadoc for more information.
15
15
def f(thread: Thread): Unit
16
16
17
17
scala>
You can’t perform that action at this time.
0 commit comments