Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scala version bump to 3.3.3 #1514

Merged
merged 2 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
@@ -1,12 +1,7 @@
[ Error ] Initialization5.scala:6:17: Cannot prove the method argument is hot. Only hot values are safe to leak.
[ Error ] Found = ThisRef[class NoThis].
[ Error ] Non initialized field(s): value nothis1, value nothis2. Calling trace:
[ Error ] -> case class NoThis() { [ Initialization5.scala:2 ]
[ Error ] ^
[ Error ] -> val nothis1 = f() [ Initialization5.scala:3 ]
[ Error ] ^^^
[ Error ] -> def f() = g(this) [ Initialization5.scala:6 ]
[ Error ] ^^^^
[ Error ]
def f() = g(this)
^
[ Error ] Initialization5.scala:3:9: Not well formed definition @field
[ Error ] @fieldDefPosition(8)
[ Error ] @method(NoThis)
[ Error ] def nothis1: Int = this.f
[ Error ] because field `nothis1` can only refer to previous fields, not to `nothis2`
val nothis1 = f()
^
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