Closed erszcz closed 1 year ago
Josef didn't add one, so there's no comment ;p It's instantiating type variables, so later on constraints can be added on them. Anyways, it's not that important - the important thing for this fix is that we drop an annotation that might contain a file reference.
Prior to this commit we could run into the following error:
It's caused by a record being mentioned in a spec, like:
but then
instantiate/2
, when called on the spec, dropping the annotation from some types, including records. Later on, inget_record_fields/3
, a record without an annotation is taken as a locally defined one, which is not always the case, and a crash happens due to a lookup to the localREnv
which doesn't have a given record name.