Skip to content

Commit 869ef7a

Browse files
committed
No warn inline proxy
1 parent 92b5d74 commit 869ef7a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

compiler/src/dotty/tools/dotc/transform/CheckUnused.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,7 @@ object CheckUnused:
533533
warnAt(pos)(UnusedSymbol.implicitParams)
534534
else if sym.isLocalToBlock then
535535
if ctx.settings.WunusedHas.locals
536+
&& !sym.is(InlineProxy)
536537
&& !sym.isCanEqual
537538
then
538539
warnAt(pos)(UnusedSymbol.localDefs)

tests/warn/i17753.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//> using options -Wunused:all
2+
3+
class PartiallyApplied[A] {
4+
transparent inline def func[B](): Nothing = ???
5+
}
6+
7+
def call[A] = new PartiallyApplied[A]
8+
9+
def good = call[Int].func[String]() // no warn inline proxy
10+
def bad = { call[Int].func[String]() } // no warn inline proxy

0 commit comments

Comments
 (0)