Files
swift-mirror/test/attr/Inputs/dynamicReplacementB.swift
Doug Gregor 5d968621d7 [Type checker] Basic ambiguity resolution + diagnostics for dynamic replacement.
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.
2018-12-21 11:47:59 -08:00

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 "" }
}