We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36707c7 commit d82cc9aCopy full SHA for d82cc9a
compiler/src/dotty/tools/dotc/parsing/Parsers.scala
@@ -2396,7 +2396,15 @@ object Parsers {
2396
}
2397
else Nil
2398
2399
- recur(firstClause = true, 0, ofInstance)
+
2400
+ val start = in.lastOffset
2401
+ val params = recur(firstClause = true, 0, ofInstance)
2402
2403
+ if(ofCaseClass && params.isEmpty)
2404
+ syntaxError( "case classes without a parameter list are not allowed;\n"+
2405
+ "use either case objects or case classes with an explicit `()' as a parameter list.", start)
2406
2407
+ params
2408
2409
2410
/* -------- DEFS ------------------------------------------- */
0 commit comments