Hi I'm trying to run my code, I double checked everything. It supposed to work, I mean IDE doesn't give any warnings. But when it is compiling I am getting this error
Error:(20, 40) _ must follow method; cannot follow () => Boolean
properties += new Property(propName, formula _)
here is code part which causes this error
def property(propName: String)(formula: () => Boolean) {
properties += new Property(propName, formula _)
}
this is the Property class
class Property(val name: String, val func: () => Boolean)
what's the thing that I am missing here?