Files
swift-mirror/test/SourceKit/Misc/embedded_no_wmo.swift
Erik Eckstein 9360c76cd8 Fix a SourceKitCrash in the VTableSpecializer pass
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
2024-07-03 17:13:53 +02:00

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)
}