Files
swift-mirror/test/ClangImporter/no-nsobject-protocol.swift
Alexis Laferrière cf526b4ada ClangImporter: don't transform NSObject<...> when there's no NSObject protocol
If there is no NSObject protocol, skip a special case when importing
types like `NSObject <NSCopying>` that converts them to
`id <NSObject, NSCopying>`.

Fix rdar://problem/34597302
2019-09-27 20:23:52 -07:00

10 lines
266 B
Swift

/// Don't crash when there's no NSObject protocol.
/// rdar://problem/34597302
// RUN: %target-swift-frontend -typecheck %s -import-objc-header %S/Inputs/no-nsobject-protocol.h -enable-objc-interop
var a = Bar()!
var b = a.barFunc()!;
b.nsobjectFunc()
b.fooFunc()