[Issue 15872] New: [ndslice] indexing a slice with an array causes an error inside ndslice

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Apr 4 09:49:47 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=15872

          Issue ID: 15872
           Summary: [ndslice] indexing a slice with an array causes an
                    error inside ndslice
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: ilyayaroshenko at gmail.com

>From Mir: https://github.com/DlangScience/mir/issues/14
------
e.g. mySlice[[1,2,3]] gives

/Users/john/.dub/packages/mir-0.10.2/source/mir/ndslice/slice.d(1556): Error:
no property 'i' for type 'int[]'
/Users/john/.dub/packages/mir-0.10.2/source/mir/ndslice/slice.d(1557): Error:
no property 'j' for type 'int[]'
/Users/john/.dub/packages/mir-0.10.2/source/mir/ndslice/slice.d(1557): Error:
no property 'i' for type 'int[]'
test.d(8): Error: template instance mir.ndslice.slice.Slice!(3LU,
ulong*).Slice.opIndex!(int[]) error instantiating

it should either work or should error at the API level, not internally.

--


More information about the Digitalmars-d-bugs mailing list