Incorrectly Red-Flagged Syntax

Hi,

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

    protected
    def
    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)
        }


        thisDotRHS
    }



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


Randall Schulz

1 comment
Comment actions Permalink

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.

0

Please sign in to leave a comment.