Phobos is now compiled with -preview=dip1000

Mike Franklin slavo5150 at yahoo.com
Fri May 17 05:22:30 UTC 2019


On Friday, 17 May 2019 at 04:50:52 UTC, Meta wrote:

> Walter, can I get you to take a look at this post I made a few 
> months ago, and the contained example? I feel that this is a 
> case that *should* definitely work, but I'm not sure if it can 
> *currently* work - and so far, nobody else seems to be either, 
> save for you.
>
> https://forum.dlang.org/post/laqjadtwrsdhdrqokryx@forum.dlang.org

My assessment (which could be wrong):
`scope` and `return` only apply to pointers and `ref`s.  If you 
remove all `scope` and `return` attributes from the function 
`push`, it works fine.

I consider it a bug that the compiler doesn't emit an error when 
using attributes on types for which they are not intended.

Mike


More information about the Digitalmars-d-announce mailing list