Programming Search⌘K

Swift errors and diagnostics, page 16 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.

Result builder must provide at least one static 'buildPartialBlock(accumulated:next:)' as accessible as result builder type … (which is …). result_builder_buildpartialblock_accumulated_not_accessible

Code
result_builder_buildpartialblock_accumulated_not_accessible
Severity
error
Message
result builder must provide at least one static 'buildPartialBlock(accumulated:next:)' as accessible as result builder type {} (which is {})

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

Result builder … does not implement any 'buildBlock' or a combination of 'buildPartialBlock(first:)' and 'buildPartialBlock(accumulated:next:)' with sufficient availability for this call site. result_builder_missing_available_buildpartialblock

The compiler puts it in the diagnostic group ResultBuilderMethods.

Code
result_builder_missing_available_buildpartialblock
Severity
error
Message
result builder {} does not implement any 'buildBlock' or a combination of 'buildPartialBlock(first:)' and 'buildPartialBlock(accumulated:next:)' with sufficient availability for this call site

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

Result builder must provide at least one static 'buildBlock' method, or both 'buildPartialBlock(first:)' and 'buildPartialBlock(accumulated:next:)'. result_builder_static_buildblock_or_buildpartialblock

The compiler puts it in the diagnostic group ResultBuilderMethods.

Code
result_builder_static_buildblock_or_buildpartialblock
Severity
error
Message
result builder must provide at least one static 'buildBlock' method, or both 'buildPartialBlock(first:)' and 'buildPartialBlock(accumulated:next:)'

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

Returning the non-'Copyable' value of a pattern binding from a switch that borrows by default; the switch will be performed as a consume for compatibility for now, but this will require an explicit 'switch consume' in the future. return_borrowing_switch_binding

Code
return_borrowing_switch_binding
Severity
warning
Message
returning the non-'Copyable' value of a pattern binding from a switch that borrows by default; the switch will be performed as a consume for compatibility for now, but this will require an explicit 'switch consume' in the future

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

… should not be annotated with SWIFT_RETURNS_RETAINED or SWIFT_RETURNS_UNRETAINED because it is not returning a SWIFT_SHARED_REFERENCE type. returns_retained_or_returns_unretained_for_non_cxx_frt_values

Code
returns_retained_or_returns_unretained_for_non_cxx_frt_values
Severity
warning
Message
{} should not be annotated with SWIFT_RETURNS_RETAINED or SWIFT_RETURNS_UNRETAINED because it is not returning a SWIFT_SHARED_REFERENCE type

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

SWIFT_RETURNS_RETAINED and SWIFT_RETURNS_UNRETAINED is not supported yet for overloaded C++ …. Overloaded C++ operators always return SWIFT_SHARED_REFERENCE types as owned. returns_retained_returns_unretained_on_overloaded_operator

The compiler puts it in the diagnostic group ClangDeclarationImport.

Code
returns_retained_returns_unretained_on_overloaded_operator
Severity
warning
Message
SWIFT_RETURNS_RETAINED and SWIFT_RETURNS_UNRETAINED is not supported yet for overloaded C++ {}. Overloaded C++ operators always return SWIFT_SHARED_REFERENCE types as owned

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

Class … cannot inherit from … in Embedded Swift because a generic argument of the superclass refers to the subclass itself, creating a circular metadata dependency. self_referential_superclass_in_embedded_swift

The compiler puts it in the diagnostic group EmbeddedRestrictions.

Code
self_referential_superclass_in_embedded_swift
Severity
error
Message
class {} cannot inherit from {} in Embedded Swift because a generic argument of the superclass refers to the subclass itself, creating a circular metadata dependency

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

'…' is either malformed or generated by a different Swift version. Note that it uses an unstable format and may leak internal project details, it should not be distributed alongside modules. serialization_malformed_sourceinfo

Code
serialization_malformed_sourceinfo
Severity
warning
Message
'{}' is either malformed or generated by a different Swift version. Note that it uses an unstable format and may leak internal project details, it should not be distributed alongside modules

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

The binary module for … was compiled for '…', it cannot be imported by the current compiler which is aligned with '…'. Binary module loaded from path: …. serialization_module_incompatible_channel

Code
serialization_module_incompatible_channel
Severity
error
Message
the binary module for {} was compiled for '{}', it cannot be imported by the current compiler which is aligned with '{}'. Binary module loaded from path: {}

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

Serializing abstract layout for hidden type … because its defining module was imported with '@_implementationOnly' and it contributes to the ABI-exposed layout of … through …. serialization_scheduled_implementation_only_hidden_type_layout

Code
serialization_scheduled_implementation_only_hidden_type_layout
Severity
remark
Message
serializing abstract layout for hidden type {} because its defining module was imported with '@_implementationOnly' and it contributes to the ABI-exposed layout of {} through {}

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

Serializing abstract layout for hidden type … because it was imported through '-internal-import-bridging-header' and contributes to the ABI-exposed layout of … through …. serialization_scheduled_internal_bridging_header_hidden_type_layout

Code
serialization_scheduled_internal_bridging_header_hidden_type_layout
Severity
remark
Message
serializing abstract layout for hidden type {} because it was imported through '-internal-import-bridging-header' and contributes to the ABI-exposed layout of {} through {}

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

Serializing abstract layout for hidden type … because it was recovered from a hidden type representation and contributes to the ABI-exposed layout of … through …. serialization_scheduled_recovered_hidden_type_layout

Code
serialization_scheduled_recovered_hidden_type_layout
Severity
remark
Message
serializing abstract layout for hidden type {} because it was recovered from a hidden type representation and contributes to the ABI-exposed layout of {} through {}

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