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/FSComp.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -291,7 +291,7 @@ chkUnionCaseDefaultAugmentation,"default augmentation of the union case"
291
291
441,chkDuplicatePropertyWithSuffix,"Duplicate property. The property '%s' has the same name and signature as another property in this type once tuples, functions, units of measure and/or provided types are erased."
292
292
442,chkDuplicateMethodInheritedType,"Duplicate method. The abstract method '%s' has the same name and signature as an abstract method in an inherited type."
293
293
442,chkDuplicateMethodInheritedTypeWithSuffix,"Duplicate method. The abstract method '%s' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased."
294
-
443,chkMultipleGenericInterfaceInstantiations,"This type implementsor inheritsthe same interface at different generic instantiations '%s' and '%s'. This is not permitted in this version of F#."
294
+
443,chkMultipleGenericInterfaceInstantiations,"This type implements the same interface at different generic instantiations '%s' and '%s'. This is not permitted in this version of F#."
295
295
444,chkValueWithDefaultValueMustHaveDefaultValue,"The type of a field using the 'DefaultValue' attribute must admit default initialization, i.e. have 'null' as a proper value or be a struct type whose fields all admit default initialization. You can use 'DefaultValue(false)' to disable this check"
296
296
445,chkNoByrefInTypeAbbrev,"The type abbreviation contains byrefs. This is not permitted by F#."
@@ -243,11 +243,11 @@ let HasHeadType g tcref ty2 =
243
243
244
244
/// Check if a type exists somewhere in the hierarchy which has the same head type as the given type (note, the given type need not have a head type at all)
245
245
letExistsSameHeadTypeInHierarchy g amap m typeToSearchFrom typeToLookFor=
246
-
ExistsInEntireHierarchyOfType(HaveSameHeadType g typeToLookFor) g amap m AllowMultiIntfInstantiations.No typeToSearchFrom
246
+
ExistsInEntireHierarchyOfType(HaveSameHeadType g typeToLookFor) g amap m AllowMultiIntfInstantiations.Yes typeToSearchFrom
247
247
248
248
/// Check if a type exists somewhere in the hierarchy which has the given head type.
249
249
letExistsHeadTypeInEntireHierarchy g amap m typeToSearchFrom tcrefToLookFor=
250
-
ExistsInEntireHierarchyOfType(HasHeadType g tcrefToLookFor) g amap m AllowMultiIntfInstantiations.No typeToSearchFrom
250
+
ExistsInEntireHierarchyOfType(HasHeadType g tcrefToLookFor) g amap m AllowMultiIntfInstantiations.Yes typeToSearchFrom
251
251
252
252
253
253
/// Read an Abstract IL type from metadata and convert to an F# type.
@@ -3145,13 +3145,13 @@ type InfoReader(g:TcGlobals, amap:Import.ImportMap) =
3145
3145
FoldPrimaryHierarchyOfType(fun typ acc-> GetImmediateIntrinsicPropInfosOfType(optFilter,ad) g amap m typ:: acc) g amap m allowMultiIntfInst typ[]
FoldPrimaryHierarchyOfType(fun typ acc-> GetImmediateIntrinsicRecdOrClassFieldsOfType(optFilter,ad) m typ@ acc) g amap m AllowMultiIntfInstantiations.No typ[]
3154
+
FoldPrimaryHierarchyOfType(fun typ acc-> GetImmediateIntrinsicRecdOrClassFieldsOfType(optFilter,ad) m typ@ acc) g amap m AllowMultiIntfInstantiations.Yes typ[]
FoldEntireHierarchyOfType(fun typ acc-> typ:: acc) g amap m allowMultiIntfInst typ[]
@@ -3182,7 +3182,7 @@ type InfoReader(g:TcGlobals, amap:Import.ImportMap) =
3182
3182
|_-> failwith"Unexpected multiple fields with the same name"// Because an explicit name (i.e., nm) was supplied, there will be only one element at most.
3183
3183
|_-> acc)
3184
3184
g amap m
3185
-
AllowMultiIntfInstantiations.No
3185
+
AllowMultiIntfInstantiations.Yes
3186
3186
typ
3187
3187
None
3188
3188
@@ -3524,12 +3524,12 @@ let TryFindIntrinsicNamedItemOfType (infoReader:InfoReader) (nm,ad) findFlag m t
3524
3524
/// -- getting the Dispose method when resolving the 'use' construct
3525
3525
/// -- getting the various methods used to desugar the computation expression syntax
3526
3526
letTryFindIntrinsicMethInfo infoReader m ad nm ty=
3527
-
GetIntrinsicMethInfosOfType infoReader(Some nm,ad,AllowMultiIntfInstantiations.No) IgnoreOverrides m ty
3527
+
GetIntrinsicMethInfosOfType infoReader(Some nm,ad,AllowMultiIntfInstantiations.Yes) IgnoreOverrides m ty
3528
3528
3529
3529
/// Try to find a particular named property on a type. Only used to ensure that local 'let' definitions and property names
3530
3530
/// are distinct, a somewhat adhoc check in tc.fs.
3531
3531
letTryFindPropInfo infoReader m ad nm ty=
3532
-
GetIntrinsicPropInfosOfType infoReader(Some nm,ad,AllowMultiIntfInstantiations.No) IgnoreOverrides m ty
3532
+
GetIntrinsicPropInfosOfType infoReader(Some nm,ad,AllowMultiIntfInstantiations.Yes) IgnoreOverrides m ty
Copy file name to clipboardExpand all lines: src/fsharp/tc.fs
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,7 @@ let IsSecurityAttribute g amap (casmap : Dictionary<Stamp,bool>) (Attrib(tcref,_
118
118
if casmap.ContainsKey(tcs) then
119
119
casmap.[tcs]
120
120
else
121
-
let exists = ExistsInEntireHierarchyOfType (fun t -> typeEquiv g t (mkAppTy attr.TyconRef [])) g amap m AllowMultiIntfInstantiations.No (mkAppTy tcref [])
121
+
let exists = ExistsInEntireHierarchyOfType (fun t -> typeEquiv g t (mkAppTy attr.TyconRef [])) g amap m AllowMultiIntfInstantiations.Yes (mkAppTy tcref [])
@@ -14111,7 +14111,7 @@ module EstablishTypeDefinitionCores = begin
14111
14111
// validate ConditionalAttribute, should it be applied (it's only valid on a type if the type is an attribute type)
14112
14112
match attrs |> List.tryFind (IsMatchingFSharpAttribute cenv.g cenv.g.attrib_ConditionalAttribute) with
14113
14113
| Some _ ->
14114
-
if not(ExistsInEntireHierarchyOfType (fun t -> typeEquiv cenv.g t (mkAppTy cenv.g.tcref_System_Attribute [])) cenv.g cenv.amap m AllowMultiIntfInstantiations.No thisTy) then
14114
+
if not(ExistsInEntireHierarchyOfType (fun t -> typeEquiv cenv.g t (mkAppTy cenv.g.tcref_System_Attribute [])) cenv.g cenv.amap m AllowMultiIntfInstantiations.Yes thisTy) then
Copy file name to clipboardExpand all lines: tests/fsharpqa/Source/Conformance/ObjectOrientedTypeDefinitions/InterfaceTypes/E_ConsumeMultipleInterfaceFromCS.fs
// <Expects id="FS0443" status="error" span="(19,6-23,8)">This type implements or inherits the same interface at different generic instantiations 'I_002\<string\>' and 'I_002\<char\>'\. This is not permitted in this version of F#\.</Expects>