False negative in string interpolator leading to compilation error
On Scala IDE 4.1.1 / Scala 2.11, the following false negative leads to a compilation error (and not only a warning). The error message available on mouse over is given in the the comment:
This case was ok with Scala 2.10, and tend to occures a lot when using templating engine.
I'm using "-Xlint", but removing it does not make the error disapear.
As a workaround, you can change the variable name.
//Scala IDE: Build id: 4.1.1-vfinal-20150727-1320-Typesafe
package com.normation
class TestInterpolation {
/*
Multiple markers at this line:
- recursive method foo needs type
- possible missing interpolator: detected interpolated identifier $foo
*/
var foo = "$foo"
// ~~~~
}
This case was ok with Scala 2.10, and tend to occures a lot when using templating engine.
I'm using "-Xlint", but removing it does not make the error disapear.
As a workaround, you can change the variable name.
Leave a comment
You could also set an explicit type, and not use `-Xfatal-warnings` (that's what makes the warning look like an error)