Commit Graph

2 Commits

Author SHA1 Message Date
Priyansh Prajapat
4e3cd3a515 fix: typo in delayed_functions.swift from intializers to initializers 2023-10-31 12:55:47 +05:30
Hamish Knight
8bc80c146a [SILGen] Avoid delaying functions with user-written code
Previously we would delay the emission of
lazy variable getters and stored property
initializers for property wrapper backing storage.
This could lead to their definitions being dropped
if unused, meaning that we wouldn't run the
mandatory diagnostics passes over them.

Fix the logic such that we consider such cases as
having user-written code, and account for a couple
of cases where we can delay emission where we
didn't previously. There are more cases we can
handle here, but I'm leaving that as future work
for now, as `emitOrDelayFunction` is currently
only used for a handful of SILDeclRef kinds.

This is a source breaking change, but only for
invalid (albeit unused) code.

rdar://99962285
2022-09-28 16:11:12 +01:00