File tree 4 files changed +15
-11
lines changed
src/dotty/tools/dotc/parsing 4 files changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,7 @@ object Scanners {
209
209
def featureEnabled (name : TermName ) = Feature .enabled(name)(using languageImportContext)
210
210
def erasedEnabled = featureEnabled(Feature .erasedDefinitions)
211
211
212
- private inline val fewerBracesByDefault = false
212
+ private inline val fewerBracesByDefault = true
213
213
// turn on to study impact on codebase if `fewerBraces` was the default
214
214
215
215
private var fewerBracesEnabledCache = false
Original file line number Diff line number Diff line change @@ -356,6 +356,7 @@ class ReplCompilerTests extends ReplTest:
356
356
|""" .stripMargin)
357
357
assertEquals(" val x: Int = 8" , storedOutput().trim)
358
358
}
359
+ /*
359
360
initially {
360
361
run("""|import language.experimental.fewerBraces
361
362
|import language.experimental.fewerBraces as _
@@ -366,7 +367,7 @@ class ReplCompilerTests extends ReplTest:
366
367
|""".stripMargin)
367
368
assert("expected error if fewerBraces is unimported",
368
369
lines().exists(_.contains("missing arguments for method apply")))
369
- }
370
+ }*/
370
371
371
372
object ReplCompilerTests :
372
373
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 --------------------------------------------------------------
2
2
2 |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 --------------------------------------------------------------
6
8
3 |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 1
1
// ==> 05bef7805687ba94da37177f7568e3ba7da1f91c.scala <==
2
2
class x0 {
3
- x1 :
4
- x0 | _ // error
3
+ x1 : // error
4
+ x0 | _
5
5
// error
You can’t perform that action at this time.
0 commit comments