Code
a workaround of false negative in missing interpolator warning
一般情况下,我们会倾向于打开各种warning,以便规范我们的代码.不过,scala有时候有些warning也是蛮扯的.比如这么一段
$ scala -Xlint:missing-interpolator Welcome to Scala version 2.11.7 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_05). Type in expressions to have them evaluated. Type :help for more information. scala> val key="value"; println("$key") <console>:12: warning: possible missing interpolator: detected interpolated identifier `$key` println("$key") ^ $key key: String = value