Closed
Description
Compiler version
3.1.1
Minimized code
package example
def logLevelDetail(level: Int): String =
s"""$level
// the following line is indented using [tab][tab]
Sets the global logging level to $level.
"""
Output
sbt:hello> compile
[info] compiling 1 Scala source to /private/tmp/hello/target/scala-3.1.1/classes ...
[error] -- Error: /private/tmp/hello/src/main/scala/example/Hello.scala:7:34 -----------
[error] 7 | Sets the global logging level to $level.
[error] | ^
[error] | Incompatible combinations of tabs and spaces in indentation prefixes.
[error] | Previous indent : 2 spaces
[error] | Latest indent : 2 tabs
[error] -- Error: /private/tmp/hello/src/main/scala/example/Hello.scala:7:39 -----------
[error] 7 | Sets the global logging level to $level.
[error] | ^
[error] | Incompatible combinations of tabs and spaces in indentation prefixes.
[error] | Previous indent : 2 spaces
[error] | Latest indent : 2 tabs
[error] two errors found
[error] two errors found
Expectation
It compiles. Indentation rules should not apply to lines within multiline string literals.