mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
PolymorphicFunctionTypes are built on GenericParamLists, which are owned by decls that introduce generic parameters. This made deserializing them a pain, because they /cannot/ be recreated in isolation -- the decl provides some context. Rather than try to come up with a very generic way to serialize these, this patch just records the GenericParamList of every decl, allowing the type to be serialized with a reference to the decl instead of to the param list. Deserialization can then just pluck the list back out of the decl. According to Doug and Joe, PolymorphicFunctionType's due for a refresh anyway, so this kind of hackery / kludgery is acceptable. With this change, we can now handle generic structs and generic functions inside generic structs. Swift SVN r6032
47 KiB
47 KiB