You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[5.9] Fix a crash during lookup of an operator with package acl
Description: Type-checking an operator requires look up of all of its decls regardless of which access modifier is used before filtering. If one of them is a package decl in an imported module that was built with package-name, but the use site of the operator decl is in a module that is not built with package-name, it currently crashes as it tries to access package context of the use site, which is null. The change in this PR checks if both decl site and use site have package contexts before accessing the package name property, otherwise return false to be filtered out. This PR also includes a check of source file kind before showing diagnostics to ensure that errors are not shown if source is interface as interface does not include package symbols.
Risk: Low. It adds a null check on package context before accessing package name.
Original PR: Fix a crash during lookup of an operator with package acl #66155
Reviewed By: @tshortli@xedin@xymus
Testing: Added a test that ensures coverage of the affected flow
Resolves: rdar://108961906
0 commit comments