{"push_id":855308660,"size":2,"distinct_size":2,"ref":"refs/heads/master","head":"d561f7410aaebd71ecce344e38466e190cef5edc","before":"3f97f6df57327c2a9f7f9457e3182dc2435e61c7","commits":[{"sha":"44d3868e08c5f914e2d4254e4540cd7c01fe9f69","author":{"email":"76b11d3d92bad7a642f7c1b15d8a810ff35b7019@users.noreply.github.com","name":"Brad Chamberlain"},"message":"Filing a bug against extern types in generic functions\n\nIt turns out that if we declare extern types in generic functions,\neven those that are instantiated only a single time as in this\nexample, we hit an internal error.  From what I could tell and guess,\nthe cause is that we clone everything in the function, including the\nextern type, but that since extern types are primitives, and\nprimitives throw an internal error when they are duplicated, that\ncauses a problem.  Workarounds include giving the type of the formal\n(so the function is no longer generic) or moving the extern type\nelsewhere (module level or in its own module).\n\nIt seems as though a fix for this _may_ be to not clone extern types\nand just return the original type given that there's nothing about\nthem that's going to need to be specialized from one generic\ninstantiation to the other.  I'm not sure whether this would best be\ndone low in the callchain or higher up.  Worth a shot.","distinct":true,"url":"https://api.github.com/repos/chapel-lang/chapel/commits/44d3868e08c5f914e2d4254e4540cd7c01fe9f69"},{"sha":"d561f7410aaebd71ecce344e38466e190cef5edc","author":{"email":"76b11d3d92bad7a642f7c1b15d8a810ff35b7019@users.noreply.github.com","name":"Brad Chamberlain"},"message":"Merge pull request #2881 from bradcray/externTypeInGenericFnBug\n\nFiling a bug against extern types in generic functions\r\n\r\nIt turns out that if we declare extern types in generic functions,\r\neven those that are instantiated only a single time as in this\r\nexample, we hit an internal error. From what I could tell and guess,\r\nthe cause is that we clone everything in the function, including the\r\nextern type, but that since extern types are primitives, and\r\nprimitives throw an internal error when they are duplicated, that\r\ncauses a problem. Workarounds include giving the type of the formal\r\n(so the function is no longer generic) or moving the extern type\r\nelsewhere (module level or in its own module).\r\n\r\nIt seems as though a fix for this may be to not clone extern types\r\nand just return the original type given that there's nothing about\r\nthem that's going to need to be specialized from one generic\r\ninstantiation to the other. I'm not sure whether this would best be\r\ndone low in the callchain or higher up. Worth a shot.","distinct":true,"url":"https://api.github.com/repos/chapel-lang/chapel/commits/d561f7410aaebd71ecce344e38466e190cef5edc"}]}