You haven’t defined an equality method for Tel, so afaik, it falls back to ===.
BTW it isn’t necessary to access the name of the struct Tec1. Just use dispatch:
Base.:(==)(::T, ::T) where {T<:ttt} = true
Also, struct names should be capitalized: Ttt, not ttt.
This falls back to === : Tel(Tec1(10)) === Tel(Tec1(100)), then this will check Tel(Tec1(10)).n === Tel(Tec1(100)).n, while Tec1(10) === Tec1(100) isa false.
Is there a way I can compel that :
No, I don’t think so. And you definitely shouldn’t. x === y means that there is no way to distinguish between x and y. But in your case there clearly is, since x.n and y.n are different.