From 36e1b3bc044880106f0af64b8ddc7d8dd0f9bdda Mon Sep 17 00:00:00 2001 From: kyessenov Date: Wed, 16 Feb 2011 04:09:21 +0000 Subject: Fix some deprecation warnings from scalac 2.8.0. Check for Boogie.exe only on Windows. Fix parser (_ is a keyword, not a delimiter) --- Chalice/src/Ast.scala | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Chalice/src/Ast.scala') diff --git a/Chalice/src/Ast.scala b/Chalice/src/Ast.scala index 7b8dea8a..4b8b9189 100644 --- a/Chalice/src/Ast.scala +++ b/Chalice/src/Ast.scala @@ -14,7 +14,7 @@ trait ASTNode extends Positional * Classes and types */ -case class TopLevelDecl(id: String) extends ASTNode +sealed abstract class TopLevelDecl(val id: String) extends ASTNode sealed case class Class(classId: String, parameters: List[Class], module: String, members: List[Member]) extends TopLevelDecl(classId) { def IsInt: Boolean = false @@ -241,7 +241,7 @@ case class BlockPat() extends Transform { case class SkipPat() extends Transform /** Replacement pattern for arbitrary block */ case class ProgramPat(code: List[Statement]) extends Transform { - if (code.size > 0) pos = code.first.pos + if (code.size > 0) pos = code.head.pos } case class IfPat(thn: Transform, els: Option[Transform]) extends Transform case class WhilePat(invs: List[Expression], body: Transform) extends Transform @@ -257,10 +257,10 @@ case class NonDetPat(is: List[String], code: List[Statement]) extends Transform case class InsertPat(code: List[Statement]) extends Transform case class SeqPat(pats: List[Transform]) extends Transform { assert(pats.size > 0) - pos = pats.first.pos; + pos = pats.head.pos; } case class RefinementBlock(con: List[Statement], abs: List[Statement]) extends Statement { - if (con.size > 0) pos = con.first.pos + if (con.size > 0) pos = con.head.pos // local variables in context at the beginning of the block var before: List[Variable] = null @@ -525,7 +525,7 @@ case class Range(min: Expression, max: Expression /* non-inclusive*/) extends Ex case class Append(s0: Expression, s1: Expression) extends SeqAccess(s0, s1) { override val OpName = "++" } -sealed abstract case class SeqAccess(e0: Expression, e1: Expression) extends BinaryExpr(e0, e1) { +sealed abstract class SeqAccess(e0: Expression, e1: Expression) extends BinaryExpr(e0, e1) { override val ExpectedLhsType = null override val ExpectedRhsType = null override val ResultType = null -- cgit v1.2.3