[Issue 7313] the result of a 'new' expression should implicitly cast to (im)mutable

2017-08-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7313

ag0ae...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||ag0ae...@gmail.com
 Resolution|--- |WORKSFORME

--- Comment #3 from ag0ae...@gmail.com ---
(In reply to timon.gehr from comment #0)
> the following code should compile:
> void main(){
> immutable a = new int[1];
> int[] b = new immutable(int)[1];
> }

Works now (dmd 2.075) and has been working for a while. Closing as WORKSFORME.

--


[Issue 7313] the result of a 'new' expression should implicitly cast to (im)mutable

2012-01-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7313



--- Comment #2 from timon.g...@gmx.ch 2012-01-18 14:28:35 PST ---
It works with any type that has a pure constructor where all (unscoped)
constructor arguments convert to the respective qualifier.

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


[Issue 7313] the result of a 'new' expression should implicitly cast to (im)mutable

2012-01-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7313


Jonathan M Davis  changed:

   What|Removed |Added

 CC||jmdavisp...@gmx.com
   Platform|Other   |All
 OS/Version|Linux   |All


--- Comment #1 from Jonathan M Davis  2012-01-18 13:56:46 
PST ---
I can see why that would be nice with regards to primitives, but I would point
out that that wouldn't work with structs or classes (or with arrays of structs
or classes).

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