mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
28 lines
921 B
C++
28 lines
921 B
C++
// RUN: %empty-directory(%t)
|
|
|
|
// RUN: %target-swift-frontend %S/generic-struct-in-cxx.swift -typecheck -module-name Generics -clang-header-expose-public-decls -emit-clang-header-path %t/generics.h
|
|
|
|
// RUN: %target-interop-build-clangxx -std=gnu++20 -c %s -I %t -o %t/swift-generics-execution.o
|
|
// RUN: %target-interop-build-swift %S/generic-struct-in-cxx.swift -o %t/swift-generics-execution -Xlinker %t/swift-generics-execution.o -module-name Generics -Xfrontend -entry-point-function-name -Xfrontend swiftMain
|
|
|
|
// RUN: %target-codesign %t/swift-generics-execution
|
|
// RUN: %target-run %t/swift-generics-execution | %FileCheck %s
|
|
|
|
// REQUIRES: executable_test
|
|
|
|
#include <cassert>
|
|
#include "generics.h"
|
|
|
|
extern "C" void puts(const char *);
|
|
|
|
int main() {
|
|
using namespace Generics;
|
|
|
|
auto x = _impl::_impl_GenericPair<int, int>::returnNewValue([] (void *p) {
|
|
// nada.
|
|
});
|
|
puts("no\n");
|
|
// CHECK: no
|
|
return 0;
|
|
}
|