mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
We weren't doing much validation when dynamically replacing storage declarations, and has an assert() that should be an error. Clean up this area a bit, dealing with simple ambiguities (i.e., there are two properties or subscripts with different type signatures; pick the matching one) and reporting an error when there is a true ambiguity. Fixes rdar://problem/46737657.
10 lines
234 B
Swift
10 lines
234 B
Swift
import A
|
|
|
|
public extension TheReplaceables {
|
|
dynamic var property1: Int { return 0 }
|
|
dynamic var property2: Int { return 0 }
|
|
|
|
dynamic subscript (i: Int) -> Int { return 0 }
|
|
dynamic subscript (i: Int) -> String { return "" }
|
|
}
|