Open BradLarson opened 2 years ago
@slavapestov - Based on your comments in #60364, you indicate that this wasn't working prior to the new diagnostic that now appears in this case. While we did see problems with circular references (with the same error as described in #60373) immediately prior to this new diagnostic, we have been able to use extensions to synthesized TangentVector types up until a few weeks ago. Should that never have worked to begin with, and we should not attempt to do this, or is the appearance of circular references for extensions to synthesized TangentVectors a more recent phenomenon that could be fixed?
Still an issue with the 05/24 toolchain.
Describe the bug Starting in roughly July, synthesized TangentVectors for Differentiable types can no longer be extended. Initially, these caused an assertion failure, then an error for a circular reference, and now (after PR #60373) they state that "Non-nominal type 'TestCase.TangentVector' cannot be extended". See below for a one-file reproducer.
Steps To Reproduce Place the following in a single file:
and build using
swiftc test.swift
.Expected behavior Prior to ~July, the above code built cleanly. Nightly toolchain snapshots since then do not build this correctly.
Environment (please fill out the following information)
Both macOS and Linux, Swift nightly toolchain snapshots since July (latest tested: 2022-08-06)