Files
modeling-app/src/wasm-lib/kcl/tests/sketch_in_object/input.kcl
Adam Chalmers 986675fe89 Fix formatting for nested function returns (#4518)
Previously, this was the output of the formatter:

```
fn f = () => {
  return () => {
  return 1
}
}
```

Now the above will be reformatted as

```
fn f = () => {
  return () => {
    return 1
  }
}
```

Much better!
2024-11-20 09:23:30 -05:00

30 lines
484 B
Plaintext

fn test = () => {
return startSketchOn('XY')
|> startProfileAt([0, 0], %)
|> line([0, 1], %)
|> line([1, 0], %)
|> line([0, -1], %)
|> close(%)
}
fn test2 = () => {
return {
thing1: {
thing2: startSketchOn('XY')
|> startProfileAt([0, 0], %)
|> line([0, 1], %)
|> line([1, 0], %)
|> line([0, -1], %)
|> close(%)
}
}
}
x = test()
x
|> extrude(-10, %)
x2 = test2()
x2.thing1.thing2
|> extrude(10, %)