Files
swift-mirror/test/Constraints/sr7098.swift
Mark Lacey c2b1d0388d Swap two conditions to get dynamically looked-up optional requirements working.
This function (and getTypeOfMemberReference) deserve a deeper cleanup,
but for the moment lets unblock a compatibility test.

Fixes SR-7098 / rdar://problem/38394645
2018-04-10 15:06:36 -07:00

14 lines
306 B
Swift

// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s
// REQUIRES: objc_interop
import Foundation
class C : NSObject, NSWobbling {
func wobble() {}
func returnMyself() -> Self { return self }
}
func testDynamicOptionalRequirement(_ a: AnyObject) {
a.optionalRequirement?()
}