periphery
periphery copied to clipboard
Enum cases reported as assigned but unused
enum Foo {
static let foo = "foo"
}
class Bar {
func bar() -> [String: Int] {
var s: [String: Int] = [:]
s[Foo.foo] = 3
return s
}
}
let b = Bar()
print(b.bar())
gives me
main.swift:2:16: warning: Property 'foo' is assigned, but never used
This file is a member of the target I pass to --targets. swift version is 5.3.1 Also happens with swift version 5.3.2. I'm using periphery 2.4.1 (latest)
Unfortunately this appears to be caused by a bug in Swift that I cannot workaround: https://bugs.swift.org/browse/SR-14162
Thanks for investigating!
Unfortunately, I needed to close this issue because it was created with a company account and that account will be erased shortly. I have raised a new one with my personal account. Sorry for any inconvenience.