Skip to content

Commit 3268106

Browse files
committed
Fix: Don't generate inline accessors for pattern bound variables
1 parent 367ba78 commit 3268106

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/src/dotty/tools/dotc/typer/Inliner.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ object Inliner {
5353
* by excluding all symbols properly contained in the inlined method.
5454
*/
5555
def needsAccessor(sym: Symbol)(implicit ctx: Context) =
56+
sym.isTerm &&
5657
(sym.is(AccessFlags) || sym.privateWithin.exists) &&
5758
!sym.owner.isContainedIn(inlineMethod)
5859

0 commit comments

Comments
 (0)