Opened by:vandroiy on Codeplex
F# debug compilation in Visual Studio sometimes fails with the error "Incorrect number of type arguments to local call". A lot of seemingly unrelated circumstances influence the appearance of the error.
See this question on Stackoverflow
Shortest reproduction I know of:
◾Use VS2013 (reproduced in Community, also with F# 3.1.2 installed) or VS2012 (reproduced in Pro)
◾Make a project that compiles to an executable or library (not interactive/scripting)
◾Use debug configuration (no optimizations enabled)
◾Add the following code and attempt to compile (The code editor won't predict the error)
type R<[<Measure>] 'u> (f : float<'u>) =
member r.Member = f
let get (r : R<_>) = r.Member
let foo =
let problem _ = List.map get
problem // Error: Incorrect number of type arguments to local call
The error disappears from various attempts to simplify the example code (see the Stackoverflow question). Declaring problem functions as inline can serve as a workaround.
comments
latkin wrote Dec 17, 2014 at 4:18 PM [x]
I can reproduce this on Windows with 3.0, 3.1, and 4.0.
Opened by:vandroiy on Codeplex
F# debug compilation in Visual Studio sometimes fails with the error "Incorrect number of type arguments to local call". A lot of seemingly unrelated circumstances influence the appearance of the error.
See this question on Stackoverflow
Shortest reproduction I know of:
◾Use VS2013 (reproduced in Community, also with F# 3.1.2 installed) or VS2012 (reproduced in Pro)
◾Make a project that compiles to an executable or library (not interactive/scripting)
◾Use debug configuration (no optimizations enabled)
◾Add the following code and attempt to compile (The code editor won't predict the error)
The error disappears from various attempts to simplify the example code (see the Stackoverflow question). Declaring problem functions as inline can serve as a workaround.