Files
Nim/compiler
ringabout 99b09e6609 fixes #24093; Dereferencing result of cast in single expression triggers unnecessary copy (#25143)
fixes #24093

transforms
```nim
let a = new array[1000, byte]
block:
  for _ in cast[typeof(a)](a)[]:
    discard
```
into
```nim
let a = new array[1000, byte]
block:
  let temp = cast[typeof(a)](a)
  for _ in temp[]:
    discard
```
So it keeps the same behavior with the manual version

(cherry picked from commit 08d74a1c27)
2025-09-10 07:58:21 +02:00
..
2023-12-15 10:20:57 +01:00
2025-08-29 08:12:09 +02:00
2025-08-23 09:22:12 +02:00
2025-07-15 11:06:18 +02:00
2025-01-14 07:53:29 +01:00
2017-01-07 22:35:09 +01:00
2025-05-12 14:21:20 +02:00
2025-01-15 10:21:20 +01:00
2021-01-12 09:36:51 +01:00
2024-07-09 09:29:45 +02:00
2025-01-14 07:51:55 +01:00
2023-07-02 22:36:05 +02:00
2023-11-06 18:33:28 +01:00
2025-05-06 16:04:54 +02:00
2024-03-16 08:35:18 +08:00
2025-08-29 08:12:09 +02:00
2025-08-29 08:12:09 +02:00
2025-08-29 08:12:09 +02:00
2023-12-25 07:12:54 +01:00

Nim Compiler

  • This directory contains the Nim compiler written in Nim.
  • Note that this code has been translated from a bootstrapping version written in Pascal.
  • So the code is not a poster child of good Nim code.

See Internals of the Nim Compiler for more information.