-
Notifications
You must be signed in to change notification settings - Fork 830
Fix a broken debug assertion that kicked in whenever building Fsharp.Core #14435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@kerams : Can you please check if this does not violate some older agreements about what [<MethodImpl.NoInlining>] or should not do? |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
No idea, I would have guessed
|
…hub.com/dotnet/fsharp into feature/fix-broken-assertion-inlineflag
c5660e6
I unified all the call sites and centralized the logic, it does make sense to do it. The following happened: In current version of the compiler, it compiles and does NOT inline - it respects the attribute and ignores the keyword. I feel that we should turn it into an error as well (just like the combination of inline keyword and NoCompilerInliningAttribute is), behind a new language version flag. |
When Fsharp.Core was being built with Debug. the assertion
assert(vspec.InlineInfo = inlineFlag)at the very end of CheckExpressions was broken.
This was in main.
Reason is, the [<MethodImpl.NoInlining>] was not reflected, and only the newly introduced (F# specific) attrib_NoCompilerInliningAttribute was.
The bigger infrastructural issue is that this slipped trough in the first place.
I think we should build at least some projects also in Debug so that assertions get exercised.