Files
codeql/swift/ql/test/library-tests/dataflow/flowsources/data.swift
2023-02-20 13:57:24 +00:00

20 lines
350 B
Swift

// --- stubs ---
struct URL
{
init?(string: String) {}
}
struct Data {
struct ReadingOptions : OptionSet { let rawValue: Int }
init(contentsOf: URL, options: ReadingOptions) {}
}
// --- tests ---
func testData() {
let url = URL(string: "http://example.com/")
let data = try Data(contentsOf: url!, options: []) // $ source=remote
}