Skip to content

Commit 1fccf39

Browse files
authored
Make 3.3 the default source version (#16329)
2 parents 970d119 + e0a5adb commit 1fccf39

File tree

5 files changed

+27
-47
lines changed

5 files changed

+27
-47
lines changed

compiler/src/dotty/tools/dotc/config/SourceVersion.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ enum SourceVersion:
1919
def isAtLeast(v: SourceVersion) = stable.ordinal >= v.ordinal
2020

2121
object SourceVersion extends Property.Key[SourceVersion]:
22-
def defaultSourceVersion = `3.2`
22+
def defaultSourceVersion = `3.3`
2323

2424
/** language versions that may appear in a language import, are deprecated, but not removed from the standard library. */
2525
val illegalSourceVersionNames = List("3.1-migration").map(_.toTermName)

compiler/test/dotty/tools/repl/ReplCompilerTests.scala

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -347,27 +347,6 @@ class ReplCompilerTests extends ReplTest:
347347
assertEquals("java.lang.AssertionError: assertion failed", all.head)
348348
}
349349

350-
@Test def i14491 =
351-
initially {
352-
run("import language.experimental.fewerBraces")
353-
} andThen {
354-
run("""|val x = Seq(7,8,9).apply:
355-
| 1
356-
|""".stripMargin)
357-
assertEquals("val x: Int = 8", storedOutput().trim)
358-
}
359-
initially {
360-
run("""|import language.experimental.fewerBraces
361-
|import language.experimental.fewerBraces as _
362-
|""".stripMargin)
363-
} andThen {
364-
run("""|val x = Seq(7,8,9).apply:
365-
| 1
366-
|""".stripMargin)
367-
assert("expected error if fewerBraces is unimported",
368-
lines().exists(_.contains("missing arguments for method apply")))
369-
}
370-
371350
object ReplCompilerTests:
372351

373352
private val pattern = Pattern.compile("\\r[\\n]?|\\n");

tests/neg/i4373b.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ==> 05bef7805687ba94da37177f7568e3ba7da1f91c.scala <==
22
class x0 {
3-
x1:
4-
x0 | _ // error
5-
// error
3+
x1: // error
4+
x0 | _
5+
// error

tests/neg/indent-colons.check

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
-- Error: tests/neg/indent-colons.scala:6:4 ----------------------------------------------------------------------------
2-
6 | : // error
1+
-- Error: tests/neg/indent-colons.scala:7:4 ----------------------------------------------------------------------------
2+
7 | : // error
33
| ^
44
| end of statement expected but ':' found
5-
-- Error: tests/neg/indent-colons.scala:12:2 ---------------------------------------------------------------------------
6-
12 | : // error
5+
-- Error: tests/neg/indent-colons.scala:13:2 ---------------------------------------------------------------------------
6+
13 | : // error
77
| ^
88
| end of statement expected but ':' found
9-
-- Error: tests/neg/indent-colons.scala:19:2 ---------------------------------------------------------------------------
10-
19 | : // error
9+
-- Error: tests/neg/indent-colons.scala:20:2 ---------------------------------------------------------------------------
10+
20 | : // error
1111
| ^
1212
| end of statement expected but ':' found
13-
-- [E018] Syntax Error: tests/neg/indent-colons.scala:26:14 ------------------------------------------------------------
14-
26 | val y = 1 + : // error
13+
-- [E018] Syntax Error: tests/neg/indent-colons.scala:27:14 ------------------------------------------------------------
14+
27 | val y = 1 + : // error
1515
| ^
1616
| expression expected but : found
1717
|
1818
| longer explanation available when compiling with `-explain`
19-
-- [E018] Syntax Error: tests/neg/indent-colons.scala:30:27 ------------------------------------------------------------
20-
30 | val all = credentials ++ : // error
19+
-- [E018] Syntax Error: tests/neg/indent-colons.scala:31:27 ------------------------------------------------------------
20+
31 | val all = credentials ++ : // error
2121
| ^
2222
| expression expected but : found
2323
|
2424
| longer explanation available when compiling with `-explain`
25-
-- [E134] Type Error: tests/neg/indent-colons.scala:23:12 --------------------------------------------------------------
26-
23 | val x = 1.+ : // error
25+
-- [E134] Type Error: tests/neg/indent-colons.scala:24:12 --------------------------------------------------------------
26+
24 | val x = 1.+ : // error
2727
| ^^^
2828
| None of the overloaded alternatives of method + in class Int with types
2929
| (x: Double): Double
@@ -35,27 +35,27 @@
3535
| (x: Byte): Int
3636
| (x: String): String
3737
| match expected type (2 : Int)
38-
-- [E006] Not Found Error: tests/neg/indent-colons.scala:32:7 ----------------------------------------------------------
39-
32 | if file.isEmpty // error
38+
-- [E006] Not Found Error: tests/neg/indent-colons.scala:33:7 ----------------------------------------------------------
39+
33 | if file.isEmpty // error
4040
| ^^^^
4141
| Not found: file
4242
|
4343
| longer explanation available when compiling with `-explain`
44-
-- [E006] Not Found Error: tests/neg/indent-colons.scala:34:13 ---------------------------------------------------------
45-
34 | else Seq(file) // error
44+
-- [E006] Not Found Error: tests/neg/indent-colons.scala:35:13 ---------------------------------------------------------
45+
35 | else Seq(file) // error
4646
| ^^^^
4747
| Not found: file
4848
|
4949
| longer explanation available when compiling with `-explain`
50-
-- Error: tests/neg/indent-colons.scala:4:2 ----------------------------------------------------------------------------
51-
4 | tryEither: // error
50+
-- Error: tests/neg/indent-colons.scala:5:2 ----------------------------------------------------------------------------
51+
5 | tryEither: // error
5252
| ^^^^^^^^^
5353
| missing arguments for method tryEither
54-
-- Error: tests/neg/indent-colons.scala:10:2 ---------------------------------------------------------------------------
55-
10 | tryEither: // error
54+
-- Error: tests/neg/indent-colons.scala:11:2 ---------------------------------------------------------------------------
55+
11 | tryEither: // error
5656
| ^^^^^^^^^
5757
| missing arguments for method tryEither
58-
-- Error: tests/neg/indent-colons.scala:17:2 ---------------------------------------------------------------------------
59-
17 | Some(3).fold: // error
58+
-- Error: tests/neg/indent-colons.scala:18:2 ---------------------------------------------------------------------------
59+
18 | Some(3).fold: // error
6060
| ^^^^^^^^^^^^
6161
| missing arguments for method fold in class Option

tests/neg/indent-colons.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import language.`3.2`
12
def tryEither[T](x: T)(y: Int => T): T = ???
23

34
def test1 =

0 commit comments

Comments
 (0)