Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit061c0e5

Browse files
forkiKevinRansom
authored andcommitted
Fixing #4967 (#4968)
* Fix internal error when compiling interface implementation lacking an overloaded method implementation - fixes #4967* Adding a test* Update E_OverloadMismatch.fs
1 parente11187f commit061c0e5

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

‎src/fsharp/MethodOverrides.fs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,7 @@ module DispatchSlotChecking =
305305
let(CompiledSig(vargtys,_,fvmtps,_))= compiledSig
306306

307307
if moreThanOnePossibleDispatchSlotthen
308-
// Error will be reported below in CheckOverridesAreAllUsedOnce
309-
()
308+
noimpl()
310309

311310
elif argTys.Length<> vargtys.Lengththen
312311
fail(Error(FSComp.SR.typrelMemberDoesNotHaveCorrectNumberOfArguments(FormatOverride denv overrideBy, FormatMethInfoSig g amap m denv dispatchSlot), overrideBy.Range))
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//<Expects id="FS0366" status="error">No implementation was given for</Expects>
2+
3+
openSystem
4+
openSystem.IO
5+
typeIFoo=
6+
abstractmemberFoo : t:Type* r:TextReader->obj
7+
abstractmemberFoo<'t>:TextReader->'t
8+
9+
10+
typeFoo()=
11+
interface IFoowith
12+
memberx.Foo(t,reader)= obj()
13+
14+
exit1

‎tests/fsharpqa/Source/Conformance/DeclarationElements/MemberDefinitions/OverloadingMembers/env.lst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ NOMONO,NoMTSOURCE=ConsumeOverloadGenericMethods.fs SCFLAGS="-r:lib.dll" PRECMD=
2929
SOURCE=SlowOverloadResolution.fs# SlowOverloadResolution.fs
3030

3131
SOURCE=E_OverloadCurriedFunc.fs# E_OverloadCurriedFunc.fs
32+
SOURCE=E_OverloadMismatch.fs# E_OverloadMismatch.fs
3233
SOURCE=NoWarningWhenOverloadingInSubClass01.fs SCFLAGS="--warnaserror"# NoWarningWhenOverloadingInSubClass01.fs
3334

3435
SOURCE=E_UnsolvableConstraints01.fs SCFLAGS="--test:ErrorRanges"# E_UnsolvableConstraints01.fs

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp