[Issue 6931] scope parameter storage class not checked at all

2020-08-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6931

Mathias LANG  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||pro.mathias.l...@gmail.com
 Resolution|--- |FIXED

--- Comment #6 from Mathias LANG  ---
Solved by DIP1000.

--


[Issue 6931] scope parameter storage class not checked at all

2018-03-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6931

Jonathan M Davis  changed:

   What|Removed |Added

 CC||sobaya...@gmail.com

--- Comment #5 from Jonathan M Davis  ---
*** Issue 18129 has been marked as a duplicate of this issue. ***

--


[Issue 6931] scope parameter storage class not checked at all

2016-01-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6931

b2.t...@gmx.com changed:

   What|Removed |Added

 CC||mzfh...@foxmail.com

--- Comment #4 from b2.t...@gmx.com ---
*** Issue 15562 has been marked as a duplicate of this issue. ***

--


[Issue 6931] scope parameter storage class not checked at all

2015-06-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6931

Andrei Alexandrescu and...@erdani.com changed:

   What|Removed |Added

Version|D1  D2 |D2

--


[Issue 6931] scope parameter storage class not checked at all

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


Denis verylonglogin@gmail.com changed:

   What|Removed |Added

 CC||verylonglogin@gmail.com


--- Comment #1 from Denis verylonglogin@gmail.com 2012-01-22 17:47:29 MSK 
---
If we will look at destruction  allocation:
---
import std.stdio;

class C {
int n;
this(int n) { writefln( this(%s) at %s, this.n = n, cast(void*)this); }
~this() { writefln(~this(%s) at %s, n, cast(void*)this); }
}

void main() {
int i;
writefln(Stack is at %s, i);
writefln(Heap  is at %s, (new void[1]).ptr);
{
C cHeap = new C(0); // will be destroyed on scope exit
scope C c0 = cHeap;

// C(1)-C(4) will be allocated in heap
// C(1), C(2), and C(4) will be destroyed on scope exit
// C(3) will be destroyed on garbage collection
scope C c1 = cast(C)cast(void*)new C(1);
scope C c2 = true ? new C(2) : null;
scope C c3 = (new C(3), new C(4));
}
writefln(after scope);
}
---
As a result even if `C` is a `scope class` the program will compile without
`cHeap` and `c0`, but every `C` instance will be allocated in heap and C(3)
will be destroyed on garbage collection.

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


[Issue 6931] scope parameter storage class not checked at all

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



--- Comment #2 from Trass3r mrmoc...@gmx.de 2012-01-22 16:02:54 CET ---
This report is about scope as a parameter storage class!

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


[Issue 6931] scope parameter storage class not checked at all

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



--- Comment #3 from Denis verylonglogin@gmail.com 2012-01-22 20:19:58 MSK 
---
Oh, sorry for the unrelated comment. Created Issue 7347 for that.

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