D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3212 - Error message says "mutable"; should say "immutable"
Summary: Error message says "mutable"; should say "immutable"
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 minor
Assignee: No Owner
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2009-07-27 06:42 UTC by Lars T. Kyllingstad
Modified: 2015-06-09 01:28 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Lars T. Kyllingstad 2009-07-27 06:42:16 UTC
immutable int i;
  i = 123;

Compiling the above results in the error: "cannot modify mutable"

I suppose this should be "cannot modify immutable", and the problem lies at line 143 of declaration.c:

  else if (isInvariant())

      p = "mutable";
Comment 1 Walter Bright 2009-09-03 13:42:50 UTC
Fixed dmd 2.032