Files
swift-mirror/test/decl/protocol/special/JSExport.swift
Doug Gregor b947a47a5d [AST] Reimplement ProtocolDecl::getInheritedProtocols() on decl name lookup.
Use the declaration-based name lookup facilities to re-implement
ProtocolDecl::getInheritedProtocols(), rather than dynamically selecting
between the requirement signature and the inherited types. This reduces
dependencies for this computation down to basic name lookup (no semantic
analysis) and gives us a stable result.
2018-08-06 16:12:09 -07:00

22 lines
829 B
Swift

// RUN: %target-typecheck-verify-swift
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/abi %s -emit-ir | %FileCheck %s
// REQUIRES: objc_interop
import Foundation
@objc protocol JSExport { }
@objc protocol RootJSExport : JSExport { }
// CHECK: @_PROTOCOL_PROTOCOLS__TtP8JSExport4Sub1_ = private constant{{.*}}_PROTOCOL__TtP8JSExport8JSExport_{{.*}}_PROTOCOL__TtP8JSExport12RootJSExport_
@objc protocol Sub1 : JSExport, RootJSExport { }
// CHECK: @_PROTOCOL_PROTOCOLS__TtP8JSExport4Sub2_{{.*}}_PROTOCOL__TtP8JSExport4Sub1_{{.*}}_PROTOCOL__TtP8JSExport8JSExport_
@objc protocol Sub2 : Sub1, JSExport { }
// CHECK: @_PROTOCOL_PROTOCOLS__TtP8JSExport4Sub3_ = private constant{{.*}}@_PROTOCOL__TtP8JSExport4Sub2_
@objc protocol Sub3 : Sub2 { }
protocol ReexportJSExport : RootJSExport, JSExport { }