Skip to content

Commit 79ffffd

Browse files
committed
Remove unused comment property of UseCases
1 parent 0c555cc commit 79ffffd

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,8 @@ object Comments {
9090
val codeEnd = skipToEol(raw, codeStart)
9191
val code = raw.substring(codeStart, codeEnd) + " = ???"
9292
val codePos = subPos(codeStart, codeEnd)
93-
val commentStart = skipLineLead(raw, codeEnd + 1) min end
94-
val commentStr = "/** " + raw.substring(commentStart, end) + "*/"
95-
val commentPos = subPos(commentStart, end)
9693

97-
UseCase(Comment(commentPos, commentStr), code, codePos)
94+
UseCase(code, codePos)
9895
}
9996
}
10097

@@ -106,16 +103,16 @@ object Comments {
106103
}
107104
}
108105

109-
abstract case class UseCase(comment: Comment, code: String, codePos: Position) {
106+
abstract case class UseCase(code: String, codePos: Position) {
110107
/** Set by typer */
111108
var tpdCode: tpd.DefDef = _
112109

113110
def untpdCode: untpd.Tree
114111
}
115112

116113
object UseCase {
117-
def apply(comment: Comment, code: String, codePos: Position)(implicit ctx: Context) =
118-
new UseCase(comment, code, codePos) {
114+
def apply(code: String, codePos: Position)(implicit ctx: Context) =
115+
new UseCase(code, codePos) {
119116
val untpdCode = {
120117
val tree = new Parser(new SourceFile("<usecase>", code)).localDef(codePos.start)
121118

0 commit comments

Comments
 (0)