mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The value-to-optional and optional-to-optional conversions
are subtype conversions. Swift SVN r12843
This commit is contained in:
@@ -889,7 +889,7 @@ ConstraintSystem::matchTypes(Type type1, Type type2, TypeMatchKind kind,
|
||||
// that there is no implicit conversion from T? to @unchecked T?.
|
||||
{
|
||||
BoundGenericType *boundGenericType2;
|
||||
if (concrete && kind >= TypeMatchKind::Conversion &&
|
||||
if (concrete && kind >= TypeMatchKind::Subtype &&
|
||||
(boundGenericType2 = type2->getAs<BoundGenericType>())) {
|
||||
auto decl2 = boundGenericType2->getDecl();
|
||||
if (auto optionalKind2 = decl2->classifyAsOptionalType()) {
|
||||
|
||||
Reference in New Issue
Block a user