Draco-lang / Compiler

The compiler repository for the Draco programming language.
Apache License 2.0
74 stars 9 forks source link

Formatter bug on inline method #367

Closed Kuinox closed 5 months ago

Kuinox commented 5 months ago

On the following snippet:

import System.Console;

func max(a:int32, b:int32): int32 = if (a > b) a else b;

func main() {
    WriteLine(max(12, 34));
}

The formatter output:

import System.Console;

func max(a:int32, b:int32): int32 = if (a > b) a else b;func main() {
    WriteLine(max(12, 34));
}