mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Replace the assert-check if a vtable is available with a regular error message. This cannot occur in regular builds - only if built with embedded swift and without wmo. The command line compiler prevents this combination, but it can happen in SourceKit. rdar://130167087
27 lines
542 B
Swift
27 lines
542 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: split-file %s %t
|
|
|
|
// TODO: This test passes locally on my machine, but fails for an unknown reason in CI
|
|
// REQUIRES: rdar130167087
|
|
|
|
//--- secondary.swift
|
|
|
|
final public class X<T> {
|
|
var x: T
|
|
|
|
init(_ t: T) { x = t}
|
|
|
|
public func foo() -> T { x }
|
|
}
|
|
|
|
//--- primary.swift
|
|
|
|
// RUN: %sourcekitd-test -req=diags %t/primary.swift -- %t/primary.swift %t/secondary.swift -enable-experimental-feature Embedded
|
|
|
|
// check that SourceKit does not crash on this
|
|
|
|
public func testit() -> X<Int> {
|
|
return X(27)
|
|
}
|
|
|