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

Ticket #362 (closed defect: fixed)

Opened 2 years ago

Last modified 10 months ago

Error: Exp type TupleExp not implemented

Reported by: winterwar Assigned to: ChristianK
Priority: major Milestone:
Component: unspecified Version: hg tip
Keywords: Cc:

Description

This fails to compile with LDC (svn trunk), but works with dmd (any recent D1 version):

struct X {
    int x;
    int y;
}

void main() {
    X x;
    x.tupleof = x.tupleof;
}

t.d(8): Error: Exp type TupleExp? not implemented: tuple(x.x = x.x,x.y = x.y)

In dmd, this also works if x is a struct pointer (which makes it read/assign the struct fields).

Change History

07/12/10 06:26:26 changed by rawler

I have a similar problem with this code, line 7 fails with the same error-message.

struct BoundDG(Args...) {
  alias void delegate(Args) Handler;
  Args _args;
  Handler _handler;
  BoundDG* set(Handler handler, Args args) {
    this._handler = handler;
    this._args = args;
    return this;
  }
  void trigger() {
    _handler(_args);
  }
}

However, I found it can be worked-around with a static-for-loop, like:

foreach (i,v; args)
   this._args[i] = v;

Just a tip.

04/25/11 11:54:53 changed by mwarning

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

works with hg tip.

Copyright © 2008, LDC Development Team.