Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Ticket #115 (closed defect: fixed)

Opened 2 months ago

Last modified 1 month ago

getting address of rvalue slice should error

Reported by: ChristianK Assigned to: ChristianK
Priority: major Milestone: Beta
Component: Version: Both
Keywords: Cc:

Description

int[] a = [1, 2, 3]
auto addr = &a[0..2]; // ok for DMD, assert for LDC; should error

Also open a new bug against the frontend.

Change History

11/30/08 22:49:30 changed by lindquist

I doubt Walter will change this, given the way it's explicitly allowed in the frontend code, we should probably just detect it and allocate a temporary in AddrExp?.

12/01/08 03:29:37 changed by ChristianK

That's why I wanted to open that bug against DMD (but forgot): so this feature(?) either gets removed or described in the spec.

12/01/08 19:22:05 changed by lindquist

  • status changed from new to closed.
  • resolution set to fixed.

Makes sense! But for now I've implemented it in rev [820], closing ticket.

Copyright © 2008, LDC Development Team.