Naheel
Naheel

Reputation: 499

Bounded type parameters in Vala

In Java you can have something like this

class MyClass<E extends A> { ...

In C#

class MyClass<E> where E : A { ...

Anything similar in Vala?

Upvotes: 3

Views: 118

Answers (1)

Felipe Lavratti
Felipe Lavratti

Reputation: 2967

No, not supported in Vala.

This is all available keywords in the language Vala, and the "where" specifier is not there.

Here is a filled bug to ask for this feature.

I've had need for constraints as well, in the and I had to change my design to use a normal generic type.

Upvotes: 2

Related Questions