Skip to content

[SR-4818] We have masking shift-assignment operators, but not other masking assignment operators #47395

@dabrahams

Description

@dabrahams
Previous ID SR-4818
Radar rdar://problem/32035586
Original Reporter @dabrahams
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug
Assignee rockbruno (JIRA)
Priority Medium

md5: 4c0dbf90f8b9eddf6e613c8116792360

Issue Description:

(swift) x &<<= 3 // OK
(swift) var x = 88
x// x : Int = 88
(swift) x &-= 3
<REPL Input>:1:3: error: use of unresolved operator '&-='
x &-= 3
  ^~~
Swift.&=:8:13: note: did you mean '&='?
public func &=<T>(lhs: inout T, rhs: T) where T : _BitwiseOperations
            ^

This is inconsistent and should be fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.standard libraryArea: Standard library umbrella

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions