mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user