Incorrectly Red-Flagged Syntax


This code, which the compiler accepts without error or warning, is flagged with "Wrong Pattern" by the Scala plug-in:

    composition(rhs: Substitution): MMap[IndividualVariable, FOL_Term] =
        val thisDotRHS: MMap[IndividualVariable, FOL_Term] = MMap.empty ++ (
            for {
                sub <- subsMap
                rhsT = Substitutions.substitute(rhs, sub._2)
                // Chang & Lee specify the following restriction, but Graf does not...
//              if !rhsT.isInstanceOf[VariableTerm] || rhsT.asInstanceOf[VariableTerm].variable != sub._1

            } yield (sub._1, rhsT)
//                      ^ Error flagged here "Wrong pattern"

        rhs.assignments.foreach {
            case (v, t) =>
                if (!subsMap.contains(v))
                    thisDotRHS.put(v, t)


Sclala Plug-in: 0.2.25681
IDEA: 8.1.3
JVM: 1.6.0_u14
OS: Linux
arch: x86

Randall Schulz


Oh, it's a known lexer issue (wrong understanding for meaning of newlines). Thank you! You've added one more reason to fix it!:)

Best regards,
Alexander Podkhalyuzin.