dotnet / dotnet/fsharp

Misleading error in pipeline after another pipeline is added to it

Open
#5,994 0 comments 0 reactions 1 assignee Claimed by @edgarfgp View on GitHub
Area-Diagnostics Feature Improvement
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 22h
Merged PRs (30d)
144

Description

Given this code:

```fsharp
let evenSquaredAndPotented values potention =
values
|> List.filter (fun x -> x % 2 = 0)
|> List.map (fun i -> i ** 2)
|> List.map (fun i -> i + potention)
```

You see this result:

image

It reports line 3 as the source of the problem when it is actually at line 4.

The issue is actually at `i ** 2`.

If you remove `|> List.map (fun i -> i + potention)` line, the range is correctly showing `**`.

**Info**

* F# script file
* VS 15.9.3
* Same behavior with F# 4.0 [link](https://repl.it/@cartermp/GlisteningBoilingQuagga)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.