9ca19cac6f
Function type parameters in occurring in constants were using an offset based on the context in which the constant first occurred. This meant that function type parameters occurring in a generic context would have a different offset that those occurring in a non-generic context. The loading of .dill in ast_from_binary would read all constants outside the context and would therefore get the indices wrong on generic function types. This CL changes the encoding of these type parameters to always use a fresh context. Closes #45415 TEST=pkg/front_end/testcases/generic_metadata/from_dill/main.dart Change-Id: Ifdaedb4581f1e022c908fc58a58ceac3d7b0900e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193481 Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Dmitry Stefantsov <dmitryas@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com>