[AutoDiff] Crash when protocol conditional conformance to Differentiable is missed #78370
Labels
AutoDiff
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler itself
conformances
Feature → protocol: protocol conformances
crash
Bug: A crash, i.e., an abnormal termination of software
failed to produce diagnostic
Bug → internal error: Failed to produce diagnostic for expression
type checker
Area → compiler: Semantic analysis
Description
With
where Self : Differentiable
commented out in the reproducer below, we get a crash. When uncommented, the code compiles with no issues. See also #77446 (comment)Reproduction
Stack dump
Expected behavior
Emit an error like the following (
autodiff_attr_result_not_differentiable
)Environment
Swift version 6.2-dev
Additional information
No response
The text was updated successfully, but these errors were encountered: