Questions and feedback can go here #7
FeepingCreature
announced in
Announcements
Replies: 1 comment 1 reply
-
Hi, thanks for adding discussions! There were a couple of things I don't understand. From the aliastest.nt test, how come a binary expression can be aliased? See struct S
{
int a;
int b;
alias c = (a + b);
}
void main() {
// FIXME assert(S(2, 3).c == 5);
auto s = S(2, 3);
assert(s.c == 5);
} Also: int a = 5;
auto add = b => a + b;
assert(add(2) == 7); How come |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hooray
Beta Was this translation helpful? Give feedback.
All reactions