{"action":"closed","issue":{"url":"https://api.github.com/repos/melt-umn/ableC/issues/1","labels_url":"https://api.github.com/repos/melt-umn/ableC/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/melt-umn/ableC/issues/1/comments","events_url":"https://api.github.com/repos/melt-umn/ableC/issues/1/events","html_url":"https://github.com/melt-umn/ableC/issues/1","id":87118534,"number":1,"title":"ADT extension crashes when dealing with non-pointer ADTs","user":{"login":"krame505","id":8467850,"avatar_url":"https://avatars.githubusercontent.com/u/8467850?v=3","gravatar_id":"","url":"https://api.github.com/users/krame505","html_url":"https://github.com/krame505","followers_url":"https://api.github.com/users/krame505/followers","following_url":"https://api.github.com/users/krame505/following{/other_user}","gists_url":"https://api.github.com/users/krame505/gists{/gist_id}","starred_url":"https://api.github.com/users/krame505/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krame505/subscriptions","organizations_url":"https://api.github.com/users/krame505/orgs","repos_url":"https://api.github.com/users/krame505/repos","events_url":"https://api.github.com/users/krame505/events{/privacy}","received_events_url":"https://api.github.com/users/krame505/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-10T21:48:41Z","updated_at":"2015-06-16T21:52:03Z","closed_at":"2015-06-16T21:52:03Z","body":"The ADT extension seems to be crashing when matching on a dereferenced ADT.  The following is a (mostly) minimal test case:\r\n```\r\ntypedef datatype Node Node;\r\n\r\ndatatype Node {\r\n  Leaf (int);\r\n};\r\n\r\nint main() {\r\n  Node n = *Leaf(4);\r\n\r\n  match (n) {\r\n    Leaf (i): ;\r\n  };\r\n}\r\n```\r\nIt is also unclear how to nicely handle non-pointer ADTs; We allow the user to create them and pass them around, but they always have to be written as a pointer and be used as a pointer to do anything with them.  Would it make sense to automatically take the address when a match is performed on a non-pointer?  Otherwise we should consider making datatypes always pointers behind the scenes, and just hiding this from the user.  Also, why are ADTs pointers at the top level, anyway?  "}}