Class extension (dot syntax for new methods)

BlitzMax Forums/BlitzMax Programming/Class extension (dot syntax for new methods)

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

It doesn't break anything, you just have a duplicate identifier error, just like when you do this with functions. It doesn't compile, that's it.
It makes sense, extension methods are just plain functions. You can't import two modules that defines two homonym functions and expect it to work. It's jno different here.

Special support can be added by allocating a private namespace for each type (making the feature much more usefull as otherwise you'd be unable to have two homonym extension methodds for different types), but even in this case it works pretty much like for plain functions, only within the private namespace rather than at the global namespace.