Skip to content

Commit

Permalink
Merge main to release/dev17.4 (#13499)
Browse files Browse the repository at this point in the history
* ValRepInfoForDisplay added for improved quick info for functions defined in expressions

* Update

* Update QuickInfoTests.fs

* Update QuickInfoTests.fs

* Update

* add identifier analysis script (#13486)

* add identifier analysis script

* add identifier analysis script

* Update fantomas alpha 11 (#13481)

* Allow lower-case DU cases when RequireQualifiedAccess is specified (#13432)

* Allow lower-case DU cases when RequireQualifiedAccess is specified

* Fix PR suggestions and Add more testing

* Protect feature under preview version

* Add a NotUpperCaseConstructorWithoutRQA warning to be raised in lang version preview

* Fix formatting

* regularize some names (#13489)

* normalize some names

* format code

* fix build

* Subtraction of two chars, new conversions, and fixes for dynamic operator invocations and QuotationToExpression (#11681)

Co-authored-by: Vlad Zarytovskii <vzaritovsky@hotmail.com>
Co-authored-by: Don Syme <dsyme@users.noreply.github.com>

* Mark backing fields as CompilerGenerated (fixes serialization of fields in FSI multiemit) (#13494)

Co-authored-by: Don Syme <donsyme@fastmail.fm>
Co-authored-by: Peter Semkin <petersemkin@duck.com>
Co-authored-by: Don Syme <dsyme@users.noreply.github.com>
Co-authored-by: Florian Verdonck <florian.verdonck@outlook.com>
Co-authored-by: Petr Semkin <psfinaki@users.noreply.github.com>
Co-authored-by: Edgar Gonzalez <edgar.gonzalez@fundourselves.com>
Co-authored-by: Hadrian Tang <hadrianwttang@outlook.com>
Co-authored-by: Vlad Zarytovskii <vzaritovsky@hotmail.com>
Co-authored-by: Kevin Ransom (msft) <codecutter@hotmail.com>
  • Loading branch information
10 people committed Jul 12, 2022
1 parent 89cb1b5 commit 873eefc
Show file tree
Hide file tree
Showing 126 changed files with 6,302 additions and 1,963 deletions.
10 changes: 9 additions & 1 deletion VisualFSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Test.Utilities", "tests\FSharp.Test.Utilities\FSharp.Test.Utilities.fsproj", "{60D275B0-B14A-41CB-A1B2-E815A7448FCB}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharpSuite.Tests", "tests\fsharp\FSharpSuite.Tests.fsproj", "{C163E892-5BF7-4B59-AA99-B0E8079C67C4}"
ProjectSection(ProjectDependencies) = postProject
{0973C362-585C-4838-9459-D7E45C6B784B} = {0973C362-585C-4838-9459-D7E45C6B784B}
{37EB3E54-ABC6-4CF5-8273-7CE4B61A42C1} = {37EB3E54-ABC6-4CF5-8273-7CE4B61A42C1}
{511C95D9-3BA6-451F-B6F8-F033F40878A5} = {511C95D9-3BA6-451F-B6F8-F033F40878A5}
{597D9896-4B90-4E9E-9C99-445C2CB9FF60} = {597D9896-4B90-4E9E-9C99-445C2CB9FF60}
{E54456F4-D51A-4334-B225-92EBBED92B40} = {E54456F4-D51A-4334-B225-92EBBED92B40}
{EB015235-1E07-4CDA-9CC6-3FBCC27910D1} = {EB015235-1E07-4CDA-9CC6-3FBCC27910D1}
EndProjectSection
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.UnitTests", "tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj", "{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}"
EndProject
Expand Down Expand Up @@ -149,8 +157,8 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Service", "
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Service.Tests", "tests\FSharp.Compiler.Service.Tests\FSharp.Compiler.Service.Tests.fsproj", "{14F3D3D6-5C8E-43C2-98A2-17EA704D4DEA}"
ProjectSection(ProjectDependencies) = postProject
{FF76BD3C-5E0A-4752-B6C3-044F6E15719B} = {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}
{887630A3-4B1D-40EA-B8B3-2D842E9C40DB} = {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}
{FF76BD3C-5E0A-4752-B6C3-044F6E15719B} = {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VisualFSharpDebug", "vsintegration\Vsix\VisualFSharpFull\VisualFSharpDebug.csproj", "{A422D673-8E3B-4924-821B-DD3174173426}"
Expand Down
1 change: 1 addition & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ trigger:
exclude:
- .github/*
- docs/
- tests/scripts/
- attributions.md
- CODE_OF_CONDUCT.md
- DEVGUIDE.md
Expand Down
8 changes: 4 additions & 4 deletions src/Compiler/AbstractIL/ilreflect.fs
Original file line number Diff line number Diff line change
Expand Up @@ -479,11 +479,11 @@ module Zmap =

let equalTypes (s: Type) (t: Type) = s.Equals t

let equalTypeLists ss tt =
List.lengthsEqAndForall2 equalTypes ss tt
let equalTypeLists (tys1: Type list) (tys2: Type list) =
List.lengthsEqAndForall2 equalTypes tys1 tys2

let equalTypeArrays ss tt =
Array.lengthsEqAndForall2 equalTypes ss tt
let equalTypeArrays (tys1: Type[]) (tys2: Type[]) =
Array.lengthsEqAndForall2 equalTypes tys1 tys2

let getGenericArgumentsOfType (typT: Type) =
if typT.IsGenericType then
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/AbstractIL/ilx.fs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ type IlxClosureApps =
let rec instAppsAux n inst apps =
match apps with
| Apps_tyapp (ty, rest) -> Apps_tyapp(instILTypeAux n inst ty, instAppsAux n inst rest)
| Apps_app (dty, rest) -> Apps_app(instILTypeAux n inst dty, instAppsAux n inst rest)
| Apps_app (domainTy, rest) -> Apps_app(instILTypeAux n inst domainTy, instAppsAux n inst rest)
| Apps_done retTy -> Apps_done(instILTypeAux n inst retTy)

let rec instLambdasAux n inst lambdas =
Expand Down
14 changes: 7 additions & 7 deletions src/Compiler/Checking/CheckComputationExpressions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,10 @@ let TcComputationExpression (cenv: cenv) env (overallTy: OverallTy) tpenv (mWhol
// Give bespoke error messages for the FSharp.Core "query" builder
let isQuery =
match stripDebugPoints interpExpr with
| Expr.Val (vf, _, m) ->
let item = Item.CustomBuilder (vf.DisplayName, vf)
| Expr.Val (vref, _, m) ->
let item = Item.CustomBuilder (vref.DisplayName, vref)
CallNameResolutionSink cenv.tcSink (m, env.NameEnv, item, emptyTyparInst, ItemOccurence.Use, env.eAccessRights)
valRefEq cenv.g vf cenv.g.query_value_vref
valRefEq cenv.g vref cenv.g.query_value_vref
| _ -> false

/// Make a builder.Method(...) call
Expand Down Expand Up @@ -1909,8 +1909,8 @@ let TcSequenceExpression (cenv: cenv) env tpenv comp (overallTy: OverallTy) m =
// This transformation is visible in quotations and thus needs to remain.
| (TPat_as (TPat_wild _, PatternValBinding (v, _), _),
[_],
DebugPoints(Expr.App (Expr.Val (vf, _, _), _, [genEnumElemTy], [yieldExpr], _mYield), recreate))
when valRefEq cenv.g vf cenv.g.seq_singleton_vref ->
DebugPoints(Expr.App (Expr.Val (vref, _, _), _, [genEnumElemTy], [yieldExpr], _mYield), recreate))
when valRefEq cenv.g vref cenv.g.seq_singleton_vref ->

// The debug point mFor is attached to the 'map'
// The debug point mIn is attached to the lambda
Expand Down Expand Up @@ -2051,11 +2051,11 @@ let TcSequenceExpression (cenv: cenv) env tpenv comp (overallTy: OverallTy) m =
error(Error(FSComp.SR.tcUseForInSequenceExpression(), m))

| SynExpr.Match (spMatch, expr, clauses, _m, _trivia) ->
let inputExpr, matchty, tpenv = TcExprOfUnknownType cenv env tpenv expr
let inputExpr, inputTy, tpenv = TcExprOfUnknownType cenv env tpenv expr

let tclauses, tpenv =
(tpenv, clauses) ||> List.mapFold (fun tpenv (SynMatchClause(pat, cond, innerComp, _, sp, _)) ->
let patR, condR, vspecs, envinner, tpenv = TcMatchPattern cenv matchty env tpenv pat cond
let patR, condR, vspecs, envinner, tpenv = TcMatchPattern cenv inputTy env tpenv pat cond
let envinner =
match sp with
| DebugPointAtTarget.Yes -> { envinner with eIsControlFlow = true }
Expand Down
Loading

0 comments on commit 873eefc

Please sign in to comment.