File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -341,7 +341,7 @@ object Checking {
341
341
if (! ok && ! sym.is(Synthetic ))
342
342
fail(i " modifier ` $flag` is not allowed for this definition " )
343
343
344
- if (sym.is(Inline ) && sym.is(ParamAccessor ) && sym.owner.isClass)
344
+ if (sym.is(Inline ) && (( sym.is(ParamAccessor ) && sym.owner.isClass) || sym.is( TermParam ) && sym.owner.isClassConstructor) )
345
345
fail(ParamsNoInline (sym.owner))
346
346
347
347
if (sym.is(ImplicitCommon )) {
Original file line number Diff line number Diff line change @@ -2,3 +2,6 @@ class Foo(inline val i: Int) // error
2
2
case class Foo2 (inline val i : Int ) // error
3
3
class Foo3 (inline val i : Int ) extends AnyVal // error
4
4
trait Foo4 (inline val i : Int ) // error
5
+ class Foo5 () {
6
+ def this (inline x : Int ) = this () // error
7
+ }
You can’t perform that action at this time.
0 commit comments