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 {
2525 (m1 to m1, """ found: Null
2626 |required: Boolean""" .stripMargin, Error , Some (TypeMismatchID ))
2727 )
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 */ )
2841}
Original file line number Diff line number Diff line change @@ -894,7 +894,7 @@ object Build {
894894 ).
895895 settings(
896896 ideTestsCompilerVersion := (version in `dotty-compiler`).value,
897- ideTestsCompilerArguments := (scalacOptions in `dotty-compiler`).value ,
897+ ideTestsCompilerArguments := Seq () ,
898898 ideTestsDependencyClasspath := {
899899 val dottyLib = (classDirectory in `dotty-library-bootstrapped` in Compile ).value
900900 val scalaLib =
You can’t perform that action at this time.
0 commit comments