Files
Nim/compiler
metagn 00be8f287a trigger range check with new type inference on nkIntLit [backport:1.6] (#23179)
fixes #23177

`changeType` doesn't perform range checks to see if the expression fits
the new type [if the old type is the same as the new
type](62d8ca4306/compiler/semexprs.nim (L633)).
For `nkIntLit`, we previously set the type to the concrete base of the
expected type first, then call `changeType`, which works for things like
range types but not bare types of smaller bit size like `int8`. Now we
don't set the type (so the type is nil), and `changeType` performs the
range check when the type is unset (nil).
2024-01-08 10:44:04 +08:00
..
2023-12-13 10:29:58 +01:00
2023-12-15 10:20:57 +01:00
2023-12-13 10:29:58 +01:00
2023-12-17 18:43:52 +01:00
2023-12-15 10:20:57 +01:00
2023-12-15 10:20:57 +01:00
2023-12-15 10:20:57 +01:00
2023-12-25 07:12:54 +01:00
2022-09-27 10:57:47 +02:00
2023-12-15 10:20:57 +01:00
2023-12-15 10:20:57 +01:00
2023-12-13 10:29:58 +01:00
2023-12-15 10:20:57 +01:00
2023-12-15 10:20:57 +01:00
2017-01-07 22:35:09 +01:00
2023-12-15 10:20:57 +01:00
2023-12-17 18:43:52 +01:00
2023-12-15 10:20:57 +01:00
2023-12-13 10:29:58 +01:00
2023-11-04 17:46:59 +08:00
2021-01-12 09:36:51 +01:00
2023-12-06 18:17:57 +01:00
2022-03-23 20:34:53 +01:00
2023-12-17 18:43:52 +01:00
2023-12-25 07:12:54 +01:00
2023-07-02 22:36:05 +02:00
2023-11-06 18:33:28 +01:00
2023-12-17 18:43:52 +01:00
2023-12-17 18:43:52 +01:00
2023-12-17 18:43:52 +01:00
2023-12-13 10:29:58 +01:00
2023-12-15 10:20:57 +01:00
2023-12-15 10:20:57 +01:00
2024-01-06 06:50:09 +01:00
2023-12-13 10:29:58 +01:00
2023-12-17 18:43:52 +01:00
2023-12-02 05:28:24 +01:00
2023-12-12 16:54:50 +01:00
2023-12-17 18:43:52 +01:00
2023-12-15 10:20:57 +01:00
2023-12-15 10:20:57 +01:00
2023-12-15 10:20:57 +01:00
2023-12-17 18:43:52 +01: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.