mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Textual module interfaces don't actually depend on SILGen, so we shouldn't need to run SILGen (or serialize an entire binary module) if we're just trying to emit a textual interface. On the other hand, if we /are/ going to run SILGen and then SIL diagnostics, we shouldn't delay those diagnostics by spending time emitting a textual interface, or for that matter a TBD file. Using this, update all the ModuleInterface tests that use `-emit-module -o /dev/null` to use `-typecheck` instead, except for those using `-merge-modules`.
21 lines
744 B
Swift
21 lines
744 B
Swift
// RUN: %target-swift-frontend-typecheck -emit-interface-path %t.swiftinterface %s
|
|
// RUN: %FileCheck %s < %t.swiftinterface
|
|
// RUN: %FileCheck -check-prefix NEGATIVE %s < %t.swiftinterface
|
|
|
|
// CHECK-LABEL: public protocol SimpleProto {
|
|
public protocol SimpleProto {
|
|
// CHECK: associatedtype Element
|
|
associatedtype Element
|
|
// CHECK: associatedtype Inferred
|
|
associatedtype Inferred
|
|
func inference(_: Inferred)
|
|
} // CHECK: {{^}$}}
|
|
|
|
// CHECK-LABEL: public struct SimplImpl<Element> : SimpleProto {
|
|
public struct SimplImpl<Element>: SimpleProto {
|
|
// NEGATIVE-NOT: typealias Element =
|
|
// CHECK: public func inference(_: Int){{$}}
|
|
public func inference(_: Int) {}
|
|
// CHECK: public typealias Inferred = Swift.Int
|
|
} // CHECK: {{^}$}}
|