Skip to content

Commit f635c2f

Browse files
committed
Fix bootstrapped tests
1 parent 1de49a6 commit f635c2f

File tree

5 files changed

+14
-10
lines changed

5 files changed

+14
-10
lines changed

language-server/test/dotty/tools/languageserver/util/actions/CodeRename.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ class CodeRename(override val marker: CodeMarker,
3333
withOverridden.foreach { includeOverridden =>
3434
var question: (ShowMessageRequestParams, CompletableFuture[MessageActionItem]) = null
3535
val startTime = System.currentTimeMillis()
36-
do {
36+
while {
3737
Thread.sleep(50)
3838
question = client.requests.get.headOption.orNull
39-
} while (question == null && System.currentTimeMillis() - startTime < TIMEOUT_MS)
39+
question == null && System.currentTimeMillis() - startTime < TIMEOUT_MS
40+
} do ()
4041

4142
if (question == null) fail("The server didn't ask about overridden symbols.")
4243

tests/run-macros/quote-inline-function.check

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ Normal function
77
f.apply(x$1)
88
i = i.+(1)
99
}
10-
do {
10+
while ({
1111
val x$2: scala.Int = i
1212
f.apply(x$2)
1313
i = i.+(1)
14-
} while (i.<(j))
14+
i.<(j)
15+
}) ()
1516
}
1617

1718
By name function
@@ -23,9 +24,10 @@ By name function
2324
scala.Predef.println(x$3)
2425
i = i.+(1)
2526
}
26-
do {
27+
while ({
2728
val x$4: scala.Int = i
2829
scala.Predef.println(x$4)
2930
i = i.+(1)
30-
} while (i.<(j))
31+
i.<(j)
32+
}) ()
3133
}

tests/run-macros/quote-inline-function/quoted_1.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ object Macros {
1515
${f.apply('i)}
1616
i += 1
1717
}
18-
do {
18+
while {
1919
${f.apply('i)}
2020
i += 1
21-
} while (i < j)
21+
i < j
22+
} do ()
2223
}
2324
res.show
2425
}

tests/run-macros/tasty-tree-map/quoted_2.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ object Test {
1616
println(identityMaped({ val i = 34; i }))
1717
println(identityMaped({ var i = 34; i += 1; i }))
1818
println(identityMaped({ var i = 0; while (i < 36) i += 1; i }))
19-
println(identityMaped({ var i = 0; do i += 1 while (i < 37); i }))
19+
println(identityMaped({ var i = 0; while { i += 1 ; i < 37 } do (); i }))
2020
println(identityMaped(try 38 finally ()))
2121
println(identityMaped(try 39 catch { case _: Error => }))
2222
println(identityMaped(new java.lang.Integer(40)))

tests/run-with-compiler/quote-lib.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ package liftable {
137137

138138
object Loops {
139139
def liftedWhile(cond: Expr[Boolean])(body: Expr[Unit]) given QuoteContext: Expr[Unit] = '{ while ($cond) $body }
140-
def liftedDoWhile(body: Expr[Unit])(cond: Expr[Boolean]) given QuoteContext: Expr[Unit] = '{ do $body while ($cond) }
140+
def liftedDoWhile(body: Expr[Unit])(cond: Expr[Boolean]) given QuoteContext: Expr[Unit] = '{ while { $body ; $cond } do () }
141141
}
142142

143143

0 commit comments

Comments
 (0)