Hello,

I have a 2 level nested struct structure with nice descriptive field names. And I thought it will be easy to alias those identifierLists with a few letter names and do some calculations on them.
But I'm having an error.

struct A{
  struct B{ int c; }
  B b;

  auto f(){
    alias d = b.c;
    return d;  //Compiler Error: need 'this' for c of type int.
  }
}

There's the this and it's called "b."

Why is this? If I copy paste the aliased expression "b.c", it compiled fine.

Thanks in advance!

Reply via email to