mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fixed missing check on &var.myFunction
This commit is contained in:
9
test/test_suite/methods/method_from_var.c3
Normal file
9
test/test_suite/methods/method_from_var.c3
Normal file
@@ -0,0 +1,9 @@
|
||||
define NodeNotifyHandler = fn void(TreeView* this, TreeNode* node, String prop, void* data);
|
||||
private fn void TreeView.nodeNotifyHandler(TreeView* this, TreeNode* node, String prop, void* data) {}
|
||||
|
||||
struct TreeNode { int abc; NodeNotifyHandler notifyHandler; }
|
||||
struct TreeView { int abc; }
|
||||
private fn void TreeView.addNodeInternal(TreeView* this, int nop, TreeNode* node, TreeNode* pnode = null, int pos = -1)
|
||||
{
|
||||
node.notifyHandler = &(this.nodeNotifyHandler); // #error: Taking the address of a method
|
||||
}
|
||||
Reference in New Issue
Block a user