Fortls bug not matching statement labels with different numbers of leading zero

· Fortran Lang Discourse · Nov. 11, 2026, 8:18 p.m.
Summary
The blog post discusses a bug in the Fortran Language Server (fortls) related to statement labels with different numbers of leading zeros (e.g., 10 vs 0010), resulting in errors when legacy code is incorporated into modern projects. It mentions insights gained from examining the Python source code of fortls, suggesting that statement labels are treated as text strings instead of integers, which could explain the bug. A minimal reproducible example is provided.