Am 17.07.2015 19:11, schrieb Nikolay Totomanov:
> Hello,
>
> I would like to have strong types in the traits which I use.
> For example in the trait "TraitA" i have a method fillInMap() in which I
> am adding elements to the "map" field
[...]
> traitTraitA {
>
> deffillInMap(){
> // here 'map' is with undefined type
> // is there a way to "suggest" its type
> map.put('car1','bmw1')
> map.put('car2','bmw2')
> }
> }
How about adding a method getMap or the like to the trait?
bye blackdrag
--
Jochen "blackdrag" Theodorou
blog: http://blackdragsview.blogspot.com/
|