Skip to content

[SR-12873] False Differentiable derived conformance warning on class property wrappers #55320

@rxwei

Description

@rxwei
Previous ID SR-12873
Radar rdar://problem/63577692
Original Reporter @rxwei
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee @rxwei
Priority Medium

md5: 4186bdb8cf9a6aa38a3a1345bb00e940

relates to:

  • SR-13071 False Differentiable derived conformance warning on @differentiable wrapped properties

Issue Description:

@propertyWrapper
class Wrapper {
    var wrappedValue: Float

    init(wrappedValue: Float) {
        self.wrappedValue = wrappedValue
    }
}

import _Differentiation

struct Foo: Differentiable {
    @Wrapper
    var x: Float
}
test.swift:13:5: warning: synthesis of the 'Differentiable.move(along:)' requirement for 'Foo' requires all stored properties not marked with `@noDerivative` to be mutable; add an explicit '@noDerivative' attribute
    @Wrapper
    ^

Metadata

Metadata

Assignees

Labels

bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itself

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions