[Issue 12390] Regression (2.065): "has no effect in expression" diagnostic regression

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Mar 29 00:06:51 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12390


Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2014-03-29 00:06:37 PDT ---
This is not a regression. Rather the behavior change was an actual fix of
rejects-valid bug.

(In reply to comment #0)
> DMD 2.065: 
> test.d(7): Error: == has no effect in expression (fun().i == 4)

'fun' is not pure, so essentially its call could have side effect. So the error
message was incorrect in 2.065 and earlier.

> DMD master compiles.

Therefore, current git-head behavior is correct.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list