Skip to content

Commit

Permalink
one less error
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarfgp committed Apr 26, 2024
1 parent d787f94 commit 64db6ca
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/Compiler/Checking/CheckExpressions.fs
Expand Up @@ -9419,7 +9419,6 @@ and TcLookupItemThen cenv overallTy env tpenv mObjExpr objExpr objExprTy delayed
| Some value ->
let kind = if value.IsMember then "member" else "value"
errorR (NameClash(info.DisplayNameCore, kind, info.DisplayNameCore, value.Range, FSComp.SR.typeInfoUnionCase(), info.DisplayNameCore, value.Range))
errorR (NameClash(info.DisplayNameCore, kind, info.DisplayNameCore, mItem, FSComp.SR.typeInfoUnionCase(), info.DisplayNameCore, mItem))

error (Error (FSComp.SR.tcSyntaxFormUsedOnlyWithRecordLabelsPropertiesAndFields(), mItem))
// These items are not expected here - they can't be the result of a instance member dot-lookup "expr.Ident"
Expand Down
Expand Up @@ -323,9 +323,7 @@ let onlyIdC (ids: MyId list) = ids |> List.choose _.IdC
|> shouldFail
|> withDiagnostics [
(Error 23, Line 7, Col 17, Line 7, Col 20, "The member 'IdA' can not be defined because the name 'IdA' clashes with the union case 'IdA' in this type or module");
(Error 23, Line 22, Col 51, Line 22, Col 56, "The member 'IdA' can not be defined because the name 'IdA' clashes with the union case 'IdA' in this type or module");
(Error 812, Line 22, Col 51, Line 22, Col 56, "The syntax 'expr.id' may only be used with record labels, properties and fields");
(Error 23, Line 17, Col 17, Line 17, Col 20, "The member 'IdC' can not be defined because the name 'IdC' clashes with the union case 'IdC' in this type or module");
(Error 23, Line 24, Col 51, Line 24, Col 56, "The member 'IdC' can not be defined because the name 'IdC' clashes with the union case 'IdC' in this type or module");
(Error 812, Line 24, Col 51, Line 24, Col 56, "The syntax 'expr.id' may only be used with record labels, properties and fields")
]

0 comments on commit 64db6ca

Please sign in to comment.