Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Compiler/Checking/CheckExpressions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -8262,8 +8262,9 @@ and TcUnionCaseOrExnCaseOrActivePatternResultItemThen (cenv: cenv) overallTy env
// first: put all positional arguments
let mutable currentIndex = 0
for arg in unnamedArgs do
fittedArgs[currentIndex] <- arg
currentIndex <- currentIndex + 1
if currentIndex < fittedArgs.Length then
fittedArgs[currentIndex] <- arg
currentIndex <- currentIndex + 1

let SEEN_NAMED_ARGUMENT = -1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ match y with
| Case1(V3 = "") -> ()
| _ -> ()

let (Case1(V4 = z)) = y
let (Case1(V4 = z)) = y

let z a = Some ("", "", a = "")
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ module UnionTypes =
(Error 3174, Line 14, Col 9, Line 14, Col 11, "The union case 'Case1' does not have a field named 'V3'.")
(Warning 26, Line 15, Col 3, Line 15, Col 10, "This rule will never be matched")
(Error 3174, Line 17, Col 12, Line 17, Col 14, "The union case 'Case1' does not have a field named 'V4'.")
(Error 3174, Line 19, Col 25, Line 19, Col 26, "The union case 'Some' does not have a field named 'a'.")
]

//SOURCE=E_UnionFieldConflictingName.fs SCFLAGS="--test:ErrorRanges" # E_UnionFieldConflictingName.fs
Expand Down