Compiler crash when mixing opaque result types, variadic types, and conditional conformances #70429
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler itself
conditional conformances
Feature → protocol → conformances: conditional conformances
conformances
Feature → protocol: protocol conformances
crash
Bug: A crash, i.e., an abnormal termination of software
generics
Feature: generic declarations and types
mangling
Area → compiler: Mangling
opaque result types
Feature → types → opaque types: opaque result types
opaque types
Feature → types: opaque types
parameter packs
Feature → generics: Parameter packs
swift 5.9
Description
I am building a small ProseMirror-like library in Swift. I decide to make heavy usage of variadic types, result builders, and opaque result types to make text definition as easy as possible to the user.
However, I have been confronting multiple issues when building even the smallest project. I've already raised a couple of issues:
This crash doesn't, however, have a simple reproduction, so I have attached the SPM project here (the package is still very small). Also, the project serves for the issues previously raised.
Reproduction
You can find the SPM package here:
textNodes.zip
I have managed to put all the affected code in the following block. I recommend to open the SPM package better. In any case, if you prefer the code Snippet below, you will find that the compiler crashes just by building the code. You can successfully build by commenting lines 85 and 87.
Stack dump
Expected behavior
Be able to use opaque return types in the
MarkdownSchema
and obviously not having the crash. I want to be able to write something like:Environment
swift-driver version: 1.87.3 Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
Target: arm64-apple-macosx14.0
Additional information
No response
The text was updated successfully, but these errors were encountered: