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

Commit9ca869d

Browse files
andrewjkennedylatkin
andrewjkennedy
authored andcommitted
Fix fordotnet#30 -- Incorrect number of type arguments to local call
fixesdotnet#30closesdotnet#167commitef01ef3Author: andrewjkennedy <akenn@microsoft.com>Date: Thu Jan 29 15:21:05 2015 +0000 Whitespace change to kick AppVeyorcommit6cc2e77Author: andrewjkennedy <akenn@microsoft.com>Date: Thu Jan 29 10:02:20 2015 +0000 Regression test for issuedotnet#30commit72635a9Author: andrewjkennedy <akenn@microsoft.com>Date: Wed Jan 28 12:42:32 2015 +0000 Fix fordotnet#30 Code was comparing a pre-erasure list of arguments with a post-erasure list
1 parent7b1d896 commit9ca869d

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

‎src/fsharp/ilxgen.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2743,7 +2743,7 @@ and GenNamedLocalTyFuncCall cenv (cgbuf: CodeGenBuffer) eenv typ cloinfo tyargs
27432743

27442744
letilContractTy= mkILBoxedTy ilContractCloTySpec.TypeRef ilContractClassTyargs
27452745

2746-
ifnot(ilContractMethTyargs.Length=tyargs.Length)then errorR(Error(FSComp.SR.ilIncorrectNumberOfTypeArguments(),m));
2746+
ifnot(ilContractMethTyargs.Length=ilTyArgs.Length)then errorR(Error(FSComp.SR.ilIncorrectNumberOfTypeArguments(),m));
27472747

27482748
// Local TyFunc are represented as a $contract type. they currently get stored in a value of type object
27492749
// Recover result (value or reference types) via unbox_any.

‎tests/fsharp/core/unitsOfMeasure/test.fs‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,19 @@ let CreateBadImageFormatException () =
1616
letcreate a b c d(e:int<_>)(f:int)g= TheType.Create a b(int c) d e f g
1717
seq{yield create000000[0]}
1818

19+
20+
// Regression test for https://github.com/Microsoft/visualfsharp/issues/30
21+
// (Compilation error: "Incorrect number of type arguments to local call"
22+
23+
typeR<[<Measure>]'u>(f:float<'u>)=
24+
memberr.Member= f
25+
26+
letget(r:R<_>)= r.Member
27+
letfoo=
28+
letproblem _= List.map get
29+
problem// Error: Incorrect number of type arguments to local call
30+
31+
1932
moduleTestLibrary=
2033

2134
[<Measure>]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp