Generalizing lib/Sema/TypeCheckError.cpp?

(David Zarzycki) #1


Based on the earlier "Strict Value Semantics" thread (a.k.a. "pure" functions/types), I'll need to add something like rethrows, except for "pure" functions. For the sake of discussion, let's call this attribute "purify" instead of "repure" which is ugly but visually similar to rethrows. It seems like the semantic analysis logic for rethrows is almost 2,000 lines long, and much of it would be duplicated while implementing "purify". Do people have any thoughts or opinions on how generalizing this file should work or not work?

Also, before I go down this road, is the core team open to "pure" functions/types as a feature? I didn't feel like I got any feedback in this regard on the previous thread. If I overlooked something, please let me know.