Files
codeql/swift/ql/test/library-tests/dataflow/flowsources/data.swift
2022-11-24 12:35:51 +01:00

20 lines
341 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
}