Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit027f97b

Browse files
committed
Check type of expression instead of extracting stuff
1 parent36c6289 commit027f97b

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

‎src/fsharp/TypeChecker.fs‎

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8227,18 +8227,14 @@ and Propagate cenv overallTy env tpenv (expr: ApplicableExpr) exprty delayed =
82278227
RecordNameAndTypeResolutions_IdeallyWithoutHavingOtherEffects_Delayed cenv env tpenv delayed
82288228

82298229
let flag =
8230-
match expr.Expr with
8231-
| Expr.Val (d,_,_)
8232-
| Expr.App(Expr.Val (d,_,_),_,_,_,_) ->
8233-
let typ = d.Type
8234-
isArray1DTy cenv.g typ ||
8235-
if isAppTy cenv.g typ then
8236-
let tcref = tcrefOfAppTy cenv.g typ
8237-
let _, entityTy = generalizeTyconRef tcref
8238-
let props = GetImmediateIntrinsicPropInfosOfType (None, AccessibleFromSomeFSharpCode) cenv.g cenv.amap range0 entityTy
8239-
props |> List.exists (fun x -> x.PropertyName = "Item")
8240-
else false
8241-
| _ -> false
8230+
let typ = expr.Type
8231+
isArray1DTy cenv.g typ ||
8232+
if isAppTy cenv.g typ then
8233+
let tcref = tcrefOfAppTy cenv.g typ
8234+
let _, entityTy = generalizeTyconRef tcref
8235+
let props = GetImmediateIntrinsicPropInfosOfType (None, AccessibleFromSomeFSharpCode) cenv.g cenv.amap range0 entityTy
8236+
props |> List.exists (fun x -> x.PropertyName = "Item")
8237+
else false
82428238

82438239
error (NotAFunction(denv,overallTy,flag,mExpr,mArg))
82448240
| _ ->

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp