[Issue 16976] Implicit conversion from ulong to int in foreach_reverse

2018-11-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16976

github-bugzi...@puremagic.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


[Issue 16976] Implicit conversion from ulong to int in foreach_reverse

2018-11-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16976

--- Comment #3 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/1003fe69843de58238f2b7823ddd1f22eeb7bc0b
Fix issue 16976 - Do not convert blindly the size of an iterable

https://github.com/dlang/dmd/commit/0c1fdaf085e59b691b9591490ac9a5504524c48d
Merge pull request #8941 from dlang/thewilsonator-patch-3

 Fix issue 16976 - Do not convert blindly the size of an iterable
merged-on-behalf-of: Nicholas Wilson 

--


[Issue 16976] Implicit conversion from ulong to int in foreach_reverse

2016-12-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16976

bitter.ta...@gmx.com changed:

   What|Removed |Added

 CC||bitter.ta...@gmx.com

--- Comment #2 from bitter.ta...@gmx.com ---
Covered by DMD's PR https://github.com/dlang/dmd/pull/6342

--


[Issue 16976] Implicit conversion from ulong to int in foreach_reverse

2016-12-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16976

--- Comment #1 from Sprink  ---
Correction:

inlining the array like that seems to work as the value is known. Using
anything else though it doesn't work.

int[] values = [ 0, 1, 2 ]; // dynamically

foreach_reverse(int i, v ; values)
{
// error
}

--