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
@@ -680,7 +680,7 @@ tcUnnamedArgumentsDoNotFormPrefix,"The unnamed arguments do not form a prefix of
680
680
853,tcAbstractMembersIllegalInAugmentation,"Abstract members are not permitted in an augmentation - they must be defined as part of the type itself"
681
681
854,tcMethodOverridesIllegalHere,"Method overrides and interface implementations are not permitted here"
682
682
855,tcNoMemberFoundForOverride,"No abstract or interface member was found that corresponds to this override"
683
-
856,tcOverrideArityMismatch,"This override takes a different number of arguments to the corresponding abstract member"
683
+
856,tcOverrideArityMismatch,"This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:%s"
684
684
857,tcDefaultImplementationAlreadyExists,"This method already has a default implementation"
685
685
858,tcDefaultAmbiguous,"The method implemented by this default is ambiguous"
686
686
859,tcNoPropertyFoundForOverride,"No abstract property was found that corresponds to this override"
Copy file name to clipboardExpand all lines: src/fsharp/TypeChecker.fs
+9-3Lines changed: 9 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -10597,7 +10597,7 @@ and ComputeIsComplete enclosingDeclaredTypars declaredTypars ty =
10597
10597
/// Determine if a uniquely-identified-abstract-slot exists for an override member (or interface member implementation) based on the information available
10598
10598
/// at the syntactic definition of the member (i.e. prior to type inference). If so, we know the expected signature of the override, and the full slotsig
10599
10599
/// it implements. Apply the inferred slotsig.
10600
-
and ApplyAbstractSlotInference cenv (envinner:TcEnv) (bindingTy,m,synTyparDecls,declaredTypars,memberId,tcrefObjTy,renaming,_objTy,optIntfSlotTy,valSynData,memberFlags,attribs) =
10600
+
and ApplyAbstractSlotInference (cenv:cenv) (envinner:TcEnv) (bindingTy,m,synTyparDecls,declaredTypars,memberId,tcrefObjTy,renaming,_objTy,optIntfSlotTy,valSynData,memberFlags,attribs) =
10601
10601
10602
10602
let ad = envinner.eAccessRights
10603
10603
let typToSearchForAbstractMembers =
@@ -10627,11 +10627,17 @@ and ApplyAbstractSlotInference cenv (envinner:TcEnv) (bindingTy,m,synTyparDecls,
//<Expects status="Error" span="(12,16)" id="FS0856">This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:</Expects>
3
+
//<Expects>abstract member Base.Member : int * string -> string</Expects>
4
+
//<Expects status="Error" span="(20,24)" id="FS0001">This expression was expected to have type</Expects>
5
+
6
+
typeBase()=
7
+
abstractmemberMember:int*string->string
8
+
defaultx.Member(i,s)= s
9
+
10
+
typeDerived1()=
11
+
inherit Base()
12
+
overridex.Member()=5
13
+
14
+
typeDerived2()=
15
+
inherit Base()
16
+
overridex.Member(i :int)="Hello"
17
+
18
+
typeDerived3()=
19
+
inherit Base()
20
+
overridex.Member(s :string,i :int)= sprintf "Hello %s" s
0 commit comments