 import Foundation
 
 // CHECK-LABEL: provides-dynamic-lookup:
+// DUPLICATE-LABEL: provides-dynamic-lookup:
 
 @objc @objcMembers class Base : NSObject {
   // CHECK-DAG: - "foo"
   func foo() {}
 
   // CHECK-DAG: - "bar"
+  // DUPLICATE-NOT: "bar"
+  // DUPLICATE: - "bar"
+  // DUPLICATE-NOT: "bar"
   func bar(_ x: Int, y: Int) {}
-  
-  // FIXME: We don't really need this twice, but de-duplicating is effort.
-  // CHECK-DAG: - "bar"
   func bar(_ str: String) {}
     
   // CHECK-DAG: - "prop"


func getAnyObject() -> AnyObject? { return nil }

// CHECK-LABEL: depends-dynamic-lookup:

func testDynamicLookup(_ obj: AnyObject) {

// RUN: %empty-directory(%t)
// RUN: cp %s %t/main.swift
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -primary-file %t/main.swift -emit-reference-dependencies-path - > %t.swiftdeps
// RUN: %FileCheck %s < %t.swiftdeps
// RUN: %FileCheck -check-prefix=NEGATIVE %s < %t.swiftdeps
// RUN: %FileCheck -check-prefix=DUPLICATE %s < %t.swiftdeps

// Check that the output is deterministic.
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -primary-file %t/main.swift -emit-reference-dependencies-path - > %t-2.swiftdeps
