On Monday, 15 June 2020 at 13:57:01 UTC, Max Samukha wrote:

void main() {
    Tuple!(byte, int, short) t;
    writeln(t[0]);
}

test.d(57,23): Error: need `this` for `__value_field_2` of type `byte`

It should work. This works:

void main() {
    Tuple!(byte, int, short) t;

    t[0] = 0;
    t[1] = 2;
    t[2] = 3;

    auto a0 = t[0];
    auto a1 = t[1];
}
}

I cannot reproduce the error. writeln(t[0]) works here: https://run.dlang.io/is/kz6lFc

    • Re: Interesting work o... Andrei Alexandrescu via Digitalmars-d-announce
      • Re: Interesting wo... Avrina via Digitalmars-d-announce
        • Re: Interestin... Andrei Alexandrescu via Digitalmars-d-announce
          • Re: Intere... Avrina via Digitalmars-d-announce
            • Re: I... Paul Backus via Digitalmars-d-announce
              • R... Timon Gehr via Digitalmars-d-announce
              • R... Andrei Alexandrescu via Digitalmars-d-announce
              • R... Max Samukha via Digitalmars-d-announce
              • R... Andrej Mitrovic via Digitalmars-d-announce
              • R... Max Samukha via Digitalmars-d-announce
              • R... Max Samukha via Digitalmars-d-announce
              • R... Timon Gehr via Digitalmars-d-announce
              • R... Andrej Mitrovic via Digitalmars-d-announce
              • R... Max Samukha via Digitalmars-d-announce
              • R... Andrej Mitrovic via Digitalmars-d-announce
              • R... Andrei Alexandrescu via Digitalmars-d-announce
            • Re: I... Andrei Alexandrescu via Digitalmars-d-announce
  • Re: Interesting work on pac... Andrej Mitrovic via Digitalmars-d-announce

Reply via email to