Remove the ability to access the "0" member of a scalar.

This is a travesty that makes it hard to reason about tuple vs. scalar
types. It's only use in our own code involved dealing with the
difference in element types between Set and Dictionary in
gyb-generated code. Ewww. Fixes rdar://problem/17963034.

Swift SVN r30074
This commit is contained in:
Doug Gregor
2015-07-10 17:28:53 +00:00
parent a1a00e7a24
commit 29764dc34d
4 changed files with 10 additions and 16 deletions

View File

@@ -3047,14 +3047,6 @@ ConstraintSystem::simplifyMemberConstraint(const Constraint &constraint) {
Type rawValueType;
if (name.isSimpleName()
&& !name.getBaseName().str().getAsInteger(10, index)) {
// ".0" on a scalar just refers to the underlying scalar value.
if (index == 0) {
OverloadChoice identityChoice(baseTy, OverloadChoiceKind::BaseType);
addBindOverloadConstraint(memberTy, identityChoice,
constraint.getLocator());
return SolutionKind::Solved;
}
recordFailure(constraint.getLocator(), Failure::DoesNotHaveMember,
baseObjTy, name);