Bug 21355 - can't slice a dynamic array
Summary: can't slice a dynamic array
Status: UNCONFIRMED
Alias: None
Product: gdb
Classification: Unclassified
Component: d (show other bugs)
Version: HEAD
: P2 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-05 16:23 UTC by andrew
Modified: 2017-04-07 16:16 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andrew 2017-04-05 16:23:15 UTC
With a declaration like:

char[] string = "hello";

I can print it:

(gdb) p string
$1 = "hello"

But can't slice it:

(gdb) p string[0 .. 3]
cannot take slice of non-array

I'm compiling using dmd v1.079.0 and using gdb as of 4ac40124eef08045bf99ad9f4fcc277961953109.