File tree Expand file tree Collapse file tree 4 files changed +15
-11
lines changed
src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 4 files changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,7 @@ object Scanners {
209209 def featureEnabled (name : TermName ) = Feature .enabled(name)(using languageImportContext)
210210 def erasedEnabled = featureEnabled(Feature .erasedDefinitions)
211211
212- private inline val fewerBracesByDefault = false
212+ private inline val fewerBracesByDefault = true
213213 // turn on to study impact on codebase if `fewerBraces` was the default
214214
215215 private var fewerBracesEnabledCache = false
Original file line number Diff line number Diff line change @@ -356,6 +356,7 @@ class ReplCompilerTests extends ReplTest:
356356 |""" .stripMargin)
357357 assertEquals(" val x: Int = 8" , storedOutput().trim)
358358 }
359+ /*
359360 initially {
360361 run("""|import language.experimental.fewerBraces
361362 |import language.experimental.fewerBraces as _
@@ -366,7 +367,7 @@ class ReplCompilerTests extends ReplTest:
366367 |""".stripMargin)
367368 assert("expected error if fewerBraces is unimported",
368369 lines().exists(_.contains("missing arguments for method apply")))
369- }
370+ }*/
370371
371372object ReplCompilerTests :
372373
Original file line number Diff line number Diff line change 1- -- Error: tests/neg/fun-ascription.scala:2:17 ------------ --------------------------------------------------------------
1+ -- [E081] Type Error: tests/neg/fun-ascription.scala:2:13 --------------------------------------------------------------
222 |val x1 = (f: Int => Int) // error
3- | ^^^^^^^^^^
4- | function type in type ascription must be enclosed in parentheses
5- -- Error: tests/neg/fun-ascription.scala:3:16 --------------------------------------------------------------------------
3+ | ^^^
4+ | Missing parameter type
5+ |
6+ | I could not infer the type of the parameter Int.
7+ -- [E081] Type Error: tests/neg/fun-ascription.scala:3:12 --------------------------------------------------------------
683 |val x2 = f: Int => Int // error
7- | ^
8- | parentheses are required around the parameter of a lambda
9- | This construct can be rewritten automatically under -rewrite -source 3.0-migration.
9+ | ^^^
10+ | Missing parameter type
11+ |
12+ | I could not infer the type of the parameter Int.
Original file line number Diff line number Diff line change 11// ==> 05bef7805687ba94da37177f7568e3ba7da1f91c.scala <==
22class x0 {
3- x1 :
4- x0 | _ // error
3+ x1 : // error
4+ x0 | _
55// error
You can’t perform that action at this time.
0 commit comments