Commit Graph

4 Commits

Author SHA1 Message Date
Nate Chandler
6efadb051d [Test] Disabled several Runtime tests for back_deployment_runtime.
rdar://76567759
2021-04-13 15:42:33 -07:00
Nate Chandler
086e4a356e [Test] Don't use os stdlib for Runtime/rdar64672291.swift. 2020-07-11 09:30:13 -07:00
Nate Chandler
c6812cee68 [Test] Mark executable test appropriately. 2020-07-10 06:21:11 -07:00
Nate Chandler
9e6d68e45b [Runtime] Let existential types satisfy superclass requirements.
Previously, when an attempt was made to instantiate a generic metadata
whose argument was constrained to subclass a superclass Super with an
existential type E that had a superclass constraint to a subclass Sub of
that same superclass Super, the instantiation would fail at runtime,
despite the fact that the generic instantiation was allowed to
type-check.

The result was a runtime failure to instantiate generic metadata
resulting eventually in a crash.

Here, handling for that situation is added.  When checking generic
requirements at runtime, when a superclass requirement is encountered,
an existential type is checked for.  If that existential type has a
superclass constraint and if that superclass constraint is a subclass of
the superclass requirement, the check is determined to be satisfactory.

rdar://problem/64672291
2020-07-02 17:19:55 -07:00