Programming Search⌘K

Swift errors and diagnostics, page 15 of 20

The error codes and warnings of Swift, with the message that each one prints and what causes it. This page has 3,841 cards.

Performance: declaration uses an existential, leading to heap allocation, reference counting, and dynamic dispatch. Consider using generic constraints or concrete types instead. perf_hint_any_pattern_uses_existential

The compiler puts it in the diagnostic group ExistentialType.

Code
perf_hint_any_pattern_uses_existential
Severity
warning
Message
Performance: declaration uses an existential, leading to heap allocation, reference counting, and dynamic dispatch. Consider using generic constraints or concrete types instead.

Source: github.com. JSON record. This entry is a card. Help write this page.

Performance: closure returns an existential, leading to heap allocation, reference counting, and dynamic dispatch. Consider using generic constraints or concrete types instead. perf_hint_closure_returns_existential

The compiler puts it in the diagnostic group ExistentialType.

Code
perf_hint_closure_returns_existential
Severity
warning
Message
Performance: closure returns an existential, leading to heap allocation, reference counting, and dynamic dispatch. Consider using generic constraints or concrete types instead.

Source: github.com. JSON record. This entry is a card. Help write this page.

Performance: … returns an existential, leading to heap allocation, reference counting, and dynamic dispatch. Consider using generic constraints or concrete types instead. perf_hint_func_returns_existential

The compiler puts it in the diagnostic group ExistentialType.

Code
perf_hint_func_returns_existential
Severity
warning
Message
Performance: {} returns an existential, leading to heap allocation, reference counting, and dynamic dispatch. Consider using generic constraints or concrete types instead.

Source: github.com. JSON record. This entry is a card. Help write this page.

Performance: … aliases an existential type, leading to heap allocation, reference counting, and dynamic dispatch. Consider using generic constraints or concrete types instead. perf_hint_typealias_uses_existential

The compiler puts it in the diagnostic group ExistentialType.

Code
perf_hint_typealias_uses_existential
Severity
warning
Message
Performance: {} aliases an existential type, leading to heap allocation, reference counting, and dynamic dispatch. Consider using generic constraints or concrete types instead.

Source: github.com. JSON record. This entry is a card. Help write this page.

Performance: … uses an existential, leading to heap allocation, reference counting, and dynamic dispatch. Consider using generic constraints or concrete types instead. perf_hint_var_uses_existential

The compiler puts it in the diagnostic group ExistentialType.

Code
perf_hint_var_uses_existential
Severity
warning
Message
Performance: {} uses an existential, leading to heap allocation, reference counting, and dynamic dispatch. Consider using generic constraints or concrete types instead.

Source: github.com. JSON record. This entry is a card. Help write this page.

Argument of type … can not be passed as an argument to a Polymorphic builtin. Polymorphic builtins can only be passed arguments that are trivial builtin typed. polymorphic_builtin_passed_non_trivial_non_builtin_type

Code
polymorphic_builtin_passed_non_trivial_non_builtin_type
Severity
error
Message
Argument of type {} can not be passed as an argument to a Polymorphic builtin. Polymorphic builtins can only be passed arguments that are trivial builtin typed

Source: github.com. JSON record. This entry is a card. Help write this page.

Conformance of … to protocol … conflicts with that stated in … module … and will be ignored; there cannot be more than one conformance, even with different conditional bounds. redundant_conformance_adhoc_conditional

Code
redundant_conformance_adhoc_conditional
Severity
warning
Message
conformance of {} to protocol {} conflicts with that stated in {} module {} and will be ignored; there cannot be more than one conformance, even with different conditional bounds

Source: github.com. JSON record. This entry is a card. Help write this page.

… cannot be returned. regionbasedisolation_inout_sending_cannot_be_returned_value

The compiler puts it in the diagnostic group RegionIsolation.

Code
regionbasedisolation_inout_sending_cannot_be_returned_value
Severity
error
Message
{} cannot be returned

Source: github.com. JSON record. This entry is a card. Help write this page.

'inout sending' parameters … and … can be potentially accessed from each other at function return risking data races in caller. regionbasedisolation_inout_sending_in_same_region

The compiler puts it in the diagnostic group RegionIsolation.

Code
regionbasedisolation_inout_sending_in_same_region
Severity
error
Message
'inout sending' parameters {} and {} can be potentially accessed from each other at function return risking data races in caller

Source: github.com. JSON record. This entry is a card. Help write this page.

Mutable … cannot be captured by 'sending' @autoclosure parameter because … is accessed later in the current task. regionbasedisolation_sent_autoclosure_captures_mutable_var

The compiler puts it in the diagnostic group SendingRisksDataRace.

Code
regionbasedisolation_sent_autoclosure_captures_mutable_var
Severity
error
Message
mutable {} cannot be captured by 'sending' @autoclosure parameter because {} is accessed later in the current task

Source: github.com. JSON record. This entry is a card. Help write this page.

Closure passed as an argument to a 'sending' parameter captures reference to mutable … which is accessed later by code in the current isolation context. regionbasedisolation_sent_closure_captures_mutable_var

The compiler puts it in the diagnostic group SendingRisksDataRace.

Code
regionbasedisolation_sent_closure_captures_mutable_var
Severity
error
Message
closure passed as an argument to a 'sending' parameter captures reference to mutable {} which is accessed later by code in the current isolation context

Source: github.com. JSON record. This entry is a card. Help write this page.

Closure passed as an argument to a 'sending' parameter captures … which is accessed later by code in the current isolation context. regionbasedisolation_sent_closure_captures_value

The compiler puts it in the diagnostic group SendingRisksDataRace.

Code
regionbasedisolation_sent_closure_captures_value
Severity
error
Message
closure passed as an argument to a 'sending' parameter captures {} which is accessed later by code in the current isolation context

Source: github.com. JSON record. This entry is a card. Help write this page.

Passing closure as a 'sending' parameter risks causing data races between … and concurrent execution of the closure. regionbasedisolation_typed_tns_passed_sending_closure

The compiler puts it in the diagnostic group SendingClosureRisksDataRace.

Code
regionbasedisolation_typed_tns_passed_sending_closure
Severity
error
Message
passing closure as a 'sending' parameter risks causing data races between {} and concurrent execution of the closure

Source: github.com. JSON record. This entry is a card. Help write this page.