Skip to content

Fix _modify related issue #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,6 @@ extension AGWeakAttribute {
set {
self = AGWeakAttribute(newValue)
}
_modify {
var value = attribute
yield &value
attribute = value
}
}
}

Expand Down Expand Up @@ -179,7 +174,7 @@ public struct WeakAttribute<Value> {
public init(_ attribute: AttributeGraph.Attribute<Value>)
public init(_ attribute: AttributeGraph.Attribute<Value>?)
public var wrappedValue: Value? { get }
public var projectedValue: AttributeGraph.Attribute<Value>?{ get set _modify }
public var projectedValue: AttributeGraph.Attribute<Value>?{ get set }
public subscript<Member>(dynamicMember keyPath: Swift.KeyPath<Value, Member>) -> AttributeGraph.Attribute<Member>? { get }
public var attribute: AttributeGraph.Attribute<Value>? { get set _modify }
public var value: Value? { get }
Expand All @@ -206,7 +201,7 @@ public struct AnyOptionalAttribute {
public init<Value>(_ attribute: AttributeGraph.OptionalAttribute<Value>)
public var identifier: AGAttribute
public static var current: AttributeGraph.AnyOptionalAttribute { get }
public var attribute: AGAttribute? { get set _modify }
public var attribute: AGAttribute? { get set }
public func map<Value>(_ body: (AGAttribute) -> Value) -> Value?
public func unsafeCast<Value>(to type: Value.Type) -> AttributeGraph.OptionalAttribute<Value>
}
Expand All @@ -229,7 +224,7 @@ public struct OptionalAttribute<Value> {
public init(_ attribute: AttributeGraph.Attribute<Value>)
public init(_ attribute: AttributeGraph.Attribute<Value>?)
public init(_ weakAttribute: AttributeGraph.WeakAttribute<Value>)
public var attribute: AttributeGraph.Attribute<Value>? { get set _modify }
public var attribute: AttributeGraph.Attribute<Value>? { get set }
public var value: Value? { get }
public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool)?
public func map<V>(_ body: (AttributeGraph.Attribute<Value>) -> V) -> V?
Expand Down Expand Up @@ -264,7 +259,6 @@ public struct IndirectAttribute<Value> {
public var dependency: AGAttribute? {
get
nonmutating set
nonmutating _modify
}
public var value: Value {
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,6 @@ extension AGWeakAttribute {
set {
self = AGWeakAttribute(newValue)
}
_modify {
var value = attribute
yield &value
attribute = value
}
}
}

Expand Down Expand Up @@ -179,7 +174,7 @@ public struct WeakAttribute<Value> {
public init(_ attribute: AttributeGraph.Attribute<Value>)
public init(_ attribute: AttributeGraph.Attribute<Value>?)
public var wrappedValue: Value? { get }
public var projectedValue: AttributeGraph.Attribute<Value>?{ get set _modify }
public var projectedValue: AttributeGraph.Attribute<Value>?{ get set }
public subscript<Member>(dynamicMember keyPath: Swift.KeyPath<Value, Member>) -> AttributeGraph.Attribute<Member>? { get }
public var attribute: AttributeGraph.Attribute<Value>? { get set _modify }
public var value: Value? { get }
Expand All @@ -206,7 +201,7 @@ public struct AnyOptionalAttribute {
public init<Value>(_ attribute: AttributeGraph.OptionalAttribute<Value>)
public var identifier: AGAttribute
public static var current: AttributeGraph.AnyOptionalAttribute { get }
public var attribute: AGAttribute? { get set _modify }
public var attribute: AGAttribute? { get set }
public func map<Value>(_ body: (AGAttribute) -> Value) -> Value?
public func unsafeCast<Value>(to type: Value.Type) -> AttributeGraph.OptionalAttribute<Value>
}
Expand All @@ -229,7 +224,7 @@ public struct OptionalAttribute<Value> {
public init(_ attribute: AttributeGraph.Attribute<Value>)
public init(_ attribute: AttributeGraph.Attribute<Value>?)
public init(_ weakAttribute: AttributeGraph.WeakAttribute<Value>)
public var attribute: AttributeGraph.Attribute<Value>? { get set _modify }
public var attribute: AttributeGraph.Attribute<Value>? { get set }
public var value: Value? { get }
public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool)?
public func map<V>(_ body: (AttributeGraph.Attribute<Value>) -> V) -> V?
Expand Down Expand Up @@ -264,7 +259,6 @@ public struct IndirectAttribute<Value> {
public var dependency: AGAttribute? {
get
nonmutating set
nonmutating _modify
}
public var value: Value {
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,6 @@ extension AGWeakAttribute {
set {
self = AGWeakAttribute(newValue)
}
_modify {
var value = attribute
yield &value
attribute = value
}
}
}

Expand Down Expand Up @@ -179,7 +174,7 @@ public struct WeakAttribute<Value> {
public init(_ attribute: AttributeGraph.Attribute<Value>)
public init(_ attribute: AttributeGraph.Attribute<Value>?)
public var wrappedValue: Value? { get }
public var projectedValue: AttributeGraph.Attribute<Value>?{ get set _modify }
public var projectedValue: AttributeGraph.Attribute<Value>?{ get set }
public subscript<Member>(dynamicMember keyPath: Swift.KeyPath<Value, Member>) -> AttributeGraph.Attribute<Member>? { get }
public var attribute: AttributeGraph.Attribute<Value>? { get set _modify }
public var value: Value? { get }
Expand All @@ -206,7 +201,7 @@ public struct AnyOptionalAttribute {
public init<Value>(_ attribute: AttributeGraph.OptionalAttribute<Value>)
public var identifier: AGAttribute
public static var current: AttributeGraph.AnyOptionalAttribute { get }
public var attribute: AGAttribute? { get set _modify }
public var attribute: AGAttribute? { get set }
public func map<Value>(_ body: (AGAttribute) -> Value) -> Value?
public func unsafeCast<Value>(to type: Value.Type) -> AttributeGraph.OptionalAttribute<Value>
}
Expand All @@ -229,7 +224,7 @@ public struct OptionalAttribute<Value> {
public init(_ attribute: AttributeGraph.Attribute<Value>)
public init(_ attribute: AttributeGraph.Attribute<Value>?)
public init(_ weakAttribute: AttributeGraph.WeakAttribute<Value>)
public var attribute: AttributeGraph.Attribute<Value>? { get set _modify }
public var attribute: AttributeGraph.Attribute<Value>? { get set }
public var value: Value? { get }
public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool)?
public func map<V>(_ body: (AttributeGraph.Attribute<Value>) -> V) -> V?
Expand Down Expand Up @@ -264,7 +259,6 @@ public struct IndirectAttribute<Value> {
public var dependency: AGAttribute? {
get
nonmutating set
nonmutating _modify
}
public var value: Value {
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,6 @@ extension AGWeakAttribute {
set {
self = AGWeakAttribute(newValue)
}
_modify {
var value = attribute
yield &value
attribute = value
}
}
}

Expand Down Expand Up @@ -179,7 +174,7 @@ public struct WeakAttribute<Value> {
public init(_ attribute: AttributeGraph.Attribute<Value>)
public init(_ attribute: AttributeGraph.Attribute<Value>?)
public var wrappedValue: Value? { get }
public var projectedValue: AttributeGraph.Attribute<Value>?{ get set _modify }
public var projectedValue: AttributeGraph.Attribute<Value>?{ get set }
public subscript<Member>(dynamicMember keyPath: Swift.KeyPath<Value, Member>) -> AttributeGraph.Attribute<Member>? { get }
public var attribute: AttributeGraph.Attribute<Value>? { get set _modify }
public var value: Value? { get }
Expand All @@ -206,7 +201,7 @@ public struct AnyOptionalAttribute {
public init<Value>(_ attribute: AttributeGraph.OptionalAttribute<Value>)
public var identifier: AGAttribute
public static var current: AttributeGraph.AnyOptionalAttribute { get }
public var attribute: AGAttribute? { get set _modify }
public var attribute: AGAttribute? { get set }
public func map<Value>(_ body: (AGAttribute) -> Value) -> Value?
public func unsafeCast<Value>(to type: Value.Type) -> AttributeGraph.OptionalAttribute<Value>
}
Expand All @@ -229,7 +224,7 @@ public struct OptionalAttribute<Value> {
public init(_ attribute: AttributeGraph.Attribute<Value>)
public init(_ attribute: AttributeGraph.Attribute<Value>?)
public init(_ weakAttribute: AttributeGraph.WeakAttribute<Value>)
public var attribute: AttributeGraph.Attribute<Value>? { get set _modify }
public var attribute: AttributeGraph.Attribute<Value>? { get set }
public var value: Value? { get }
public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool)?
public func map<V>(_ body: (AttributeGraph.Attribute<Value>) -> V) -> V?
Expand Down Expand Up @@ -264,7 +259,6 @@ public struct IndirectAttribute<Value> {
public var dependency: AGAttribute? {
get
nonmutating set
nonmutating _modify
}
public var value: Value {
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,6 @@ extension AGWeakAttribute {
set {
self = AGWeakAttribute(newValue)
}
_modify {
var value = attribute
yield &value
attribute = value
}
}
}

Expand Down Expand Up @@ -179,7 +174,7 @@ public struct WeakAttribute<Value> {
public init(_ attribute: AttributeGraph.Attribute<Value>)
public init(_ attribute: AttributeGraph.Attribute<Value>?)
public var wrappedValue: Value? { get }
public var projectedValue: AttributeGraph.Attribute<Value>?{ get set _modify }
public var projectedValue: AttributeGraph.Attribute<Value>?{ get set }
public subscript<Member>(dynamicMember keyPath: Swift.KeyPath<Value, Member>) -> AttributeGraph.Attribute<Member>? { get }
public var attribute: AttributeGraph.Attribute<Value>? { get set _modify }
public var value: Value? { get }
Expand All @@ -206,7 +201,7 @@ public struct AnyOptionalAttribute {
public init<Value>(_ attribute: AttributeGraph.OptionalAttribute<Value>)
public var identifier: AGAttribute
public static var current: AttributeGraph.AnyOptionalAttribute { get }
public var attribute: AGAttribute? { get set _modify }
public var attribute: AGAttribute? { get set }
public func map<Value>(_ body: (AGAttribute) -> Value) -> Value?
public func unsafeCast<Value>(to type: Value.Type) -> AttributeGraph.OptionalAttribute<Value>
}
Expand All @@ -229,7 +224,7 @@ public struct OptionalAttribute<Value> {
public init(_ attribute: AttributeGraph.Attribute<Value>)
public init(_ attribute: AttributeGraph.Attribute<Value>?)
public init(_ weakAttribute: AttributeGraph.WeakAttribute<Value>)
public var attribute: AttributeGraph.Attribute<Value>? { get set _modify }
public var attribute: AttributeGraph.Attribute<Value>? { get set }
public var value: Value? { get }
public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool)?
public func map<V>(_ body: (AttributeGraph.Attribute<Value>) -> V) -> V?
Expand Down Expand Up @@ -264,7 +259,6 @@ public struct IndirectAttribute<Value> {
public var dependency: AGAttribute? {
get
nonmutating set
nonmutating _modify
}
public var value: Value {
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,6 @@ extension AGWeakAttribute {
set {
self = AGWeakAttribute(newValue)
}
_modify {
var value = attribute
yield &value
attribute = value
}
}
}

Expand Down Expand Up @@ -179,7 +174,7 @@ public struct WeakAttribute<Value> {
public init(_ attribute: AttributeGraph.Attribute<Value>)
public init(_ attribute: AttributeGraph.Attribute<Value>?)
public var wrappedValue: Value? { get }
public var projectedValue: AttributeGraph.Attribute<Value>?{ get set _modify }
public var projectedValue: AttributeGraph.Attribute<Value>?{ get set }
public subscript<Member>(dynamicMember keyPath: Swift.KeyPath<Value, Member>) -> AttributeGraph.Attribute<Member>? { get }
public var attribute: AttributeGraph.Attribute<Value>? { get set _modify }
public var value: Value? { get }
Expand All @@ -206,7 +201,7 @@ public struct AnyOptionalAttribute {
public init<Value>(_ attribute: AttributeGraph.OptionalAttribute<Value>)
public var identifier: AGAttribute
public static var current: AttributeGraph.AnyOptionalAttribute { get }
public var attribute: AGAttribute? { get set _modify }
public var attribute: AGAttribute? { get set }
public func map<Value>(_ body: (AGAttribute) -> Value) -> Value?
public func unsafeCast<Value>(to type: Value.Type) -> AttributeGraph.OptionalAttribute<Value>
}
Expand All @@ -229,7 +224,7 @@ public struct OptionalAttribute<Value> {
public init(_ attribute: AttributeGraph.Attribute<Value>)
public init(_ attribute: AttributeGraph.Attribute<Value>?)
public init(_ weakAttribute: AttributeGraph.WeakAttribute<Value>)
public var attribute: AttributeGraph.Attribute<Value>? { get set _modify }
public var attribute: AttributeGraph.Attribute<Value>? { get set }
public var value: Value? { get }
public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool)?
public func map<V>(_ body: (AttributeGraph.Attribute<Value>) -> V) -> V?
Expand Down Expand Up @@ -264,7 +259,6 @@ public struct IndirectAttribute<Value> {
public var dependency: AGAttribute? {
get
nonmutating set
nonmutating _modify
}
public var value: Value {
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,6 @@ extension AGWeakAttribute {
set {
self = AGWeakAttribute(newValue)
}
_modify {
var value = attribute
yield &value
attribute = value
}
}
}

Expand Down Expand Up @@ -179,7 +174,7 @@ public struct WeakAttribute<Value> {
public init(_ attribute: AttributeGraph.Attribute<Value>)
public init(_ attribute: AttributeGraph.Attribute<Value>?)
public var wrappedValue: Value? { get }
public var projectedValue: AttributeGraph.Attribute<Value>?{ get set _modify }
public var projectedValue: AttributeGraph.Attribute<Value>?{ get set }
public subscript<Member>(dynamicMember keyPath: Swift.KeyPath<Value, Member>) -> AttributeGraph.Attribute<Member>? { get }
public var attribute: AttributeGraph.Attribute<Value>? { get set _modify }
public var value: Value? { get }
Expand All @@ -206,7 +201,7 @@ public struct AnyOptionalAttribute {
public init<Value>(_ attribute: AttributeGraph.OptionalAttribute<Value>)
public var identifier: AGAttribute
public static var current: AttributeGraph.AnyOptionalAttribute { get }
public var attribute: AGAttribute? { get set _modify }
public var attribute: AGAttribute? { get set }
public func map<Value>(_ body: (AGAttribute) -> Value) -> Value?
public func unsafeCast<Value>(to type: Value.Type) -> AttributeGraph.OptionalAttribute<Value>
}
Expand All @@ -229,7 +224,7 @@ public struct OptionalAttribute<Value> {
public init(_ attribute: AttributeGraph.Attribute<Value>)
public init(_ attribute: AttributeGraph.Attribute<Value>?)
public init(_ weakAttribute: AttributeGraph.WeakAttribute<Value>)
public var attribute: AttributeGraph.Attribute<Value>? { get set _modify }
public var attribute: AttributeGraph.Attribute<Value>? { get set }
public var value: Value? { get }
public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool)?
public func map<V>(_ body: (AttributeGraph.Attribute<Value>) -> V) -> V?
Expand Down Expand Up @@ -264,7 +259,6 @@ public struct IndirectAttribute<Value> {
public var dependency: AGAttribute? {
get
nonmutating set
nonmutating _modify
}
public var value: Value {
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,6 @@ extension AGWeakAttribute {
set {
self = AGWeakAttribute(newValue)
}
_modify {
var value = attribute
yield &value
attribute = value
}
}
}

Expand Down Expand Up @@ -175,7 +170,7 @@ public struct WeakAttribute<Value> {
public init(_ attribute: AttributeGraph.Attribute<Value>)
public init(_ attribute: AttributeGraph.Attribute<Value>?)
public var wrappedValue: Value? { get }
public var projectedValue: AttributeGraph.Attribute<Value>?{ get set _modify }
public var projectedValue: AttributeGraph.Attribute<Value>?{ get set }
public subscript<Member>(dynamicMember keyPath: Swift.KeyPath<Value, Member>) -> AttributeGraph.Attribute<Member>? { get }
public var attribute: AttributeGraph.Attribute<Value>? { get set _modify }
public var value: Value? { get }
Expand All @@ -202,7 +197,7 @@ public struct AnyOptionalAttribute {
public init<Value>(_ attribute: AttributeGraph.OptionalAttribute<Value>)
public var identifier: AGAttribute
public static var current: AttributeGraph.AnyOptionalAttribute { get }
public var attribute: AGAttribute? { get set _modify }
public var attribute: AGAttribute? { get set }
public func map<Value>(_ body: (AGAttribute) -> Value) -> Value?
public func unsafeCast<Value>(to type: Value.Type) -> AttributeGraph.OptionalAttribute<Value>
}
Expand All @@ -225,7 +220,7 @@ public struct OptionalAttribute<Value> {
public init(_ attribute: AttributeGraph.Attribute<Value>)
public init(_ attribute: AttributeGraph.Attribute<Value>?)
public init(_ weakAttribute: AttributeGraph.WeakAttribute<Value>)
public var attribute: AttributeGraph.Attribute<Value>? { get set _modify }
public var attribute: AttributeGraph.Attribute<Value>? { get set }
public var value: Value? { get }
public func changedValue(options: AGValueOptions = []) -> (value: Value, changed: Bool)?
public func map<V>(_ body: (AttributeGraph.Attribute<Value>) -> V) -> V?
Expand Down Expand Up @@ -260,7 +255,6 @@ public struct IndirectAttribute<Value> {
public var dependency: AGAttribute? {
get
nonmutating set
nonmutating _modify
}
public var value: Value {
get
Expand Down
Loading