Implement SE-0117.

One minor revision: this lifts the proposed restriction against
overriding a non-open method with an open one.  On reflection,
that was inconsistent with the existing rule permitting non-public
methods to be overridden with public ones.  The restriction on
subclassing a non-open class with an open class remains, and is
in fact consistent with the existing access rule.
This commit is contained in:
John McCall
2016-07-29 14:49:04 -07:00
parent 328866ace9
commit afdda3d107
67 changed files with 1234 additions and 903 deletions

View File

@@ -274,6 +274,7 @@ static SILFunction::ClassVisibility_t getClassVisibility(SILDeclRef constant) {
case Accessibility::Internal:
return SILFunction::InternalClass;
case Accessibility::Public:
case Accessibility::Open:
return SILFunction::PublicClass;
}
}