>>I said "a prg with twice the same procedure/method/function" - and "a" means "one". When more than one, then it's as you say - and if in the one prg which catches there's the same name twice, I guess it would still forget the first one and have only the last one in names lookup.
>
>This is a design flaw. Should raise an error both does not. I think one should avoid this situation anyway?
Avoid, for sure. But I don't think there should be anything more than document view sorted by name, which should make it visible, or a project scanning tool which may catch that.
This happens to me perhaps once a year - when creating a long prg-based class by copying and then changing methods from a similar class used on another project. Sometimes I do that with one method, then the next day I forget that I did that and do it again, so I have the same method twice. The crazier scenario is when I add a method to a class written by someone else, and give it a very logical and obvious name - well, being on the same team, we think alike and this other guy came up with the same name years ago :).