python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Having trouble with type erasure
I have something like this :
import kotlin.reflect.KClass
class Quantity<T> {
/* ... */
}
class Field<T : Any> {
val type: KClass<T> get() = TODO("This is initializ...
Alphasaft
Votes: 0
Answers: 1
Is it possible to recurse on a type hierarchy with distinct generic parameters in F#?
Let's say I have the following F# code:
[<AbstractClass>]
type Base<'a>() =
class end
and Test<'a, 'b>(b: Base<'b>, c: 'b -> 'a) =
inherit Base<'a>()
membe...
iyyel
Votes: 0
Answers: 3
About Nullable of C# generic parameter
Now I have a SomeClass<T> with a constructor SomeClass(IList<T?> list). But when I use a List<int?> to construct it, the compiler told me:
Cannot resolve constructor
SomeClass(Syste...
Mechanic Pig
Votes: 0
Answers: 1
How to use a generic array - SwiftUI
Hi I'm creating a component that needs to consider an array for its operation.
I created a model for displaying the array like this
struct FeaturedWorksModel: Identifiable {
var id = UUID()
va...

kAiN
Votes: 0
Answers: 1