File tree Expand file tree Collapse file tree 3 files changed +13
-10
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 3 files changed +13
-10
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 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