[Issue 5200] Call to immutable method during immutable construction

2021-03-19 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5200 RazvanN changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 5200] Call to immutable method during immutable construction

2011-02-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5200 Brad Roberts bra...@puremagic.com changed: What|Removed |Added Platform|x86_64 |x86 --- Comment #2

Re: Call to immutable method during immutable construction

2010-11-11 Thread Jens Mueller
Jonathan M Davis wrote: On Wednesday 10 November 2010 13:01:55 Jens Mueller wrote: So, while I don't necessarily see anything wrong with calling fun() in this situation being legal, I don't see the point. My main point is that I'd like to know what is implemented as in mentioned TDPL

[Issue 5200] New: Call to immutable method during immutable construction

2010-11-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5200 Summary: Call to immutable method during immutable construction Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: minor Priority: P2

Call to immutable method during immutable construction

2010-11-10 Thread Jens Mueller
Hi, according to TDPL p. 294 the following call to fun should not be allowed. But it compiles and I see not why that shouldn't be allowed. I think it's a bug in TDPL but I'm unsure. class A { int a; int[] b; this() immutable { a = 5; b = [ 1, 2, 3 ]; fun();

Re: Call to immutable method during immutable construction

2010-11-10 Thread Jonathan M Davis
On Wednesday, November 10, 2010 06:14:07 Jens Mueller wrote: Hi, according to TDPL p. 294 the following call to fun should not be allowed. But it compiles and I see not why that shouldn't be allowed. I think it's a bug in TDPL but I'm unsure. class A { int a; int[] b;

Re: Call to immutable method during immutable construction

2010-11-10 Thread Jens Mueller
Jonathan M Davis wrote: On Wednesday, November 10, 2010 06:14:07 Jens Mueller wrote: Hi, according to TDPL p. 294 the following call to fun should not be allowed. But it compiles and I see not why that shouldn't be allowed. I think it's a bug in TDPL but I'm unsure. class A {

Re: Call to immutable method during immutable construction

2010-11-10 Thread Jonathan M Davis
On Wednesday 10 November 2010 13:01:55 Jens Mueller wrote: You mean alter A's state. It could change something outside of A, couldn't it? I suppose that it could. I forgot about that. It's certainly not something that I'd ever think of doing. It would be bizarre to alter global state from a