Files
swift-mirror/test/multifile/objc_selector_conflict_multifile.swift
Slava Pestov 140bfd6b2f Sema: Fix infinite loop in OrderDeclarations::operator()
If the two declarations were in different source files, we would get
stuck in the while loop at the end.

Fixes rdar://164519548.
2025-11-21 21:46:19 -05:00

14 lines
404 B
Swift

// RUN: %target-typecheck-verify-swift %S/Inputs/objc_selector_conflict_multifile_other.swift
// REQUIRES: objc_interop
import Foundation
class EmitTest {}
extension EmitTest {
@objc static func emit(_ string : String) -> String {
// expected-error@-1 {{method 'emit' with Objective-C selector 'emit:' conflicts with previous declaration with the same Objective-C selector}}
return ""
}
}