Skip to content

Commit 9b2277e

Browse files
sankalpgambhirvkuncak
authored andcommitted
Automatic compiler rewrites for Scala 3.7.0
1 parent 1e90d9d commit 9b2277e

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

src/main/scala/smtlib/common/Positions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ case class Position(line: Int, col: Int) extends Ordered[Position] {
3232
*/
3333
trait Positioned {
3434

35-
private[this] var _pos: Option[Position] = None
35+
private var _pos: Option[Position] = None
3636

3737
def setPos(pos: Position): this.type = {
3838
_pos = Some(pos)

src/main/scala/smtlib/parser/ParserCommands.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import trees.Commands._
77

88
import scala.collection.mutable.ListBuffer
99

10-
trait ParserCommands { this: ParserCommon with ParserTerms =>
10+
trait ParserCommands { this: ParserCommon & ParserTerms =>
1111

1212
import Parser._
1313

src/main/scala/smtlib/parser/ParserCommandsResponses.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import trees.CommandsResponses._
77

88
import scala.collection.mutable.ListBuffer
99

10-
trait ParserCommandsResponses { this: ParserCommon with ParserTerms with ParserCommands =>
10+
trait ParserCommandsResponses { this: ParserCommon & ParserTerms & ParserCommands =>
1111

1212
import Parser._
1313

src/main/scala/smtlib/parser/ParserCommon.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ trait ParserCommon {
164164
case Tokens.StringLitKind => parseString
165165
case Tokens.SymbolLitKind => parseSymbol
166166
case Tokens.OParen => parseSList
167-
case _ => expected(peekToken, attributeValuesTokenKinds:_*)
167+
case _ => expected(peekToken, attributeValuesTokenKinds*)
168168
}
169169
}
170170
def tryParseAttributeValue: Option[AttributeValue] = {

src/main/scala/smtlib/theories/FixedSizeBitVectors.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ object FixedSizeBitVectors {
4848
case QualifiedIdentifier(
4949
Identifier(SSymbol(cst), Seq(SNumeral(size))),
5050
None
51-
) if cst startsWith "bv" =>
51+
) if cst `startsWith` "bv" =>
5252
Some(BigInt(cst drop 2) -> size)
5353

5454
case _ => None

src/main/scala/smtlib/trees/TermsOps.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ object TermsOps {
2222
* @return the new sort after applying the mapping
2323
*/
2424
def postMap(f: (Sort) => Option[Sort])(sort: Sort): Sort = {
25-
val rec = postMap(f) _
25+
val rec = postMap(f)
2626
val Sort(id, subSorts) = sort
2727

2828
val recSorts = subSorts.map(rec)
@@ -51,7 +51,7 @@ object TermsOps {
5151
* @note this operation can diverge if f is not well formed
5252
*/
5353
def preMap(f: (Sort) => Option[Sort])(sort: Sort): Sort = {
54-
val rec = preMap(f) _
54+
val rec = preMap(f)
5555
val newSort = f(sort).getOrElse(sort)
5656
val Sort(id, subSorts) = newSort
5757

@@ -65,22 +65,22 @@ object TermsOps {
6565

6666

6767
def postTraversal(f: (Sort) => Unit)(sort: Sort): Unit = {
68-
val rec = postTraversal(f) _
68+
val rec = postTraversal(f)
6969
val Sort(_, subSorts) = sort
7070
subSorts.foreach(rec)
7171
f(sort)
7272
}
7373

7474
def preTraversal(f: (Sort) => Unit)(sort: Sort): Unit = {
75-
val rec = preTraversal(f) _
75+
val rec = preTraversal(f)
7676
val Sort(_, subSorts) = sort
7777
f(sort)
7878
subSorts.foreach(rec)
7979
}
8080

8181

8282
def fold[T](f: (Sort, Seq[T]) => T)(sort: Sort): T = {
83-
val rec = fold(f) _
83+
val rec = fold(f)
8484
val Sort(_, ss) = sort
8585
f(sort, ss.map(rec))
8686
}

src/main/scala/smtlib/trees/Trees.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ object Terms {
8181

8282
case class SList(sexprs: List[SExpr]) extends SExpr with AttributeValue
8383
object SList {
84-
def apply(sexprs: SExpr*): SList = SList(List(sexprs:_*))
84+
def apply(sexprs: SExpr*): SList = SList(List(sexprs*))
8585
}
8686
case class SKeyword(name: String) extends SExpr
8787
case class SSymbol(name: String) extends SExpr with AttributeValue with Index

src/test/scala/smtlib/theories/StringsTests.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,22 +136,22 @@ class StringsTests extends AnyFunSuite with Matchers {
136136
}
137137

138138

139-
"\"abc\"" shouldParseTo
139+
"\"abc\"" `shouldParseTo`
140140
StringLit("abc")
141141

142-
"(str.++ \"a\" \"bc\" )" shouldParseTo
142+
"(str.++ \"a\" \"bc\" )" `shouldParseTo`
143143
Concat(StringLit("a"), StringLit("bc"))
144144

145-
"(str.++ \"a\" \"bc\" \"def\" )" shouldParseTo
145+
"(str.++ \"a\" \"bc\" \"def\" )" `shouldParseTo`
146146
Concat(StringLit("a"), StringLit("bc"), StringLit("def"))
147147

148-
"(str.len \"abcd\")" shouldParseTo
148+
"(str.len \"abcd\")" `shouldParseTo`
149149
Length(StringLit("abcd"))
150150

151-
"(str.at \"abcd\" 1)" shouldParseTo
151+
"(str.at \"abcd\" 1)" `shouldParseTo`
152152
At(StringLit("abcd"), NumeralLit(1))
153153

154-
"(str.substr \"abcdef\" 2 5)" shouldParseTo
154+
"(str.substr \"abcdef\" 2 5)" `shouldParseTo`
155155
Substring(StringLit("abcdef"), NumeralLit(2), NumeralLit(5))
156156
}
157157
}

0 commit comments

Comments
 (0)