Files
swift-mirror/test/SourceKit/Misc/Inputs/errors-b.swift
Ben Barham 241559dc88 [Serialization] Add an option to output modules regardless of errors
Adds a new frontend option
"-experimental-allow-module-with-compiler-errors". If any compilation
errors occur while generating the .swiftmodule, this mode will skip SIL
entirely and only serialize the (likey invalid) AST.

This existence of this option during generation is serialized into the
resulting .swiftmodule. Errors found in deserialization are only allowed
if it is set.

Primarily intended for IDE requests (eg. indexing and code completion)
to ensure robust cross-module results, despite possible errors.

Resolves rdar://69815975
2020-11-10 14:47:22 +10:00

29 lines
875 B
Swift

public func invalidFuncBody() { undefined }
public func invalidFuncSignature(undefined '' undefined) {}
public func invalidFuncThrows() throws -> undefined { throw undefined }
public func invalidFuncType() -> undefined {}
public func invalidGenericFuncBody<T>(param: T) -> T { undefined }
public func invalidGenericFuncType<T>(param: T) -> undefined {}
public let invalidGlobalClosureBody = { arg -> Int in
undefined
}
public let invalidGlobalClosureType = { -> in }
public let invalidGlobalKeypath = InvalidStruct\.undefined
public let invalidGlobalMissingInit: String =
public func invalidPartialFunc
public func typeUsesFunc(pe: InvalidEnum, pa: InvalidAlias,
pp: InvalidProtocol, ps: InvalidStruct,
pg: GenericInvalidStruct<InvalidStruct, InvalidStruct>,
pc: InvalidClass) -> Int {}