Avatar
Avatar
Iceman
@swift-6.0.3 @swift-5.10.1 struct S { func foo() -> Int { 42 } } let fooRef = S.foo fooRef(S()) fooRef(S())() (edited)
swift60 BOT 8/8/2024 5:59 AM
exit status: 1 with <stdin>:8:1: error: function is unused 6 | 7 | let fooRef = S.foo 8 | fooRef(S()) | `- error: function is unused 9 | fooRef(S())() 10 | <stdin>:9:1: warning: result of call to function returning 'Int' is unused 7 | let fooRef = S.foo 8 | fooRef(S()) 9 | fooRef(S())() | `- warning: result of call to function returning 'Int' is unused 10 | (edited)