Skip to content

Commit 6db887d

Browse files
committed
Add empty secondary ctors to worksheet messages
They are used when deserializing from JSON.
1 parent 07e8723 commit 6db887d

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

language-server/src/dotty/tools/languageserver/worksheet/WorksheetMessages.scala

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,25 @@ package dotty.tools.languageserver.worksheet
33
import java.net.URI
44

55
/** The parameter for the `worksheet/exec` request. */
6-
case class WorksheetExecParams(uri: URI)
6+
case class WorksheetExecParams(uri: URI) {
7+
// Used for deserialization
8+
// see https://github.com/lampepfl/dotty/pull/5102#discussion_r222055355
9+
def this() = this(null)
10+
}
711

812
/** The response to a `worksheet/exec` request. */
9-
case class WorksheetExecResponse(success: Boolean)
13+
case class WorksheetExecResponse(success: Boolean) {
14+
// Used for deserialization
15+
// see https://github.com/lampepfl/dotty/pull/5102#discussion_r222055355
16+
def this() = this(false)
17+
}
1018

1119
/**
1220
* A notification that tells the client that a line of a worksheet
1321
* produced the specified output.
1422
*/
15-
case class WorksheetExecOutput(uri: URI, line: Int, content: String)
23+
case class WorksheetExecOutput(uri: URI, line: Int, content: String) {
24+
// Used for deserialization
25+
// see https://github.com/lampepfl/dotty/pull/5102#discussion_r222055355
26+
def this() = this(null, 0, null)
27+
}

0 commit comments

Comments
 (0)