http://d.puremagic.com/issues/show_bug.cgi?id=8753


Kenji Hara <k.hara...@gmail.com> changed:

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


--- Comment #3 from Kenji Hara <k.hara...@gmail.com> 2012-10-05 22:00:29 PDT ---
>From the discussion in github, I've agreed that this is an invalid issue.

By Don Clugston,
> I am sorry, I'm completely unconvinced by this. If you write: "immutable int 
> ix = void", there is no way, without breaking the type system, that ix could 
> ever be given a value. Such code is simply wrong.
>
> Now we could change the meaning of "= void" to mean, set in a constructor. In 
> that case, "immutable int ix = void;" and "immutable int ix;" are the same. 
> Then no constant folding would ever be performed on something with a void 
> initializer. I think that's a reasonable language change.
>
> But even in this case, the test code should not compile (it's neither in 
> module scope, where there could be a static this, nor in an aggregate where 
> there could be a constructor).
> 
> The situation in bug 3449 is an entirely different issue.

Then, const/immutable local variables which initialized with void is
meaningless.
Such compiler's behavior might not be so bad.

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

Reply via email to