mirror of
https://github.com/dlang/dmd.git
synced 2025-04-27 05:30:13 +03:00
Long literal not allowed as array index on x86
This commit is contained in:
parent
c63bb20c83
commit
5e74894ecd
1 changed files with 3 additions and 3 deletions
|
@ -3,7 +3,7 @@ REQUIRED_ARGS: -de
|
|||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/foreach_index_overflow.d(19): Deprecation: foreach: loop index implicitly converted from `size_t` to `int`
|
||||
fail_compilation/foreach_index_overflow.d(21): Deprecation: foreach: loop index implicitly converted from `size_t` to `uint`
|
||||
fail_compilation/foreach_index_overflow.d(21): Deprecation: foreach: loop index implicitly converted from `size_t` to `ushort`
|
||||
fail_compilation/foreach_index_overflow.d(24): Deprecation: foreach: loop index implicitly converted from `size_t` to `ubyte`
|
||||
fail_compilation/foreach_index_overflow.d(26): Deprecation: foreach: loop index implicitly converted from `size_t` to `byte`
|
||||
---
|
||||
|
@ -17,8 +17,8 @@ void main()
|
|||
int[] arr;
|
||||
foreach (int index, element; arr[0 .. 0x8000_0000]) {} // OK
|
||||
foreach (int index, element; arr[0 .. 0x8000_0001]) {} // error
|
||||
foreach (uint index, element; arr[0 .. 0x1_0000_0000]) {} // OK
|
||||
foreach (uint index, element; arr[0 .. 0x1_0000_0001]) {} // error
|
||||
foreach (ushort index, element; arr[0 .. 0x1_0000]) {} // OK
|
||||
foreach (ushort index, element; arr[0 .. 0x1_0001]) {} // error
|
||||
|
||||
int[257] data;
|
||||
foreach (ubyte i, x; data[]) {} // error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue