mirror of
https://github.com/github/codeql.git
synced 2026-04-21 15:05:56 +02:00
Swift: Cover additional edge case.
This commit is contained in:
@@ -434,7 +434,9 @@ private Element interpretElement0(
|
||||
subtypes = true and
|
||||
declWithMethod.getNominalTypeDecl() = namedTypeDecl.getADerivedTypeDecl*()
|
||||
or
|
||||
exists(ExtensionDecl e | e.getExtendedTypeDecl() = declWithMethod.getNominalTypeDecl() |
|
||||
exists(ExtensionDecl e |
|
||||
e.getExtendedTypeDecl().getADerivedTypeDecl*() = declWithMethod.getNominalTypeDecl()
|
||||
|
|
||||
subtypes = true and
|
||||
e.getAProtocol() = namedTypeDecl.getADerivedTypeDecl*()
|
||||
)
|
||||
@@ -454,7 +456,9 @@ private Element interpretElement0(
|
||||
subtypes = true and
|
||||
declWithField.getNominalTypeDecl() = namedTypeDecl.getADerivedTypeDecl*()
|
||||
or
|
||||
exists(ExtensionDecl e | e.getExtendedTypeDecl() = declWithField.getNominalTypeDecl() |
|
||||
exists(ExtensionDecl e |
|
||||
e.getExtendedTypeDecl().getADerivedTypeDecl*() = declWithField.getNominalTypeDecl()
|
||||
|
|
||||
subtypes = true and
|
||||
e.getAProtocol() = namedTypeDecl.getADerivedTypeDecl*()
|
||||
)
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
| generics.swift:132:9:132:15 | .source1 | external |
|
||||
| generics.swift:133:9:133:15 | .source2 | external |
|
||||
| generics.swift:162:9:162:22 | call to source2() | external |
|
||||
| generics.swift:163:9:163:22 | call to source3() | external |
|
||||
| nsdata.swift:18:17:18:40 | call to NSData.init(contentsOf:) | external |
|
||||
| nsdata.swift:19:17:19:53 | call to NSData.init(contentsOf:options:) | external |
|
||||
| string.swift:56:21:56:44 | call to String.init(contentsOf:) | external |
|
||||
|
||||
@@ -160,5 +160,5 @@ class MyChildClass3: MyClass3 {
|
||||
func useProtocol3(impl: MyChildClass3) {
|
||||
_ = impl.source1() // not a source (`MyProtocol3.source1` is the declared source and `MyParentClass3` doesn't extend it)
|
||||
_ = impl.source2() // SOURCE
|
||||
_ = impl.source3() // SOURCE [NOT DETECTED]
|
||||
_ = impl.source3() // SOURCE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user