Fix 16105 - Release inline optimization leads to MethodAccessException if used with assembly:InternalsVisibleTo attribute
Fixes #16105
When doing cross assembly optimisation, the FSharp optimiser incorrectly inlines function calls from a second assembly that contain internal method calls to a third assembly assembly, with internals visible to.
The fix is to spot that the method call to an internal member in an external assembly is about to happen, and to not inline it.
This adds a couple of test cases, one for calling an internal Api with friends visible to. Also one calling a public member to ensure inlining still happens properly.
Also renames and moves a few test cases to ensure that when testing, file paths doesn't spill over the max path length.
:heavy_exclamation_mark: Release notes required
:white_check_mark: Found changes and release notes in following paths:
Change path Release notes path Description src/Compilerdocs/release-notes/.FSharp.Compiler.Service/8.0.300.md
/azp run
Azure Pipelines successfully started running 2 pipeline(s).