If I understand the question correctly, you have a class which inherits traits which respond differently to the size
method? Then there is no way to resolve this ambiguity than to use composition instead of mixin.
class InMemoryStorage
def mainStorage: StorageTrait
def auxStorage: YetAnotherStorageTrait
def mainSize = mainStorage.size
def auxSize = auxStorage.size
}
Is that what you are looking after?