示例工程 25-c-interop

25-c-interop/Diagnostics/CdeclMethod.swift

swift · 0.2 KB

// 故意编译失败:@_cdecl 只能修饰全局函数。
// 复现:swiftc -typecheck Diagnostics/CdeclMethod.swift
struct Helper {
    @_cdecl("helper_run")
    func run() {}
}