We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45bbd24 commit 6815e73Copy full SHA for 6815e73
swift/ql/test/extractor-tests/types/ThrowingAndAsync.expected
@@ -0,0 +1,4 @@
1
+| types.swift:24:1:26:1 | throwingFunc | () throws -> Int | throws |
2
+| types.swift:28:1:28:36 | asyncFunction | (Int) async -> () | async |
3
+| types.swift:30:1:30:54 | throwingAndAsyncFunction | (Int) async throws -> () | async |
4
+| types.swift:30:1:30:54 | throwingAndAsyncFunction | (Int) async throws -> () | throws |
swift/ql/test/extractor-tests/types/ThrowingAndAsync.ql
@@ -0,0 +1,12 @@
+import codeql.swift.elements
+
+from FuncDecl f, AnyFunctionType t, string s
+where
5
+ f.getInterfaceType() = t and
6
+ f.getLocation().getFile().getName().matches("%swift/ql/test%") and
7
+ (
8
+ t.isAsync() and s = "async"
9
+ or
10
+ t.isThrowing() and s = "throws"
11
+ )
12
+select f, t, s
0 commit comments