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

> Source: <https://fortran-lang.discourse.group/t/fortls-bug-not-matching-statement-labels-with-different-numbers-of-leading-zero/11293#post_1>
> Published: 2026-11-11 19:48:39+00:00

It seems fortls doesn’t recognize statement labels as equivalent when they have different numbers of leading zeros, such as `10` and `0010`.  It reports an error for “Unexpected end of scope…”

I encountered this when bringing some legacy code into a modern project. Here’s a minimal reproducible example:

```
      do 10 i=1,3
         print *, i
 0010 continue
      end
```

My AI agent told me it looked at the Python source code of fortls and discovered it treats statement labels as text strings rather than integers. That may be the reason for the bug.
