Files
swift-mirror/lib/SIL/SILDeclRef.cpp
Slava Pestov 2ae6dac96e SIL: Fix subclass scope calculation for constructors
The logic here was buggy; we would dyn_cast the decl to a FuncDecl and
return early if the cast failed; the ConstructorDecl logic had no
effect at all.

Furthermore, it was wrong, for two reasons:

- even non-required designated inits still appear in the vtable
- in the resilient case, the constructor needs public linkage unlike
  other non-final public methods, since it is referenced directly
  by subclasses when they perform a super.init() delegation

Fixes <https://bugs.swift.org/browse/SR-9939>, <rdar://problem/48403349>.
2019-02-28 13:55:02 -05:00

34 KiB