You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/fsharp/tast.fs
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -274,6 +274,8 @@ type TyparRigidity =
274
274
/// Indicates the type parameter derives from an '_' anonymous type
275
275
/// For units-of-measure, we give a warning if this gets solved to '1'
276
276
| Anon
277
+
/// Indicates a type parameter coming from an IL method reference
278
+
| Unresolved
277
279
memberx.ErrorIfUnified=match x with TyparRigidity.Rigid ->true|_->false
278
280
memberx.WarnIfUnified=match x with TyparRigidity.WillBeRigid | TyparRigidity.WarnIfNotRigid ->true|_->false
279
281
memberx.WarnIfMissingConstraint=match x with TyparRigidity.WillBeRigid ->true|_->false
@@ -294,7 +296,8 @@ type TyparFlags(flags:int32) =
294
296
| TyparRigidity.WillBeRigid ->0b000000100000
295
297
| TyparRigidity.WarnIfNotRigid ->0b000001000000
296
298
| TyparRigidity.Flexible ->0b000001100000
297
-
| TyparRigidity.Anon ->0b000010000000)|||
299
+
| TyparRigidity.Anon ->0b000010000000
300
+
| TyparRigidity.Unresolved ->0b000010100000)|||
298
301
(match kind with
299
302
| TyparKind.Type ->0b000000000000
300
303
| TyparKind.Measure ->0b000100000000)|||
@@ -326,6 +329,7 @@ type TyparFlags(flags:int32) =
326
329
|0b000001000000-> TyparRigidity.WarnIfNotRigid
327
330
|0b000001100000-> TyparRigidity.Flexible
328
331
|0b000010000000-> TyparRigidity.Anon
332
+
|0b000010100000-> TyparRigidity.Unresolved
329
333
|_-> failwith "unreachable"
330
334
331
335
/// Indicates whether a type variable can be instantiated by types or units-of-measure.
@@ -774,7 +778,7 @@ type Entity =
774
778
775
779
/// Get the Abstract IL scope, nesting and metadata for this
776
780
/// type definition, assuming it is backed by Abstract IL metadata.
777
-
memberx.ILTyconInfo=match x.TypeReprInfo with| TILObjectRepr (a,b,c)->(a,b,c)|_->assertfalse; failwith "not a .NET type definition"
781
+
memberx.ILTyconInfo=match x.TypeReprInfo with| TILObjectRepr (a,b,c)->(a,b,c)|i->failwithf "not a .NET type definition: %+A" i
778
782
779
783
/// Get the Abstract IL metadata for this type definition, assuming it is backed by Abstract IL metadata.
780
784
memberx.ILTyconRawMetadata=let_,_,td = x.ILTyconInfo in td
@@ -4551,6 +4555,8 @@ let NewTypar (kind,rigid,Typar(id,staticReq,isCompGen),isFromError,dynamicReq,at
4551
4555
4552
4556
letNewRigidTypar nm m = NewTypar (TyparKind.Type,TyparRigidity.Rigid,Typar(mkSynId m nm,NoStaticReq,true),false,TyparDynamicReq.Yes,[],false,false)
4553
4557
4558
+
letNewUnresolvedTypar nm m = NewTypar (TyparKind.Type,TyparRigidity.Unresolved,Typar(mkSynId m nm,NoStaticReq,true),false,TyparDynamicReq.Yes,[],false,false)
4559
+
4554
4560
letNewUnionCase id nm tys rty attribs docOption access :UnionCase =
0 commit comments