-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix meta level on member access (#2809)
Fixes #2804 The problem is that analyze_member_access calls freshen_function_type_vars if the member is a function (i.e. method). This is necessary to not mix the type variables during type inference of generic methods inside generic functions. However, if the method does not participate in type inference, type variables are left in meta_level = 1 state. This causes the error, since the types could not be serialized in the middle of type inference. In this PR I propose to restore meta_level = 0 on member access, this is safe, since anyway, check_call always calls freshen_function_type_vars on callee (for generic functions, generic methods, etc).
- Loading branch information
1 parent
b4492b7
commit a2d654b
Showing
3 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters