mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
Swift: add more functions to deduplication test
This commit is contained in:
@@ -8,11 +8,35 @@
|
||||
| Sources/deduplication/def.swift:5:5:5:5 | def_instantiated_generic | ConcreteVarDecl | Generic<Int> |
|
||||
| Sources/deduplication/def.swift:7:1:7:46 | def_function(_:) | NamedFunction | (Int) -> Int |
|
||||
| Sources/deduplication/def.swift:7:19:7:22 | _ | ParamDecl | Int |
|
||||
| Sources/deduplication/def.swift:9:1:9:46 | def_generic_function(_:_:) | NamedFunction | <A, B> (A, B) -> () |
|
||||
| Sources/deduplication/def.swift:9:27:9:27 | A | GenericTypeParamDecl | A.Type |
|
||||
| Sources/deduplication/def.swift:9:30:9:30 | B | GenericTypeParamDecl | B.Type |
|
||||
| Sources/deduplication/def.swift:9:33:9:36 | _ | ParamDecl | A |
|
||||
| Sources/deduplication/def.swift:9:39:9:42 | _ | ParamDecl | B |
|
||||
| Sources/deduplication/def.swift:9:1:9:77 | def_function_overloaded_on_return(_:_:) | NamedFunction | (Int, Double) -> Int |
|
||||
| Sources/deduplication/def.swift:9:40:9:43 | _ | ParamDecl | Int |
|
||||
| Sources/deduplication/def.swift:9:48:9:51 | _ | ParamDecl | Double |
|
||||
| Sources/deduplication/def.swift:10:1:10:82 | def_function_overloaded_on_return(_:_:) | NamedFunction | (Int, Double) -> Double |
|
||||
| Sources/deduplication/def.swift:10:40:10:43 | _ | ParamDecl | Int |
|
||||
| Sources/deduplication/def.swift:10:48:10:51 | _ | ParamDecl | Double |
|
||||
| Sources/deduplication/def.swift:12:1:12:57 | def_function_overloaded_on_parameter_type(_:) | NamedFunction | (Int) -> () |
|
||||
| Sources/deduplication/def.swift:12:48:12:51 | _ | ParamDecl | Int |
|
||||
| Sources/deduplication/def.swift:13:1:13:60 | def_function_overloaded_on_parameter_type(_:) | NamedFunction | (Double) -> () |
|
||||
| Sources/deduplication/def.swift:13:48:13:51 | _ | ParamDecl | Double |
|
||||
| Sources/deduplication/def.swift:15:1:15:62 | def_function_overloaded_on_parameter_label(one:) | NamedFunction | (Int) -> () |
|
||||
| Sources/deduplication/def.swift:15:49:15:56 | x | ParamDecl | Int |
|
||||
| Sources/deduplication/def.swift:16:1:16:62 | def_function_overloaded_on_parameter_label(two:) | NamedFunction | (Int) -> () |
|
||||
| Sources/deduplication/def.swift:16:49:16:56 | x | ParamDecl | Int |
|
||||
| Sources/deduplication/def.swift:18:1:18:44 | def_throwing_function(_:) | NamedFunction | (Int) throws -> () |
|
||||
| Sources/deduplication/def.swift:18:28:18:31 | _ | ParamDecl | Int |
|
||||
| Sources/deduplication/def.swift:19:1:19:60 | def_rethrowing_function(_:) | NamedFunction | (() throws -> ()) throws -> () |
|
||||
| Sources/deduplication/def.swift:19:30:19:47 | _ | ParamDecl | () throws -> () |
|
||||
| Sources/deduplication/def.swift:20:1:20:40 | def_async_function(_:) | NamedFunction | (Int) async -> () |
|
||||
| Sources/deduplication/def.swift:20:25:20:28 | _ | ParamDecl | Int |
|
||||
| Sources/deduplication/def.swift:21:1:21:56 | def_async_throwing_function(_:) | NamedFunction | (Int) async throws -> () |
|
||||
| Sources/deduplication/def.swift:21:34:21:37 | _ | ParamDecl | Int |
|
||||
| Sources/deduplication/def.swift:22:1:22:72 | def_async_rethrowing_function(_:) | NamedFunction | (() throws -> ()) async throws -> () |
|
||||
| Sources/deduplication/def.swift:22:36:22:53 | _ | ParamDecl | () throws -> () |
|
||||
| Sources/deduplication/def.swift:24:1:24:46 | def_generic_function(_:_:) | NamedFunction | <A, B> (A, B) -> () |
|
||||
| Sources/deduplication/def.swift:24:27:24:27 | A | GenericTypeParamDecl | A.Type |
|
||||
| Sources/deduplication/def.swift:24:30:24:30 | B | GenericTypeParamDecl | B.Type |
|
||||
| Sources/deduplication/def.swift:24:33:24:36 | _ | ParamDecl | A |
|
||||
| Sources/deduplication/def.swift:24:39:24:42 | _ | ParamDecl | B |
|
||||
| Sources/deduplication/use.swift:1:1:1:15 | var ... = ... | PatternBindingDecl | - |
|
||||
| Sources/deduplication/use.swift:1:5:1:5 | use_int | ConcreteVarDecl | Int |
|
||||
| Sources/deduplication/use.swift:2:1:2:32 | var ... = ... | PatternBindingDecl | - |
|
||||
|
||||
@@ -6,4 +6,19 @@ var def_instantiated_generic = Generic<Int>()
|
||||
|
||||
func def_function(_: Int) -> Int { return 42 }
|
||||
|
||||
func def_function_overloaded_on_return(_: Int, _: Double) -> Int { return 0 }
|
||||
func def_function_overloaded_on_return(_: Int, _: Double) -> Double { return 0.0 }
|
||||
|
||||
func def_function_overloaded_on_parameter_type(_: Int) {}
|
||||
func def_function_overloaded_on_parameter_type(_: Double) {}
|
||||
|
||||
func def_function_overloaded_on_parameter_label(one x: Int) {}
|
||||
func def_function_overloaded_on_parameter_label(two x: Int) {}
|
||||
|
||||
func def_throwing_function(_: Int) throws {}
|
||||
func def_rethrowing_function(_: () throws -> ()) rethrows {}
|
||||
func def_async_function(_: Int) async {}
|
||||
func def_async_throwing_function(_: Int) async throws {}
|
||||
func def_async_rethrowing_function(_: () throws -> ()) async rethrows {}
|
||||
|
||||
func def_generic_function<A, B>(_: A, _: B) {}
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
| (Int) -> Int | FunctionType | def_function(_:) |
|
||||
| (Int) -> Int | FunctionType | use_function |
|
||||
| <A, B> (A, B) -> () | GenericFunctionType | def_generic_function(_:_:) |
|
||||
| <A, B> (A, B) -> () | GenericFunctionType | use_generic_function_type(_:_:) |
|
||||
| Generic<Int> | BoundGenericStructType | def_instantiated_generic, use_instantiated_generic |
|
||||
| Int | StructType | def_int, use_int |
|
||||
| (() throws -> ()) async throws -> () | FunctionType | def_async_rethrowing_function(_:) | (() throws -> ()) async throws -> () |
|
||||
| (() throws -> ()) throws -> () | FunctionType | def_rethrowing_function(_:) | (() throws -> ()) throws -> () |
|
||||
| (Double) -> () | FunctionType | def_function_overloaded_on_parameter_type(_:) | (Double) -> () |
|
||||
| (Int) -> () | FunctionType | def_function_overloaded_on_parameter_label(one:) | (Int) -> () |
|
||||
| (Int) -> () | FunctionType | def_function_overloaded_on_parameter_label(two:) | (Int) -> () |
|
||||
| (Int) -> () | FunctionType | def_function_overloaded_on_parameter_type(_:) | (Int) -> () |
|
||||
| (Int) -> Int | FunctionType | def_function(_:) | (Int) -> Int |
|
||||
| (Int) -> Int | FunctionType | use_function | (Int) -> Int |
|
||||
| (Int) async -> () | FunctionType | def_async_function(_:) | (Int) async -> () |
|
||||
| (Int) async throws -> () | FunctionType | def_async_throwing_function(_:) | (Int) async throws -> () |
|
||||
| (Int) throws -> () | FunctionType | def_throwing_function(_:) | (Int) throws -> () |
|
||||
| (Int, Double) -> Double | FunctionType | def_function_overloaded_on_return(_:_:) | (Int, Double) -> Double |
|
||||
| (Int, Double) -> Int | FunctionType | def_function_overloaded_on_return(_:_:) | (Int, Double) -> Int |
|
||||
| <A, B> (A, B) -> () | GenericFunctionType | def_generic_function(_:_:) | <\u03c4_0_0, \u03c4_0_1> (\u03c4_0_0, \u03c4_0_1) -> () |
|
||||
| <A, B> (A, B) -> () | GenericFunctionType | use_generic_function_type(_:_:) | <\u03c4_0_0, \u03c4_0_1> (\u03c4_0_0, \u03c4_0_1) -> () |
|
||||
| Generic<Int> | BoundGenericStructType | def_instantiated_generic, use_instantiated_generic | Generic<Int> |
|
||||
| Int | StructType | def_int, use_int | Int |
|
||||
|
||||
@@ -9,4 +9,4 @@ where
|
||||
|
|
||||
d.toString(), ", "
|
||||
)
|
||||
select t, t.getPrimaryQlClasses(), decls
|
||||
select t, t.getPrimaryQlClasses(), decls, t.getCanonicalType()
|
||||
|
||||
Reference in New Issue
Block a user