Repository navigation
Conversation
@inlined was translated into Lapply's ap_inlined, but no pass in compiler/core ever read it: the only use in lam_pass_remove_alias was commented out. So (@inlined f)(x) was accepted and ignored, (@inlined(never) f)(x) still inlined, and the natural ReScript placement @inlined f(x) already reported warning 53. Delete the attribute's translation and the ap_inlined field. Any remaining @inlined now reaches check_attribute and is reported as a misplaced attribute (warning 53) instead of being silently ignored. See #8733. Signed-off-by: Christoph Knittel <christoph@knittel.cc> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Christoph Knittel <christoph@knittel.cc> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The formatter drops attributes on functor applications, so @inlined F({}) cannot appear in a formatted fixture. Cover the two expression placements only. Signed-off-by: Christoph Knittel <christoph@knittel.cc> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8734 +/- ##
=======================================
Coverage 79.86% 79.87%
=======================================
Files 464 464
Lines 63090 63074 -16
=======================================
- Hits 50388 50378 -10
+ Misses 12702 12696 -6
🚀 New features to boost your workflow:
|
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
|
Developer playground preview: https://rescript-lang.github.io/rescript/dev-playground/?version=pr-8734 |
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the call-site
@inlinedattribute, as proposed in #8733.@inlinedwas translated intoLapply.ap_inlined, but no pass incompiler/coreever read it: its only use, inlam_pass_remove_alias.ml, was commented out. Today:(@inlined f)(x)(@inlined(never) f)(x)with@inline let f@inlined f(x)(the natural ReScript placement)No code in this repository uses it.
This deletes the attribute's translation (
get_and_remove_inlined_attribute(_on_module)) and theap_inlinedfield ofLambda.ap_info, together with its Lambda printer case.check_attributealready had an"inlined"case, so any remaining@inlined, on an expression or a functor application, is now reported as a misplaced attribute (warning 53) instead of being silently ignored. Generated JavaScript doesn't change.ap_infois now a single-field record{ap_loc}. I left it as a record to keep this diff focused; it could be replaced by a plain location in a follow-up.Since
.cmjfiles store marshalled Lambda terms (includingLapply), their layout changes with this PR. They're rebuilt with the compiler anyway.Tests
super_errors/warning_53_inlined_attribute.res:@inlinedon a function in parentheses and on an application, each reported as warning 53.The functor-application case (
module M = @inlined F({})) also reports warning 53, but it can't be in a fixture: the ReScript formatter drops attributes on functor applications (it printsF()), so the format check rejects it. That printer bug is pre-existing and separate from this PR.🤖 Generated with Claude Code