Why are broken code lines marked not type-safe?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Spruxlog

This is largely a nitpick, but since I stick to typed GDScript it has been bugging me. A line of code such as this:
is marked as type-safe, as it should be. But breaking it with \ character:
marks the second line as not type-safe. Is there a reason for it? Or is it a bug?

One can reproduce this behavior by breaking any line, even a very simple one.

var foo := 10 + 10


var foo := 10 \
    + 10

Both result with the same, correct result, but the latter is incorrectly marked and does not provide editor hints.

Please properly copy and paste your code into your post so that other users can copy it and verify your claim.

Ertain | 2021-07-15 17:08

Thank you, I have edited the question.

Spruxlog | 2021-07-20 10:32

:bust_in_silhouette: Reply From: Lopy

This is indeed a bug/oversight, even if only a cosmetic one.

If it does not seem to have already been reported there, you can file it at https://github.com/godotengine/godot/issues.

This was already reported here, and will be fixed in Godot 4.0 thanks to the GDScript rewrite.

Calinou | 2021-07-22 22:16

Thank you both kindly.

Spruxlog | 2021-07-23 05:56