cobalt icon indicating copy to clipboard operation
cobalt copied to clipboard

Compound data type

Open mlutze opened this issue 6 years ago • 1 comments

We don't currently support the compound data type that can be found in Java:

List<T extends Canine & Domesticated> petDogs = new ArrayList<>();

We may want to consider adding support for this sort of declaration.

mlutze avatar May 28 '18 23:05 mlutze

This should be added as a type and be parsed with the type parser.

Our syntax could be like this.

let x: List[T extends Canine] = new ArrayList[]()

I haven't seen or used the & part before. We can add that too if required but I need to look into it more.

Michael2109 avatar May 29 '18 13:05 Michael2109