Dynamic Inline
Avoid using ‘dynamic’ and ‘@inline(__always)’ together
- Identifier:
dynamic_inline
- Enabled by default: Yes
- Supports autocorrection: No
- Kind: lint
- Analyzer rule: No
- Minimum Swift compiler version: 5.0.0
- Default configuration:
Key Value severity error
Non Triggering Examples
class C {
dynamic func f() {}}
class C {
@inline(__always) func f() {}}
class C {
@inline(never) dynamic func f() {}}
Triggering Examples
class C {
@inline(__always) dynamic ↓func f() {}
}
class C {
@inline(__always) public dynamic ↓func f() {}
}
class C {
@inline(__always) dynamic internal ↓func f() {}
}
class C {
@inline(__always)
dynamic ↓func f() {}
}
class C {
@inline(__always)
dynamic
↓func f() {}
}