It doesn't seem to work for built-in classes, though, only for custom classes that you define.
If I try, I get an error such as this:
The method "get_var()" overrides a method from native class "FileAccess". This won't be called by the engine and may not work as expected. (Warning treated as error.)