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 f00cda8 commit c5b176fCopy full SHA for c5b176f
compiler/src/dotty/tools/dotc/typer/Inliner.scala
@@ -144,8 +144,7 @@ object Inliner {
144
case _: Apply | _: TypeApply | _: RefTree if needsAccessor(tree.symbol) =>
145
if (tree.isTerm) {
146
val (methPart, targs, argss) = decomposeCall(tree)
147
- val mSym = methPart.symbol
148
- if (mSym.isConstructor && (mSym.is(Private) || mSym.privateWithin.exists)) {
+ if (methPart.symbol.isConstructor && needsAccessor(methPart.symbol)) {
149
ctx.error("Cannot use private constructors in inline methods", tree.pos)
150
tree // TODO: create a proper accessor for the private constructor
151
} else {
0 commit comments