Current limitations of -dip1000

12345swordy alexanderheistermann at gmail.com
Tue Oct 10 14:12:04 UTC 2017


On Tuesday, 10 October 2017 at 10:49:54 UTC, meppl wrote:
> On Tuesday, 10 October 2017 at 09:55:13 UTC, meppl wrote:
>> ...
>
> also, these differ:
> (with dmd v2.076.0)
>
> @safe:
> struct S {
> 	@safe:
> 	int* x;
> 	scope int* pointer() return {
> 		return x;
> 	}
> }
> int* testPointer() {
> 	S s;
> 	return s.pointer(); // no error
> }
> struct SA {
> 	@safe:
> 	int[ 128] x;
> 	scope int* pointer() return {
> 		return &x[ 0];
> 	}
> }
> int* testPointerA() {
> 	SA s;
> 	return s.pointer(); // error
> }

Report any bugs to the official bug tracker here: 
https://issues.dlang.org/


More information about the Digitalmars-d mailing list