File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
language-server/test/dotty/tools/languageserver Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -25,4 +25,17 @@ class DiagnosticsTest {
25
25
(m1 to m1, """ found: Null
26
26
|required: Boolean""" .stripMargin, Error , Some (TypeMismatchID ))
27
27
)
28
+
29
+ @ Test def diagnosticPureExpression : Unit =
30
+ code """ object Test {
31
+ | ${m1}1 $m2
32
+ |} """ .withSource
33
+ .diagnostics(m1,
34
+ (m1 to m2,
35
+ " a pure expression does nothing in statement position; you may be omitting necessary parentheses" ,
36
+ Warning , Some (PureExpressionInStatementPositionID )))
37
+
38
+ @ Test def diagnosticWorksheetPureExpression : Unit =
39
+ ws """ ${m1}1 """ .withSource
40
+ .diagnostics(m1 /* no "pure expression" warning because this is a worksheet */ )
28
41
}
Original file line number Diff line number Diff line change @@ -894,7 +894,7 @@ object Build {
894
894
).
895
895
settings(
896
896
ideTestsCompilerVersion := (version in `dotty-compiler`).value,
897
- ideTestsCompilerArguments := (scalacOptions in `dotty-compiler`).value ,
897
+ ideTestsCompilerArguments := Seq () ,
898
898
ideTestsDependencyClasspath := {
899
899
val dottyLib = (classDirectory in `dotty-library-bootstrapped` in Compile ).value
900
900
val scalaLib =
You can’t perform that action at this time.
0 commit comments