File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -1839,16 +1839,10 @@ object Parsers {
1839
1839
val start = in.offset
1840
1840
var mods = annotsAsMods()
1841
1841
if (owner.isTypeName) {
1842
- mods = modifiers(start = mods)
1842
+ // Adding ParamAccessor would crash
1843
+ mods = modifiers(start = mods, allowed = modifierTokens &~ BitSet (SEALED )) | ParamAccessor
1843
1844
if (mods.is(Lazy ))
1844
1845
syntaxError(" `lazy' modifier not allowed here. Use call-by-name parameters instead" )
1845
- mods =
1846
- if (mods.is(Sealed )) {
1847
- syntaxError(" `sealed' modifier can be used only for classes" )
1848
- mods // Adding ParamAccessor would crash
1849
- } else {
1850
- mods | ParamAccessor
1851
- }
1852
1846
mods =
1853
1847
atPos(start, in.offset) {
1854
1848
if (in.token == VAL ) {
You can’t perform that action at this time.
0 commit comments