mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Infix operator completion used to crash if multiple infix operators with the same name are declared in the module. rdar://problem/48648877
31 lines
655 B
Swift
31 lines
655 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %{python} %utils/split_file.py -o %t %s
|
|
// RUN: %target-swift-ide-test -code-completion -code-completion-token=COMPLETE -source-filename=%t/main.swift %t/a.swift %t/b.swift %t/c.swift %t/d.swift
|
|
|
|
// BEGIN main.swift
|
|
func foo(x: Int, y: Int) {
|
|
x + y #^COMPLETE^#
|
|
}
|
|
|
|
// BEGIN a.swift
|
|
|
|
infix operator ***
|
|
|
|
// BEGIN b.swift
|
|
|
|
infix operator ***
|
|
|
|
// BEGIN c.swift
|
|
|
|
precedencegroup FooPrecedenceGroup {
|
|
higherThan: MultiplicationPrecedence
|
|
}
|
|
infix operator **** : FooPrecedenceGroup
|
|
|
|
// BEGIN d.swift
|
|
|
|
precedencegroup FooPrecedenceGroup {
|
|
higherThan: MultiplicationPrecedence
|
|
}
|
|
infix operator **** : FooPrecedenceGroup
|