Files
swift-mirror/test/decl/func/default-values-swift4.swift
Allan Shortlidge b9262e5297 Sema: Allow default arguments to access @usableFromInline decls.
The restriction that default arguments be disallowed from accessing
`@usableFromInline` decls is overbearing for library developers who need to
write non-trivial code to compute a default value, since it forces them to
either write a verbose closure inline in the function signature or expose a
`public` helper function which unnecessarily expands API surface. A
`@usableFromInline` function a more reasonable way to encapsulate a verbose
default value computation.

This reverses the semantic changes included in https://github.com/apple/swift/pull/15666.

Resolves rdar://112093794.
2023-07-12 12:47:06 -07:00

5.0 KiB