Skip to content

Instantly share code, notes, and snippets.

@coolya
Last active December 17, 2015 07:18
Show Gist options
  • Save coolya/5571282 to your computer and use it in GitHub Desktop.
Save coolya/5571282 to your computer and use it in GitHub Desktop.
struct DataStructures_Trackpoint (*foo)(struct DataStructures_Trackpoint);
if ( !((*foo)(i1).alt == 100) )
{
(*__failures)++;;
printf("$$FAILED: ***FAILED*** (");
printf("testID=%i",0);
printf(") @FunctionPointers:testLambdaProcessing:0#6864902200221979870\n");
}
static struct DataStructures_Trackpoint FunctionPointers_closure_a7a1(struct DataStructures_Trackpoint t)
{
t.alt = 100;
return t;
}
(Trackpoint)⇒(Trackpoint) foo = [t|
t.alt = 100 m;
t;
];
assert(0) foo(i1).alt == 100 m;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment