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

Merge main to feature/lsp #18223

Closed
wants to merge 81 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
52c0649
Update azure-pipelines.yml
vzarytovskii Oct 8, 2024
94d49fc
Merge pull request #17850 from dotnet/merges/release/dev17.12-to-rele…
vzarytovskii Oct 8, 2024
764f97e
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
vzarytovskii Oct 8, 2024
051f5d1
Merge pull request #17852 from dotnet/merges/main-to-release/dev17.13
vzarytovskii Oct 8, 2024
99b02b2
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
vzarytovskii Oct 9, 2024
1827c9b
Localized file check-in by OneLocBuild Task: Build definition ID 499:…
dotnet-bot Oct 9, 2024
063654f
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
vzarytovskii Oct 9, 2024
a213e83
Merge pull request #17855 from dotnet/merges/main-to-release/dev17.13
vzarytovskii Oct 9, 2024
a9b108c
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
vzarytovskii Oct 9, 2024
13771ee
Merge branch 'release/dev17.13' into merges/release/dev17.12-to-relea…
T-Gro Oct 10, 2024
25fa115
Merge pull request #17861 from dotnet/merges/main-to-release/dev17.13
T-Gro Oct 10, 2024
1762e57
Merge branch 'release/dev17.13' into merges/release/dev17.12-to-relea…
T-Gro Oct 10, 2024
3571f70
Merge pull request #17862 from dotnet/merges/release/dev17.12-to-rele…
T-Gro Oct 10, 2024
200b7f4
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
T-Gro Oct 10, 2024
d4b0fce
Merge pull request #17869 from dotnet/merges/main-to-release/dev17.13
T-Gro Oct 10, 2024
4243f8f
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
T-Gro Oct 14, 2024
36cb76c
Merge pull request #17873 from dotnet/merges/main-to-release/dev17.13
T-Gro Oct 14, 2024
189564f
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
T-Gro Oct 16, 2024
c53a85c
Merge pull request #17885 from dotnet/merges/main-to-release/dev17.13
T-Gro Oct 16, 2024
af91595
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
vzarytovskii Oct 16, 2024
7ce6e40
Merge pull request #17890 from dotnet/merges/main-to-release/dev17.13
T-Gro Oct 16, 2024
635e73a
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
T-Gro Oct 17, 2024
2f65355
Merge pull request #17892 from dotnet/merges/main-to-release/dev17.13
T-Gro Oct 17, 2024
a269121
Merge pull request #17895 from dotnet/merges/main-to-release/dev17.13
vzarytovskii Oct 22, 2024
d6008d6
Merge branch 'release/dev17.13' into merges/release/dev17.12-to-relea…
T-Gro Oct 23, 2024
6a0829b
Merge pull request #17910 from dotnet/merges/release/dev17.12-to-rele…
T-Gro Oct 23, 2024
2f29080
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
T-Gro Oct 23, 2024
6482de0
Merge pull request #17908 from dotnet/merges/main-to-release/dev17.13
T-Gro Oct 23, 2024
4c6860a
Localized file check-in by OneLocBuild Task: Build definition ID 499:…
dotnet-bot Oct 23, 2024
98f7ab6
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
KevinRansom Oct 23, 2024
13eb328
Merge pull request #17914 from dotnet/merges/main-to-release/dev17.13
KevinRansom Oct 25, 2024
7e36f3d
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
KevinRansom Oct 27, 2024
974c7cf
Merge pull request #17926 from dotnet/merges/main-to-release/dev17.13
KevinRansom Oct 29, 2024
885d637
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
psfinaki Oct 29, 2024
02f6bb0
Merge pull request #17936 from dotnet/merges/main-to-release/dev17.13
psfinaki Oct 29, 2024
1ee8b6c
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
T-Gro Nov 1, 2024
2ede9ec
Merge pull request #17941 from dotnet/merges/main-to-release/dev17.13
T-Gro Nov 1, 2024
275fb80
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
vzarytovskii Nov 1, 2024
6dcaa8d
Merge pull request #17947 from dotnet/merges/main-to-release/dev17.13
T-Gro Nov 4, 2024
abce1c5
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
vzarytovskii Nov 4, 2024
6d6e689
Merge pull request #17954 from dotnet/merges/main-to-release/dev17.13
T-Gro Nov 5, 2024
e615c28
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
T-Gro Nov 6, 2024
a29b58f
Merge pull request #17958 from dotnet/merges/main-to-release/dev17.13
T-Gro Nov 6, 2024
b6480e8
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
T-Gro Nov 7, 2024
9704831
Merge pull request #17967 from dotnet/merges/main-to-release/dev17.13
T-Gro Nov 7, 2024
f732160
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
vzarytovskii Nov 7, 2024
4d2390a
Merge pull request #17972 from dotnet/merges/main-to-release/dev17.13
T-Gro Nov 8, 2024
005de12
Localized file check-in by OneLocBuild Task: Build definition ID 499:…
dotnet-bot Nov 8, 2024
ab3798a
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
T-Gro Nov 8, 2024
28c4395
Merge pull request #17983 from dotnet/merges/main-to-release/dev17.13
T-Gro Nov 8, 2024
3612d1f
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
vzarytovskii Nov 10, 2024
e9dab83
Merge pull request #17985 from dotnet/merges/main-to-release/dev17.13
T-Gro Nov 11, 2024
ef359ab
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
KevinRansom Nov 20, 2024
97c6172
Merge pull request #18030 from dotnet/merges/main-to-release/dev17.13
KevinRansom Nov 20, 2024
3dc980e
Merge main to release/dev17.13 (#18080)
dotnet-bot Nov 28, 2024
0c73988
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
vzarytovskii Nov 28, 2024
6a1d188
Merge pull request #18083 from dotnet/merges/main-to-release/dev17.13
T-Gro Dec 3, 2024
a6108d9
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
vzarytovskii Dec 5, 2024
4f84157
Merge pull request #18102 from dotnet/merges/main-to-release/dev17.13
vzarytovskii Dec 5, 2024
29b0172
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
vzarytovskii Dec 5, 2024
96e77ae
Merge pull request #18108 from dotnet/merges/main-to-release/dev17.13
vzarytovskii Dec 6, 2024
a861c28
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
T-Gro Dec 9, 2024
446f247
Merge pull request #18110 from dotnet/merges/main-to-release/dev17.13
vzarytovskii Dec 9, 2024
7983f9f
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
psfinaki Dec 11, 2024
a6fc9bb
Merge pull request #18122 from dotnet/merges/main-to-release/dev17.13
T-Gro Dec 11, 2024
6a93b99
Merge main to release/dev17.13 (#18131)
dotnet-bot Dec 12, 2024
c64b714
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
vzarytovskii Dec 13, 2024
a052d35
Merge pull request #18133 from dotnet/merges/main-to-release/dev17.13
psfinaki Dec 13, 2024
df35236
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
T-Gro Dec 13, 2024
673e82b
Merge pull request #18138 from dotnet/merges/main-to-release/dev17.13
KevinRansom Dec 14, 2024
96975ad
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
psfinaki Dec 16, 2024
ea682d0
Merge pull request #18146 from dotnet/merges/main-to-release/dev17.13
psfinaki Dec 16, 2024
ee84e06
Merge branch 'release/dev17.13' into merges/main-to-release/dev17.13
psfinaki Dec 17, 2024
5af9650
Merge pull request #18151 from dotnet/merges/main-to-release/dev17.13
psfinaki Dec 17, 2024
63a0928
Merge pull request #18204 from dotnet/main
KevinRansom Jan 6, 2025
7c8705f
Merge branch 'main' into merges/release/dev17.13-to-main
psfinaki Jan 8, 2025
9ac324d
Show obsolete warnings/errors when used with unit of measure (#18182)
edgarfgp Jan 9, 2025
88463f8
Merge pull request #18214 from dotnet/merges/release/dev17.13-to-main
0101 Jan 9, 2025
77e7e08
Versioning for 17.14 and 9.0.300 (#18222)
vzarytovskii Jan 9, 2025
b204f87
Fix AsyncLazy cancellation (#18211)
majocha Jan 9, 2025
32deb2c
Merge branch 'feature/lsp' into merges/main-to-feature/lsp
0101 Jan 21, 2025
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
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ variables:
# Should be 'current' release branch name, i.e. 'release/dev17.10' in dotnet/fsharp/refs/heads/main, 'release/dev17.10' in dotnet/fsharp/refs/heads/release/dev17.10 and 'release/dev17.9' in dotnet/fsharp/refs/heads/release/dev17.9
# Should **never** be 'main' in dotnet/fsharp/refs/heads/main, since it will start inserting to VS twice.
- name: FSharpReleaseBranchName
value: release/dev17.13
value: release/dev17.14
# VS Insertion branch name (NOT the same as F# branch)
# Should be previous release branch or 'main' in 'main' and 'main' in release branch
# (since for all *new* release branches we insert into VS main and for all *previous* releases we insert into corresponding VS release),
Expand Down Expand Up @@ -88,7 +88,7 @@ extends:
# Signed build #
#-------------------------------------------------------------------------------------------------------------------#
# Localization: we only run it for specific release branches
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/release/dev17.13') }}:
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/release/dev17.14') }}:
- template: /eng/common/templates-official/job/onelocbuild.yml@self
parameters:
MirrorRepo: fsharp
Expand Down
1 change: 1 addition & 0 deletions docs/release-notes/.FSharp.Compiler.Service/9.0.200.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* Completion: fix qualified completion in sequence expressions [PR #18111](https://github.com/dotnet/fsharp/pull/18111)
* Symbols: try to use ValReprInfoForDisplay in Mfv.CurriedParameterGroups ([PR #18124](https://github.com/dotnet/fsharp/pull/18124))
* Shim/file system: fix leaks of the shim [PR #18144](https://github.com/dotnet/fsharp/pull/18144)
* Fix for `Obsolete` attribute warning/error not taken into account when used with a unit of measure [PR #18182](https://github.com/dotnet/fsharp/pull/18182)

### Added

Expand Down
4 changes: 2 additions & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<!-- F# Version components -->
<FSMajorVersion>9</FSMajorVersion>
<FSMinorVersion>0</FSMinorVersion>
<FSBuildVersion>200</FSBuildVersion>
<FSBuildVersion>300</FSBuildVersion>
<FSRevisionVersion>0</FSRevisionVersion>
<!-- -->
<!-- F# Language version -->
Expand Down Expand Up @@ -53,7 +53,7 @@
<PropertyGroup>
<!-- These have to be in sync with latest release branch -->
<VSMajorVersion>17</VSMajorVersion>
<VSMinorVersion>13</VSMinorVersion>
<VSMinorVersion>14</VSMinorVersion>
<VSGeneralVersion>$(VSMajorVersion).0</VSGeneralVersion>
<VSAssemblyVersionPrefix>$(VSMajorVersion).$(VSMinorVersion).0</VSAssemblyVersionPrefix>
<VSAssemblyVersion>$(VSAssemblyVersionPrefix).0</VSAssemblyVersion>
Expand Down
22 changes: 21 additions & 1 deletion src/Compiler/Checking/AttributeChecking.fs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,27 @@ let CheckEntityAttributes g (tcref: TyconRef) m =
CheckFSharpAttributes g tcref.Attribs m

let CheckILEventAttributes g (tcref: TyconRef) cattrs m =
CheckILAttributes g (isByrefLikeTyconRef g m tcref) cattrs m
CheckILAttributes g (isByrefLikeTyconRef g m tcref) cattrs m

let CheckUnitOfMeasureAttributes g (measure: Measure) =
let checkAttribs tm m =
let attribs =
ListMeasureConOccsWithNonZeroExponents g true tm
|> List.map fst
|> List.map(_.Attribs)
|> List.concat

CheckFSharpAttributes g attribs m |> CommitOperationResult

match measure with
| Measure.Const(range = m) -> checkAttribs measure m
| Measure.Inv ms -> checkAttribs measure ms.Range
| Measure.One(m) -> checkAttribs measure m
| Measure.RationalPower(measure = ms1) -> checkAttribs measure ms1.Range
| Measure.Prod(measure1= ms1; measure2= ms2) ->
checkAttribs ms1 ms1.Range
checkAttribs ms2 ms2.Range
| Measure.Var(typar) -> checkAttribs measure typar.Range

/// Check the attributes associated with a method, returning warnings and errors as data.
let CheckMethInfoAttributes g m tyargsOpt (minfo: MethInfo) =
Expand Down
2 changes: 2 additions & 0 deletions src/Compiler/Checking/AttributeChecking.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ val CheckEntityAttributes: g: TcGlobals -> tcref: TyconRef -> m: range -> Operat

val CheckUnionCaseAttributes: g: TcGlobals -> x: UnionCaseRef -> m: range -> OperationResult<unit>

val CheckUnitOfMeasureAttributes: g: TcGlobals -> measure: Measure -> unit

val CheckRecdFieldAttributes: g: TcGlobals -> x: RecdFieldRef -> m: range -> OperationResult<unit>

val CheckValAttributes: g: TcGlobals -> x: ValRef -> m: range -> OperationResult<unit>
Expand Down
13 changes: 10 additions & 3 deletions src/Compiler/Checking/CheckDeclarations.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3241,6 +3241,13 @@ module EstablishTypeDefinitionCores =
warning(Error(FSComp.SR.chkAttributeAliased(attrib.TypeRef.FullName), tycon.Id.idRange))
| _ -> ()

// Check for attributes in unit-of-measure declarations
// [<Measure>] type x = 1<s>
// ^
match stripTyEqns g ty with
| TType_measure tm -> CheckUnitOfMeasureAttributes g tm
| _ -> ()

checkAttributeAliased ty tycon g.attrib_AutoOpenAttribute
checkAttributeAliased ty tycon g.attrib_StructAttribute

Expand Down Expand Up @@ -3807,11 +3814,11 @@ module EstablishTypeDefinitionCores =

and accInMeasure measureTy acc =
match stripUnitEqns measureTy with
| Measure.Const tcref when ListSet.contains (===) tcref.Deref tycons ->
| Measure.Const(tyconRef= tcref) when ListSet.contains (===) tcref.Deref tycons ->
(tycon, tcref.Deref) :: acc
| Measure.Const tcref when tcref.IsTypeAbbrev ->
| Measure.Const(tyconRef= tcref) when tcref.IsTypeAbbrev ->
accInMeasure (reduceTyconRefAbbrevMeasureable tcref) acc
| Measure.Prod (ms1, ms2) -> accInMeasure ms1 (accInMeasure ms2 acc)
| Measure.Prod(measure1= ms1; measure2= ms2) -> accInMeasure ms1 (accInMeasure ms2 acc)
| Measure.Inv invTy -> accInMeasure invTy acc
| _ -> acc

Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Checking/CheckPatterns.fs
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ and TcPatLongIdentLiteral warnOnUpper (cenv: cenv) env vFlags patEnv ty (mLongId
match vref.LiteralValue with
| None -> error (Error(FSComp.SR.tcNonLiteralCannotBeUsedInPattern(), m))
| Some lit ->
let _, _, _, vexpty, _, _ = TcVal true cenv env tpenv vref None None mLongId
let _, _, _, vexpty, _, _ = TcVal cenv env tpenv vref None None mLongId
CheckValAccessible mLongId env.AccessRights vref
CheckFSharpAttributes g vref.Attribs mLongId |> CommitOperationResult
CheckNoArgsForLiteral args m
Expand Down
29 changes: 15 additions & 14 deletions src/Compiler/Checking/ConstraintSolver.fs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

module internal FSharp.Compiler.ConstraintSolver

open FSharp.Compiler.Text.Range
open Internal.Utilities.Collections
open Internal.Utilities.Library
open Internal.Utilities.Library.Extras
Expand Down Expand Up @@ -734,7 +735,7 @@ let SubstMeasureWarnIfRigid (csenv: ConstraintSolverEnv) trace (v: Typar) ms =
// Propagate static requirements from 'tp' to 'ty'
do! SolveTypStaticReq csenv trace v.StaticReq (TType_measure ms)
SubstMeasure v ms
if v.Rigidity = TyparRigidity.Anon && measureEquiv csenv.g ms Measure.One then
if v.Rigidity = TyparRigidity.Anon && measureEquiv csenv.g ms (Measure.One ms.Range) then
return! WarnD(Error(FSComp.SR.csCodeLessGeneric(), v.Range))
else
()
Expand All @@ -760,17 +761,17 @@ let UnifyMeasureWithOne (csenv: ConstraintSolverEnv) trace ms =
match FindPreferredTypar nonRigidVars with
| (v, e) :: vs ->
let unexpandedCons = ListMeasureConOccsWithNonZeroExponents csenv.g false ms
let newms = ProdMeasures (List.map (fun (c, e') -> Measure.RationalPower (Measure.Const c, NegRational (DivRational e' e))) unexpandedCons
let newms = ProdMeasures (List.map (fun (c, e') -> Measure.RationalPower(Measure.Const(c, ms.Range), NegRational (DivRational e' e))) unexpandedCons
@ List.map (fun (v, e') -> Measure.RationalPower (Measure.Var v, NegRational (DivRational e' e))) (vs @ rigidVars))

SubstMeasureWarnIfRigid csenv trace v newms

// Otherwise we require ms to be 1
| [] -> if measureEquiv csenv.g ms Measure.One then CompleteD else localAbortD
| [] -> if measureEquiv csenv.g ms (Measure.One ms.Range) then CompleteD else localAbortD

/// Imperatively unify unit-of-measure expression ms1 against ms2
let UnifyMeasures (csenv: ConstraintSolverEnv) trace ms1 ms2 =
UnifyMeasureWithOne csenv trace (Measure.Prod(ms1, Measure.Inv ms2))
UnifyMeasureWithOne csenv trace (Measure.Prod(ms1, Measure.Inv ms2, (unionRanges ms1.Range ms2.Range)))

/// Simplify a unit-of-measure expression ms that forms part of a type scheme.
/// We make substitutions for vars, which are the (remaining) bound variables
Expand All @@ -791,7 +792,7 @@ let SimplifyMeasure g vars ms =
let newms =
ProdMeasures [
for (c, e') in nonZeroCon do
Measure.RationalPower (Measure.Const c, NegRational (DivRational e' e))
Measure.RationalPower (Measure.Const(c, ms.Range), NegRational (DivRational e' e))
for (v', e') in nonZeroVar do
if typarEq v v' then
newvarExpr
Expand Down Expand Up @@ -1329,13 +1330,13 @@ and SolveTypeEqualsType (csenv: ConstraintSolverEnv) ndeep m2 (trace: OptionalTr
// Catch float<_>=float<1>, float32<_>=float32<1> and decimal<_>=decimal<1>
| (_, TType_app (tc2, [ms2], _)) when (tc2.IsMeasureableReprTycon && typeEquiv csenv.g sty1 (reduceTyconRefMeasureableOrProvided csenv.g tc2 [ms2])) ->
trackErrors {
do! SolveTypeEqualsType csenv ndeep m2 trace None (TType_measure Measure.One) ms2
do! SolveTypeEqualsType csenv ndeep m2 trace None (TType_measure(Measure.One m2)) ms2
do! SolveNullnessEquiv csenv m2 trace ty1 ty2 (nullnessOfTy g sty1) (nullnessOfTy g sty2)
}

| (TType_app (tc1, [ms1], _), _) when (tc1.IsMeasureableReprTycon && typeEquiv csenv.g sty2 (reduceTyconRefMeasureableOrProvided csenv.g tc1 [ms1])) ->
trackErrors {
do! SolveTypeEqualsType csenv ndeep m2 trace None ms1 (TType_measure Measure.One)
do! SolveTypeEqualsType csenv ndeep m2 trace None ms1 (TType_measure(Measure.One m2))
do! SolveNullnessEquiv csenv m2 trace ty1 ty2 (nullnessOfTy g sty1) (nullnessOfTy g sty2)
}

Expand Down Expand Up @@ -1518,13 +1519,13 @@ and SolveTypeSubsumesType (csenv: ConstraintSolverEnv) ndeep m2 (trace: Optional
// Enforce the identities float=float<1>, float32=float32<1> and decimal=decimal<1>
| _, TType_app (tc2, [ms2], _) when tc2.IsMeasureableReprTycon && typeEquiv csenv.g sty1 (reduceTyconRefMeasureableOrProvided csenv.g tc2 [ms2]) ->
trackErrors {
do! SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln ms2 (TType_measure Measure.One)
do! SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln ms2 (TType_measure(Measure.One m2))
do! SolveNullnessSubsumesNullness csenv m2 trace ty1 ty2 (nullnessOfTy g sty1) (nullnessOfTy g sty2)
}

| TType_app (tc1, [ms1], _), _ when tc1.IsMeasureableReprTycon && typeEquiv csenv.g sty2 (reduceTyconRefMeasureableOrProvided csenv.g tc1 [ms1]) ->
trackErrors {
do! SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln ms1 (TType_measure Measure.One)
do! SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln ms1 (TType_measure(Measure.One m2))
do! SolveNullnessSubsumesNullness csenv m2 trace ty1 ty2 (nullnessOfTy g sty1) (nullnessOfTy g sty2)
}

Expand Down Expand Up @@ -1620,7 +1621,7 @@ and DepthCheck ndeep m =
and SolveDimensionlessNumericType (csenv: ConstraintSolverEnv) ndeep m2 trace ty =
match getMeasureOfType csenv.g ty with
| Some (tcref, _) ->
SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace ty (mkWoNullAppTy tcref [TType_measure Measure.One])
SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace ty (mkWoNullAppTy tcref [TType_measure(Measure.One m2)])
| None ->
CompleteD

Expand Down Expand Up @@ -1727,7 +1728,7 @@ and SolveMemberConstraint (csenv: ConstraintSolverEnv) ignoreUnresolvedOverload
| Some (tcref, ms1) ->
let ms2 = freshMeasure ()
do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argTy2 (mkWoNullAppTy tcref [TType_measure ms2])
do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace retTy (mkWoNullAppTy tcref [TType_measure (Measure.Prod(ms1, if nm = "op_Multiply" then ms2 else Measure.Inv ms2))])
do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace retTy (mkWoNullAppTy tcref [TType_measure (Measure.Prod(ms1, (if nm = "op_Multiply" then ms2 else Measure.Inv ms2), unionRanges ms1.Range ms2.Range))])
return TTraitBuiltIn

| _ ->
Expand All @@ -1736,7 +1737,7 @@ and SolveMemberConstraint (csenv: ConstraintSolverEnv) ignoreUnresolvedOverload
| Some (tcref, ms2) ->
let ms1 = freshMeasure ()
do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argTy1 (mkWoNullAppTy tcref [TType_measure ms1])
do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace retTy (mkWoNullAppTy tcref [TType_measure (Measure.Prod(ms1, if nm = "op_Multiply" then ms2 else Measure.Inv ms2))])
do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace retTy (mkWoNullAppTy tcref [TType_measure (Measure.Prod(ms1, (if nm = "op_Multiply" then ms2 else Measure.Inv ms2), unionRanges ms1.Range ms2.Range))])
return TTraitBuiltIn

| _ ->
Expand Down Expand Up @@ -1870,7 +1871,7 @@ and SolveMemberConstraint (csenv: ConstraintSolverEnv) ignoreUnresolvedOverload
match getMeasureOfType g argTy1 with
| Some (tcref, _) ->
let ms1 = freshMeasure ()
do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argTy1 (mkWoNullAppTy tcref [TType_measure (Measure.Prod (ms1, ms1))])
do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argTy1 (mkWoNullAppTy tcref [TType_measure (Measure.Prod (ms1, ms1, ms1.Range))])
do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace retTy (mkWoNullAppTy tcref [TType_measure ms1])
return TTraitBuiltIn
| None ->
Expand Down Expand Up @@ -1923,7 +1924,7 @@ and SolveMemberConstraint (csenv: ConstraintSolverEnv) ignoreUnresolvedOverload
do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argTy2 argTy1
match getMeasureOfType g argTy1 with
| None -> do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace retTy argTy1
| Some (tcref, _) -> do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace retTy (mkWoNullAppTy tcref [TType_measure Measure.One])
| Some (tcref, ms) -> do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace retTy (mkWoNullAppTy tcref [TType_measure(Measure.One ms.Range)])
return TTraitBuiltIn

| _ ->
Expand Down
Loading