Skip to content

Commit

Permalink
Experiment with objcMembers attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
ikesyo committed Sep 4, 2017
1 parent a672e7a commit f5e7b04
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions Sources/Quick/Callsite.swift
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
import Foundation

#if swift(>=3.2) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE
@objcMembers
public class _CallsiteBase: NSObject {}
#else
public class _CallsiteBase: NSObject {}
#endif

/**
An object encapsulating the file and line number at which
a particular example is defined.
*/
final public class Callsite: NSObject {
final public class Callsite: _CallsiteBase {
/**
The absolute path of the file in which an example is defined.
*/
#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE
@objc
public let file: String
#else
public let file: String
#endif

/**
The line number on which an example is defined.
*/
#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE
@objc
public let line: UInt
#else
public let line: UInt
#endif

internal init(file: String, line: UInt) {
self.file = file
Expand Down

0 comments on commit f5e7b04

Please sign in to comment.