Repository navigation
Closed
Labels
BugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone
Description
Provide the steps required to reproduce the problem:
When (f >> g) is composed, this leads to a warning while a function call with aaaaa does not.
From an AST point of view, I don't really see why there should be a warning in the second case.
let f _ b = b
let g _ b = b
let aaaaa<'t> = f >> g
let bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb = 42
let c = 43
aaaaa (
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb,
c
)
(f >> g) (
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb,
c
)DoExpr
(DebugPointAtBinding tmp.fsx (9,0--12,1) IsSynthetic=false,
App
(NonAtomic, false, Ident aaaaa,
Paren
(Tuple
(false,
[Ident
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
Ident c], [tmp.fsx (10,141--10,142) IsSynthetic=false],
tmp.fsx (10,4--11,5) IsSynthetic=false),
tmp.fsx (9,6--9,7) IsSynthetic=false,
Some tmp.fsx (12,0--12,1) IsSynthetic=false,
tmp.fsx (9,6--12,1) IsSynthetic=false),
tmp.fsx (9,0--12,1) IsSynthetic=false),
tmp.fsx (9,0--12,1) IsSynthetic=false);
DoExpr
(DebugPointAtBinding tmp.fsx (14,0--17,1) IsSynthetic=false,
App
(NonAtomic, false,
Paren
(App
(NonAtomic, false,
App
(NonAtomic, true, Ident op_ComposeRight, Ident f,
tmp.fsx (14,1--14,5) IsSynthetic=false), Ident g,
tmp.fsx (14,1--14,7) IsSynthetic=false),
tmp.fsx (14,0--14,1) IsSynthetic=false,
Some tmp.fsx (14,7--14,8) IsSynthetic=false,
tmp.fsx (14,0--14,8) IsSynthetic=false),
Paren
(Tuple
(false,
[Ident
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
Ident c], [tmp.fsx (15,141--15,142) IsSynthetic=false],
tmp.fsx (15,4--16,5) IsSynthetic=false),
tmp.fsx (14,9--14,10) IsSynthetic=false,
Some tmp.fsx (17,0--17,1) IsSynthetic=false,
tmp.fsx (14,9--17,1) IsSynthetic=false),
tmp.fsx (14,0--17,1) IsSynthetic=false)Ident does not have this problem, while App does.
Expected behavior
I would not expect any warnings.
Actual behavior
(f >> g) leads to a warning.
Known workarounds
Compose before invkcing the function call.
Related information
Provide any related information (optional):
- Operating system: Windows 10
- .NET Runtime kind (.NET Core, .NET Framework, Mono): .NET 5
- Editing Tools: Rider 2020.3.2
Related Fantomas issue: fsprojects/fantomas#1341
Metadata
Metadata
Assignees
Labels
BugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.

Activity
baronfel commentedon Feb 1, 2021
Here are the debug-mode errors for the offsides context for this code sample:
nojaf commentedon Feb 5, 2021
It also occurs regardless of what is inside the parenthesis.

dsyme commentedon Jul 5, 2021
This should be tracked by a language suggestion, but in general I agree with this change (so "approved-in-principle")
dsyme commentedon Aug 24, 2021
Fixed in #11772