Skip to content

Commit 3044166

Browse files
authored
Merge pull request #17749 from dotnet/merges/main-to-release/dev17.12
Merge main to release/dev17.12
2 parents ee36587 + 79de956 commit 3044166

37 files changed

+307
-145
lines changed

docs/release-notes/.FSharp.Compiler.Service/9.0.100.md

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* Add missing byte chars notations, enforce limits in decimal notation in byte char & string (Issues [#15867](https://github.com/dotnet/fsharp/issues/15867), [#15868](https://github.com/dotnet/fsharp/issues/15868), [#15869](https://github.com/dotnet/fsharp/issues/15869), [PR #15898](https://github.com/dotnet/fsharp/pull/15898))
1717
* Parentheses analysis: keep extra parentheses around unit & tuples in method definitions. ([PR #17618](https://github.com/dotnet/fsharp/pull/17618))
1818
* Fix IsUnionCaseTester throwing for non-methods/properties [#17301](https://github.com/dotnet/fsharp/pull/17634)
19+
* Fix xmlc doc tooltip display for nullable types [#17741](https://github.com/dotnet/fsharp/pull/17741)
1920
* Consider `open type` used when the type is an enum and any of the enum cases is used unqualified. ([PR #17628](https://github.com/dotnet/fsharp/pull/17628))
2021
* Guard for possible StackOverflowException when typechecking non recursive modules and namespaces ([PR #17654](https://github.com/dotnet/fsharp/pull/17654))
2122
* Nullable - fix for processing System.Nullable types with nesting ([PR #17736](https://github.com/dotnet/fsharp/pull/17736))
@@ -36,6 +37,8 @@
3637
* Enable LanguageFeature.EnforceAttributeTargets in F# 9.0. ([Issue #17514](https://github.com/dotnet/fsharp/issues/17558), [PR #17516](https://github.com/dotnet/fsharp/pull/17558))
3738
* Parser: better recovery for unfinished patterns ([PR #17231](https://github.com/dotnet/fsharp/pull/17231), [PR #17232](https://github.com/dotnet/fsharp/pull/17232)))
3839
* Enable consuming generic arguments defined as `allows ref struct` in C# ([Issue #17597](https://github.com/dotnet/fsharp/issues/17597)
40+
* Trivia for SynTypeConstraint.WhereTyparNotSupportsNull. ([Issue #17721](https://github.com/dotnet/fsharp/issues/17721), [PR #17745](https://github.com/dotnet/fsharp/pull/17745))
41+
* Trivia for SynType.WithNull. ([Issue #17720](https://github.com/dotnet/fsharp/issues/17720), [PR #17745](https://github.com/dotnet/fsharp/pull/17745))
3942

4043
### Changed
4144

src/Compiler/Checking/CheckDeclarations.fs

+14-14
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ module TcRecdUnionAndEnumDeclarations =
431431
let TcFieldDecl (cenv: cenv) env parent isIncrClass tpenv (isStatic, synAttrs, id: Ident, nameGenerated, ty, isMutable, xmldoc, vis) =
432432
let g = cenv.g
433433
let m = id.idRange
434-
let attrs, _ = TcAttributesWithPossibleTargets false cenv env AttributeTargets.FieldDecl synAttrs
434+
let attrs, _ = TcAttributesWithPossibleTargets TcCanFail.ReportAllErrors cenv env AttributeTargets.FieldDecl synAttrs
435435

436436
let attrsForProperty, attrsForField = attrs |> List.partition (fun (attrTargets, _) -> (attrTargets &&& AttributeTargets.Property) <> enum 0)
437437
let attrsForProperty = (List.map snd attrsForProperty)
@@ -455,7 +455,7 @@ module TcRecdUnionAndEnumDeclarations =
455455
match parent with
456456
| Parent tcref when useGenuineField tcref.Deref rfspec ->
457457
// Recheck the attributes for errors if the definition only generates a field
458-
TcAttributesWithPossibleTargets false cenv env AttributeTargets.FieldDeclRestricted synAttrs |> ignore
458+
TcAttributesWithPossibleTargets TcCanFail.ReportAllErrors cenv env AttributeTargets.FieldDeclRestricted synAttrs |> ignore
459459
| _ -> ()
460460
rfspec
461461

@@ -2909,9 +2909,9 @@ module EstablishTypeDefinitionCores =
29092909

29102910
if reportAttributeTargetsErrors then
29112911
if hasStructAttr then
2912-
TcAttributesWithPossibleTargets false cenv envinner AttributeTargets.Struct synAttrs |> ignore
2912+
TcAttributesWithPossibleTargets TcCanFail.IgnoreMemberResoutionError cenv envinner AttributeTargets.Struct synAttrs |> ignore
29132913
else
2914-
TcAttributesWithPossibleTargets false cenv envinner AttributeTargets.Class synAttrs |> ignore
2914+
TcAttributesWithPossibleTargets TcCanFail.IgnoreMemberResoutionError cenv envinner AttributeTargets.Class synAttrs |> ignore
29152915

29162916
// Note: the table of union cases is initially empty
29172917
Construct.MakeUnionRepr []
@@ -2934,9 +2934,9 @@ module EstablishTypeDefinitionCores =
29342934

29352935
if reportAttributeTargetsErrors then
29362936
if hasStructAttr then
2937-
TcAttributesWithPossibleTargets false cenv envinner AttributeTargets.Struct synAttrs |> ignore
2937+
TcAttributesWithPossibleTargets TcCanFail.IgnoreMemberResoutionError cenv envinner AttributeTargets.Struct synAttrs |> ignore
29382938
else
2939-
TcAttributesWithPossibleTargets false cenv envinner AttributeTargets.Class synAttrs |> ignore
2939+
TcAttributesWithPossibleTargets TcCanFail.IgnoreMemberResoutionError cenv envinner AttributeTargets.Class synAttrs |> ignore
29402940

29412941
// Note: the table of record fields is initially empty
29422942
TFSharpTyconRepr (Construct.NewEmptyFSharpTyconData TFSharpRecord)
@@ -2952,19 +2952,19 @@ module EstablishTypeDefinitionCores =
29522952
match kind with
29532953
| SynTypeDefnKind.Class ->
29542954
if reportAttributeTargetsErrors then
2955-
TcAttributesWithPossibleTargets false cenv envinner AttributeTargets.Class synAttrs |> ignore
2955+
TcAttributesWithPossibleTargets TcCanFail.IgnoreMemberResoutionError cenv envinner AttributeTargets.Class synAttrs |> ignore
29562956
TFSharpClass
29572957
| SynTypeDefnKind.Interface ->
29582958
if reportAttributeTargetsErrors then
2959-
TcAttributesWithPossibleTargets false cenv envinner AttributeTargets.Interface synAttrs |> ignore
2959+
TcAttributesWithPossibleTargets TcCanFail.IgnoreMemberResoutionError cenv envinner AttributeTargets.Interface synAttrs |> ignore
29602960
TFSharpInterface
29612961
| SynTypeDefnKind.Delegate _ ->
29622962
if reportAttributeTargetsErrors then
2963-
TcAttributesWithPossibleTargets false cenv envinner AttributeTargets.Delegate synAttrs |> ignore
2963+
TcAttributesWithPossibleTargets TcCanFail.IgnoreMemberResoutionError cenv envinner AttributeTargets.Delegate synAttrs |> ignore
29642964
TFSharpDelegate (MakeSlotSig("Invoke", g.unit_ty, [], [], [], None))
29652965
| SynTypeDefnKind.Struct ->
29662966
if reportAttributeTargetsErrors then
2967-
TcAttributesWithPossibleTargets false cenv envinner AttributeTargets.Struct synAttrs |> ignore
2967+
TcAttributesWithPossibleTargets TcCanFail.IgnoreMemberResoutionError cenv envinner AttributeTargets.Struct synAttrs |> ignore
29682968
TFSharpStruct
29692969
| _ -> error(InternalError("should have inferred tycon kind", m))
29702970

@@ -2973,7 +2973,7 @@ module EstablishTypeDefinitionCores =
29732973
| SynTypeDefnSimpleRepr.Enum _ ->
29742974
noCLIMutableAttributeCheck()
29752975
if reportAttributeTargetsErrors then
2976-
TcAttributesWithPossibleTargets false cenv envinner AttributeTargets.Enum synAttrs |> ignore
2976+
TcAttributesWithPossibleTargets TcCanFail.IgnoreMemberResoutionError cenv envinner AttributeTargets.Enum synAttrs |> ignore
29772977
TFSharpTyconRepr (Construct.NewEmptyFSharpTyconData TFSharpEnum)
29782978

29792979
// OK, now fill in the (partially computed) type representation
@@ -4035,7 +4035,7 @@ module EstablishTypeDefinitionCores =
40354035
// Phase 1B. Establish the kind of each type constructor
40364036
// Here we run InferTyconKind and record partial information about the kind of the type constructor.
40374037
// This means FSharpTyconKind is set, which means isSealedTy, isInterfaceTy etc. give accurate results.
4038-
let withAttrs =
4038+
let withAttrs =
40394039
(envMutRecPrelim, withEnvs) ||> MutRecShapes.mapTyconsWithEnv (fun envForDecls (origInfo, tyconOpt) ->
40404040
let res =
40414041
match origInfo, tyconOpt with
@@ -5202,7 +5202,7 @@ let TcModuleOrNamespaceElementsMutRec (cenv: cenv) parent typeNames m envInitial
52025202
let mutRecDefnsChecked, envAfter = TcDeclarations.TcMutRecDefinitions cenv envInitial parent typeNames tpenv m scopem mutRecNSInfo mutRecDefns true
52035203

52045204
// Check the assembly attributes
5205-
let attrs, _ = TcAttributesWithPossibleTargets false cenv envAfter AttributeTargets.Top synAttrs
5205+
let attrs, _ = TcAttributesWithPossibleTargets TcCanFail.ReportAllErrors cenv envAfter AttributeTargets.Top synAttrs
52065206

52075207
// Check the non-escaping condition as we build the list of module expressions on the way back up
52085208
let moduleContents = TcMutRecDefsFinish cenv mutRecDefnsChecked m
@@ -5279,7 +5279,7 @@ let rec TcModuleOrNamespaceElementNonMutRec (cenv: cenv) parent typeNames scopem
52795279
return! failwith "unreachable"
52805280

52815281
| SynModuleDecl.Attributes (Attributes synAttrs, _) ->
5282-
let attrs, _ = TcAttributesWithPossibleTargets false cenv env AttributeTargets.Top synAttrs
5282+
let attrs, _ = TcAttributesWithPossibleTargets TcCanFail.ReportAllErrors cenv env AttributeTargets.Top synAttrs
52835283
return ([], [], attrs), env, env
52845284

52855285
| SynModuleDecl.HashDirective _ ->

src/Compiler/Checking/Expressions/CheckExpressions.fs

+14-7
Original file line numberDiff line numberDiff line change
@@ -1010,6 +1010,13 @@ let TranslatePartialValReprInfo tps (PrelimValReprInfo (argsData, retData)) =
10101010
// Members
10111011
//-------------------------------------------------------------------------
10121012

1013+
1014+
[<RequireQualifiedAccess>]
1015+
type TcCanFail =
1016+
| IgnoreMemberResoutionError
1017+
| IgnoreAllErrors
1018+
| ReportAllErrors
1019+
10131020
let TcAddNullnessToType (warn: bool) (cenv: cenv) (env: TcEnv) nullness innerTyC m =
10141021
let g = cenv.g
10151022
if g.langFeatureNullness then
@@ -4028,7 +4035,7 @@ let rec TcTyparConstraint ridx (cenv: cenv) newOk checkConstraints occ (env: TcE
40284035
| SynTypeConstraint.WhereTyparSupportsNull(tp, m) ->
40294036
TcSimpleTyparConstraint cenv env newOk tpenv tp m AddCxTypeUseSupportsNull
40304037

4031-
| SynTypeConstraint.WhereTyparNotSupportsNull(tp, m) ->
4038+
| SynTypeConstraint.WhereTyparNotSupportsNull(tp, m, _) ->
40324039
if g.langFeatureNullness then
40334040
TcSimpleTyparConstraint cenv env newOk tpenv tp m AddCxTypeDefnNotSupportsNull
40344041
else
@@ -4472,7 +4479,7 @@ and TcTypeOrMeasure kindOpt (cenv: cenv) newOk checkConstraints occ (iwsam: Warn
44724479
errorR(Error(FSComp.SR.parsInvalidLiteralInType(), m))
44734480
NewErrorType (), tpenv
44744481

4475-
| SynType.WithNull(innerTy, ambivalent, m) ->
4482+
| SynType.WithNull(innerTy, ambivalent, m, _) ->
44764483
let innerTyC, tpenv = TcTypeAndRecover cenv newOk checkConstraints occ WarnOnIWSAM.Yes env tpenv innerTy
44774484
let nullness = if ambivalent then KnownAmbivalentToNull else KnownWithNull
44784485
let tyWithNull = TcAddNullnessToType false cenv env nullness innerTyC m
@@ -10869,7 +10876,7 @@ and TcNormalizedBinding declKind (cenv: cenv) env tpenv overallTy safeThisValOpt
1086910876
// For all but attributes positioned at the return value, disallow implicitly
1087010877
// targeting the return value.
1087110878
let tgtEx = if isRet then enum 0 else AttributeTargets.ReturnValue
10872-
let attrs, _ = TcAttributesMaybeFailEx false cenv envinner tgt tgtEx attrs
10879+
let attrs, _ = TcAttributesMaybeFailEx TcCanFail.ReportAllErrors cenv envinner tgt tgtEx attrs
1087310880
let attrs: Attrib list = attrs
1087410881
if attrTgt = enum 0 && not (isNil attrs) then
1087510882
for attr in attrs do
@@ -11131,7 +11138,7 @@ and TcAttributeTargetsOnLetBindings (cenv: cenv) env attrs overallPatTy overallE
1113111138
else
1113211139
AttributeTargets.ReturnValue ||| AttributeTargets.Field ||| AttributeTargets.Property
1113311140

11134-
TcAttributesWithPossibleTargets false cenv env attrTgt attrs |> ignore
11141+
TcAttributesWithPossibleTargets TcCanFail.ReportAllErrors cenv env attrTgt attrs |> ignore
1113511142

1113611143
and TcLiteral (cenv: cenv) overallTy env tpenv (attrs, synLiteralValExpr) =
1113711144

@@ -11291,7 +11298,7 @@ and TcAttributeEx canFail (cenv: cenv) (env: TcEnv) attrTgt attrEx (synAttr: Syn
1129111298
error(Error(FSComp.SR.tcAttributeIsNotValidForLanguageElement(), mAttr))
1129211299

1129311300
match ResolveObjectConstructor cenv.nameResolver env.DisplayEnv mAttr ad ty with
11294-
| Exception _ when canFail -> [ ], true
11301+
| Exception _ when canFail = TcCanFail.IgnoreAllErrors || canFail = TcCanFail.IgnoreMemberResoutionError -> [ ], true
1129511302
| res ->
1129611303

1129711304
let item = ForceRaise res
@@ -11396,11 +11403,11 @@ and TcAttributesMaybeFail canFail cenv env attrTgt synAttribs =
1139611403
TcAttributesMaybeFailEx canFail cenv env attrTgt (enum 0) synAttribs
1139711404

1139811405
and TcAttributesCanFail cenv env attrTgt synAttribs =
11399-
let attrs, didFail = TcAttributesMaybeFail true cenv env attrTgt synAttribs
11406+
let attrs, didFail = TcAttributesMaybeFail TcCanFail.IgnoreAllErrors cenv env attrTgt synAttribs
1140011407
attrs, (fun () -> if didFail then TcAttributes cenv env attrTgt synAttribs else attrs)
1140111408

1140211409
and TcAttributes cenv env attrTgt synAttribs =
11403-
TcAttributesMaybeFail false cenv env attrTgt synAttribs |> fst
11410+
TcAttributesMaybeFail TcCanFail.ReportAllErrors cenv env attrTgt synAttribs |> fst
1140411411

1140511412
//-------------------------------------------------------------------------
1140611413
// TcLetBinding

src/Compiler/Checking/Expressions/CheckExpressions.fsi

+7-1
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,12 @@ type PostSpecialValsRecursiveBinding =
345345
{ ValScheme: ValScheme
346346
Binding: Binding }
347347

348+
[<RequireQualifiedAccess>]
349+
type TcCanFail =
350+
| IgnoreMemberResoutionError
351+
| IgnoreAllErrors
352+
| ReportAllErrors
353+
348354
/// Represents a recursive binding after it has been both checked and generalized, but
349355
/// before initialization recursion has been rewritten
350356
type PreInitializationGraphEliminationBinding =
@@ -598,7 +604,7 @@ val TcAttributesCanFail:
598604

599605
/// Check a set of attributes which can only target specific elements
600606
val TcAttributesWithPossibleTargets:
601-
canFail: bool ->
607+
canFail: TcCanFail ->
602608
cenv: TcFileState ->
603609
env: TcEnv ->
604610
attrTgt: AttributeTargets ->

src/Compiler/Service/ServiceParseTreeWalk.fs

+1-1
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ module SyntaxTraversal =
838838
| SynType.Fun(argType = ty1; returnType = ty2) -> [ ty1; ty2 ] |> List.tryPick (traverseSynType path)
839839
| SynType.MeasurePower(ty, _, _)
840840
| SynType.HashConstraint(ty, _)
841-
| SynType.WithNull(ty, _, _)
841+
| SynType.WithNull(innerType = ty)
842842
| SynType.WithGlobalConstraints(ty, _, _)
843843
| SynType.Array(_, ty, _) -> traverseSynType path ty
844844
| SynType.StaticConstantNamed(ty1, ty2, _)

src/Compiler/Service/ServiceParsedInputOps.fs

+4-4
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ module ParsedInput =
647647
| SynTypeConstraint.WhereTyparIsReferenceType(t, _) -> walkTypar t
648648
| SynTypeConstraint.WhereTyparIsUnmanaged(t, _) -> walkTypar t
649649
| SynTypeConstraint.WhereTyparSupportsNull(t, _) -> walkTypar t
650-
| SynTypeConstraint.WhereTyparNotSupportsNull(t, _) -> walkTypar t
650+
| SynTypeConstraint.WhereTyparNotSupportsNull(genericName = t) -> walkTypar t
651651
| SynTypeConstraint.WhereTyparIsComparable(t, _) -> walkTypar t
652652
| SynTypeConstraint.WhereTyparIsEquatable(t, _) -> walkTypar t
653653
| SynTypeConstraint.WhereTyparSubtypeOfType(t, ty, _) -> walkTypar t |> Option.orElseWith (fun () -> walkType ty)
@@ -711,7 +711,7 @@ module ParsedInput =
711711
| SynType.Array(_, t, _) -> walkType t
712712
| SynType.Fun(argType = t1; returnType = t2) -> walkType t1 |> Option.orElseWith (fun () -> walkType t2)
713713
| SynType.WithGlobalConstraints(t, _, _) -> walkType t
714-
| SynType.WithNull(t, _, _)
714+
| SynType.WithNull(innerType = t)
715715
| SynType.HashConstraint(t, _) -> walkType t
716716
| SynType.Or(t1, t2, _, _) -> walkType t1 |> Option.orElseWith (fun () -> walkType t2)
717717
| SynType.MeasurePower(t, _, _) -> walkType t
@@ -1914,7 +1914,7 @@ module ParsedInput =
19141914
| SynTypeConstraint.WhereTyparIsReferenceType(t, _)
19151915
| SynTypeConstraint.WhereTyparIsUnmanaged(t, _)
19161916
| SynTypeConstraint.WhereTyparSupportsNull(t, _)
1917-
| SynTypeConstraint.WhereTyparNotSupportsNull(t, _)
1917+
| SynTypeConstraint.WhereTyparNotSupportsNull(genericName = t)
19181918
| SynTypeConstraint.WhereTyparIsComparable(t, _)
19191919
| SynTypeConstraint.WhereTyparIsEquatable(t, _) -> walkTypar t
19201920
| SynTypeConstraint.WhereTyparDefaultsToType(t, ty, _)
@@ -1976,7 +1976,7 @@ module ParsedInput =
19761976
| SynType.Array(_, t, _)
19771977
| SynType.HashConstraint(t, _)
19781978
| SynType.MeasurePower(t, _, _)
1979-
| SynType.WithNull(t, _, _)
1979+
| SynType.WithNull(innerType = t)
19801980
| SynType.Paren(t, _)
19811981
| SynType.SignatureParameter(usedType = t) -> walkType t
19821982
| SynType.Fun(argType = t1; returnType = t2)

src/Compiler/SyntaxTree/SyntaxTree.fs

+2-2
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ type SynTypeConstraint =
332332

333333
| WhereTyparSupportsNull of typar: SynTypar * range: range
334334

335-
| WhereTyparNotSupportsNull of genericName: SynTypar * range: range
335+
| WhereTyparNotSupportsNull of genericName: SynTypar * range: range * trivia: SynTypeConstraintWhereTyparNotSupportsNullTrivia
336336

337337
| WhereTyparIsComparable of typar: SynTypar * range: range
338338

@@ -465,7 +465,7 @@ type SynType =
465465

466466
| StaticConstantNamed of ident: SynType * value: SynType * range: range
467467

468-
| WithNull of innerType: SynType * ambivalent: bool * range: range
468+
| WithNull of innerType: SynType * ambivalent: bool * range: range * trivia: SynTypeWithNullTrivia
469469

470470
| Paren of innerType: SynType * range: range
471471

src/Compiler/SyntaxTree/SyntaxTree.fsi

+5-2
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,10 @@ type SynTypeConstraint =
409409
| WhereTyparSupportsNull of typar: SynTypar * range: range
410410

411411
/// F# syntax is 'typar : null
412-
| WhereTyparNotSupportsNull of genericName: SynTypar * range: range
412+
| WhereTyparNotSupportsNull of
413+
genericName: SynTypar *
414+
range: range *
415+
trivia: SynTypeConstraintWhereTyparNotSupportsNullTrivia
413416

414417
/// F# syntax is 'typar: comparison
415418
| WhereTyparIsComparable of typar: SynTypar * range: range
@@ -527,7 +530,7 @@ type SynType =
527530
/// F# syntax: ident=1 etc., used in static parameters to type providers
528531
| StaticConstantNamed of ident: SynType * value: SynType * range: range
529532

530-
| WithNull of innerType: SynType * ambivalent: bool * range: range
533+
| WithNull of innerType: SynType * ambivalent: bool * range: range * trivia: SynTypeWithNullTrivia
531534

532535
| Paren of innerType: SynType * range: range
533536

src/Compiler/SyntaxTree/SyntaxTrivia.fs

+6
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,9 @@ type SynFieldTrivia =
404404
[<NoEquality; NoComparison>]
405405
type SynTypeOrTrivia = { OrKeyword: range }
406406

407+
[<NoEquality; NoComparison>]
408+
type SynTypeWithNullTrivia = { BarRange: range }
409+
407410
[<NoEquality; NoComparison>]
408411
type SynBindingReturnInfoTrivia = { ColonRange: range option }
409412

@@ -429,3 +432,6 @@ type SynMeasureConstantTrivia =
429432
LessRange: range
430433
GreaterRange: range
431434
}
435+
436+
[<NoEquality; NoComparison>]
437+
type SynTypeConstraintWhereTyparNotSupportsNullTrivia = { ColonRange: range; NotRange: range }

src/Compiler/SyntaxTree/SyntaxTrivia.fsi

+19
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,14 @@ type SynTypeOrTrivia =
512512
OrKeyword: range
513513
}
514514

515+
/// Represents additional information for SynType.WithNull
516+
[<NoEquality; NoComparison>]
517+
type SynTypeWithNullTrivia =
518+
{
519+
/// The syntax range of the `|` token
520+
BarRange: range
521+
}
522+
515523
/// Represents additional information for SynBindingReturnInfo
516524
[<NoEquality; NoComparison>]
517525
type SynBindingReturnInfoTrivia =
@@ -545,3 +553,14 @@ type SynTyparDeclTrivia =
545553
type SynMeasureConstantTrivia =
546554
{ LessRange: range
547555
GreaterRange: range }
556+
557+
/// Represents additional information for SynTypeConstraint.WhereTyparNotSupportsNull
558+
[<NoEquality; NoComparison>]
559+
type SynTypeConstraintWhereTyparNotSupportsNullTrivia =
560+
{
561+
/// The syntax range of `:`
562+
ColonRange: range
563+
564+
/// The syntax range of `not`
565+
NotRange: range
566+
}

0 commit comments

Comments
 (0)