Fixed missing check on &var.myFunction

This commit is contained in:
Christoffer Lerno
2023-02-14 21:56:56 +01:00
parent 8b099293a3
commit b85d521dc1
3 changed files with 14 additions and 5 deletions

View 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
}