Files
swift-mirror/test/SILGen/vtable_implementation_only.swift
Slava Pestov fc810e1205 SILGen: Relax assertion about missing vtable entries in a class
Since resilient class metadata is built at runtime, we don't actually
care if there are missing vtable entries. The restriction was relaxed
in Sema in 9117c5728a, but SILGen still
had an assertion here.

Add a test and relax the assertion.

Fixes <rdar://problem/58644615>.
2020-02-10 19:28:11 -05:00

37 lines
1.0 KiB
Swift

// RUN: %empty-directory(%t)
// For convenience, this file includes the three different "files" used in this
// test. It selects one with -DCoreDishwasher, -DDishwasherKit, or neither.
// RUN: %target-swift-frontend -emit-module %s -DCoreDishwasher -module-name CoreDishwasher -o %t/CoreDishwasher -emit-module-path %t/CoreDishwasher.swiftmodule -I %t
// RUN: %target-swift-frontend -emit-module %s -DDishwasherKit -module-name DishwasherKit -o %t/DishwasherKit -emit-module-path %t/DishwasherKit.swiftmodule -enable-library-evolution -I %t
// RUN: %target-swift-frontend -emit-silgen -I %t %s
#if CoreDishwasher
public struct SpimsterWicket {
public init() {}
}
#elseif DishwasherKit
@_implementationOnly import CoreDishwasher
open class Dishwasher {
public init() {}
var wicket = SpimsterWicket()
open var modelName: String { "Dishwasher" }
}
#else
import DishwasherKit
open class FancyDishwasher: Dishwasher {
open override var modelName: String { "Fancy \(super.modelName)" }
}
#endif