Files
swift-mirror/test/DynamicLookup/objc.swift
Jordan Rose 49d8b2c584 Add ClangImporter results to dynamic class member lookup.
Caveats / TODOs:
- Since we're using the global method pool, this isn't scoped by module.
  We could do a per-module filter, but I don't know if that will actually
  buy us much.
- Clang's method pool does not include methods from protocols.
- This requires importing every single method found into Swift's AST just
  to print them in the completion results.

Swift SVN r7329
2013-08-19 18:54:31 +00:00

22 lines
650 B
Swift

// RUN: %swift-ide-test -dynamic-lookup-completion -source-filename %s > %t.txt
// RUN: FileCheck %s < %t.txt
// RUN: FileCheck %s -check-prefix=NEGATIVE < %t.txt
// REQUIRES: sdk
import ObjectiveC
// CHECK: Begin members
// CHECK-DAG: func [objc] class() -> Class
// CHECK-DAG: func [objc] performSelector(aSelector : SEL) -> id
// CHECK-DAG: func [objc] conformsToProtocol(aProtocol : Protocol) -> Bool
// CHECK-DAG: func [objc] isKindOfClass(aClass : Class) -> Bool
// CHECK: End members
// No class functions
// NEGATIVE-NOT: isSubclassOfClass
// Nothing marked unavailable
// NEGATIVE-NOT: [objc] retain()
// NEGATIVE-NOT: [objc] release()