ScriptEditor.get_current_script()
is return Script
object, and that it.
ScriptEditor.goto_line()
will go to line, not return current line.
If it is not possible in GDScript, is it possible in GDNative C++?
Off-topic, while I investigate engine source code, I found
return script != nullptr ? script : nullptr;
Is not it same as this?
return script;