-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Open
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfdiagnostics QoIBug: Diagnostics Quality of ImplementationBug: Diagnostics Quality of Implementationtype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis
Description
Previous ID | SR-5515 |
Radar | None |
Original Reporter | @mattneub |
Type | Bug |
Environment
Xcode Version 9.0 beta 3 (9M174d)
Additional Detail from JIRA
Votes | 2 |
Component/s | Compiler |
Labels | Bug, DiagnosticsQoI, TypeChecker |
Assignee | @xedin |
Priority | Medium |
md5: a87fa35be4ed517d2c1b701a237232de
Issue Description:
var arr = [1,2,3]
arr.popFirst() // cannot use mutating member on immutable value: 'arr' is immutable
That's a silly error message. `arr` is not immutable in any normal sense. The problem is actually that popFirst doesn't operate on an Array at all (something I've always found rather weird, but there it is).
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfdiagnostics QoIBug: Diagnostics Quality of ImplementationBug: Diagnostics Quality of Implementationtype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis