5
Inline bu durumda neden çalışmıyor?Bu Tuples için Inlining neden çalışmıyor?
type TupleBuilder() =
static member inline Cons(a,(b,c)) = (a, b, c)
static member inline Cons(a,(b,c,d)) = (a, b, c, d)
static member inline Cons(a,(b,c,d,e)) = (a, b, c, d, e)
let inline cons h t = TupleBuilder.Cons(h,t)
TupleBuilder.Cons
çağrısı bana
A unique overload for method 'Cons' could not be determined based on type
information prior to this program point. A type annotation may be needed.
Candidates:
static member TupleBuilder.Cons : a:'a0 * ('a1 * 'a2 * 'a3 * 'a4) -> 'a0 * 'a1 * 'a2 * 'a3 * 'a4,
static member TupleBuilder.Cons : a:'a0 * ('a1 * 'a2 * 'a3) -> 'a0 * 'a1 * 'a2 * 'a3,
static member TupleBuilder.Cons : a:'a0 * ('a1 * 'a2) -> 'a0 * 'a1 * 'a2
Derleyici, '' '' '' 'fonksiyonunda kaç elemanın bulunduğunu bilir? Kullanımı görmeden, 2-tuple, 3-tuple veya 4-tuple olup olmadığını bilmiyor. – rmunn
da genellikle "inlining", bu siteye karar vermeyi geciktirdiği için yardımcı olur. ama burada değil. Merak ediyorum – robkuz