Skip to content

Commit

Permalink
scala version bump to 3.3.3; FunctionOf tree changed; Use Iterable in…
Browse files Browse the repository at this point in the history
…stead of Traversable
  • Loading branch information
samuelchassot authored and vkuncak committed Apr 30, 2024
1 parent 54399d0 commit 9695ea7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ lazy val nTestSuiteParallelism = {
}

// The Scala version with which Stainless is compiled.
val stainlessScalaVersion = "3.3.0"
val stainlessScalaVersion = "3.3.3"
// Stainless supports Scala 2.13 and Scala 3.3 programs.
val frontendScalacVersion = "2.13.12"
val frontendDottyVersion = stainlessScalaVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ class CodeExtraction(inoxCtx: inox.Context,

def isVariable(s: Symbol) = (vars contains s) || (mutableVars contains s)

def withNewTypeParams(ntparams: Traversable[(Symbol, xt.TypeParameter)]) = {
def withNewTypeParams(ntparams: Iterable[(Symbol, xt.TypeParameter)]) = {
copy(tparams = tparams ++ ntparams)
}

def withNewTypeParam(tparam: (Symbol, xt.TypeParameter)) = {
copy(tparams = tparams + tparam)
}

def withNewVars(nvars: Traversable[(Symbol, () => xt.Expr)]) = {
def withNewVars(nvars: Iterable[(Symbol, () => xt.Expr)]) = {
copy(vars = vars ++ nvars)
}

Expand All @@ -116,7 +116,7 @@ class CodeExtraction(inoxCtx: inox.Context,
copy(mutableVars = mutableVars + nvar)
}

def withNewMutableVars(nvars: Traversable[(Symbol, () => xt.Variable)]) = {
def withNewMutableVars(nvars: Iterable[(Symbol, () => xt.Variable)]) = {
copy(mutableVars = mutableVars ++ nvars)
}

Expand All @@ -128,7 +128,7 @@ class CodeExtraction(inoxCtx: inox.Context,
copy(localClasses = this.localClasses + (lcd.id -> lcd))
}

def withDepParams(dps: Traversable[(TermName, xt.ValDef)]) = {
def withDepParams(dps: Iterable[(TermName, xt.ValDef)]) = {
copy(depParams = depParams ++ dps)
}

Expand Down Expand Up @@ -2391,7 +2391,7 @@ class CodeExtraction(inoxCtx: inox.Context,
case AppliedType(tr: TypeRef, Seq(tp)) if isArrayClassSym(tr.symbol) =>
xt.ArrayType(extractType(tp))

case fo @ defn.FunctionOf(from, to, _, _) =>
case fo @ defn.FunctionOf(from, to, _) =>
xt.FunctionType(from map extractType, extractType(to))

case tr @ TypeRef(_, _) if dctx.tparams contains tr.symbol =>
Expand Down

0 comments on commit 9695ea7

Please sign in to comment.