Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getExprPresentableName: fix grammar #811

Merged
merged 2 commits into from
Feb 12, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ let getFunctionExpr (appExpr: IAppExpr) =
let getExprPresentableName (expr: IFSharpExpression) =
match expr.IgnoreInnerParens() with
| :? IReferenceExpr as refExpr -> $"'{refExpr.ShortName}'"
| :? ILambdaExpr -> "lambda"
| :? ITypeTestExpr -> "type test"
| :? ICastExpr -> "type cast"
| :? ILambdaExpr -> "the lambda"
| :? ITypeTestExpr -> "the type test"
| :? ICastExpr -> "the type cast"
| _ -> SharedImplUtil.MISSING_DECLARATION_NAME

let rec isSimpleQualifiedName (expr: IReferenceExpr) =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let _ = |not |b|(12) :?> A|(11)
------------------------------------------------
0: The type 'bool' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion.
QUICKFIXES:
Add parens to type test
Add parens to the type test
1: This expression was expected to have type
'bool'
but here has type
Expand All @@ -35,23 +35,23 @@ is not compatible with type
'B'

QUICKFIXES:
Add parens to type cast
Add parens to the type cast
4: This expression was expected to have type
'bool'
but here has type
'A'
NO QUICKFIXES
5: The type 'bool' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion.
QUICKFIXES:
Add parens to type cast
Add parens to the type cast
6: This expression was expected to have type
'bool'
but here has type
'A'
NO QUICKFIXES
7: The type 'bool' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion.
QUICKFIXES:
Add parens to type test
Add parens to the type test
8: This expression was expected to have type
'bool'
but here has type
Expand All @@ -63,15 +63,15 @@ is not compatible with type
'A'

QUICKFIXES:
Add parens to type cast
Add parens to the type cast
10: This expression was expected to have type
'bool'
but here has type
'B'
NO QUICKFIXES
11: The type 'bool' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion.
QUICKFIXES:
Add parens to type cast
Add parens to the type cast
12: This expression was expected to have type
'bool'
but here has type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let _ = ||not |o|(4) :> string|(2)|(3)
------------------------------------------------
0: The type 'bool' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion.
QUICKFIXES:
Add parens to type cast
Add parens to the type cast
1: This expression was expected to have type
'bool'
but here has type
Expand All @@ -21,7 +21,7 @@ is not compatible with type
'string'

QUICKFIXES:
Add parens to type cast
Add parens to the type cast
4: This expression was expected to have type
'bool'
but here has type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let _ = |not |o|(1) :? string|(0)
------------------------------------------------
0: The type 'bool' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion.
QUICKFIXES:
Add parens to type test
Add parens to the type test
1: This expression was expected to have type
'bool'
but here has type
Expand Down
Loading