metagn
680a13a142
fix segfault in effect tracking for sym node with nil type ( #24114 )
...
fixes #24112
Sym nodes in templates that could be open are [given `nil`
type](22d2cf2175/compiler/semtempl.nim (L274) )
when `--experimentalOpenSym` is disabled so that they can be semchecked
to give a warning since #24007 . The first nodes of object constructors
(in this case) and in type conversions don't replace their first node
(the symbol) with a typechecked one, they only call `semTypeNode` on it
and leave it as is.
Effect tracking checks if the type of a sym node has a destructor to
check if the node type should be replaced with the sym type. But this
causes a segfault when the type of the node is nil. To fix this, we
always set the node type to the sym type if the node type is nil.
Alternatively `semObjConstr` and `semConv` could be changed to set the
type of their first node to the found type but I'm not sure if this
would break anything. They could call `semExprWithType` on the first
node but `semTypeNode` would still have to be called (maybe call it
before?). This isn't a problem if the sym node has a type but is just
nested in `nkOpenSym` or `nkOpenSymChoice` which have nil type instead
(i.e. with openSym enabled), so maybe this still is the "most general"
solution, I don't know.
2024-09-17 14:01:48 +02:00
..
2024-08-12 15:33:26 +02:00
2024-03-18 20:27:00 +01:00
2023-08-06 14:26:21 +02:00
2023-12-15 10:20:57 +01:00
2024-09-02 18:22:20 +02:00
2024-04-10 14:41:16 +02:00
2024-04-16 12:46:59 +02:00
2024-07-12 15:23:09 +02:00
2023-10-11 17:44:14 +02:00
2023-08-06 14:26:21 +02:00
2024-08-28 20:59:25 +02:00
2024-09-03 09:18:38 +02:00
2022-09-28 15:05:01 +02:00
2022-11-30 21:51:13 +01:00
2024-08-28 20:46:36 +02:00
2024-09-03 09:19:52 +02:00
2024-07-12 15:23:09 +02:00
2024-07-12 15:23:09 +02:00
2024-09-16 22:31:39 +08:00
2024-06-07 09:01:30 +02:00
2024-09-17 14:01:21 +02:00
2024-09-03 09:19:52 +02:00
2024-07-12 15:23:09 +02:00
2024-09-16 07:16:21 +02:00
2024-03-28 11:04:12 +01:00
2024-08-12 15:18:56 +02:00
2023-06-18 16:06:14 +02:00
2024-03-16 08:35:18 +08:00
2024-08-12 15:33:26 +02:00
2017-01-07 22:35:09 +01:00
2022-06-10 20:40:08 +02:00
2023-10-29 14:48:11 +01:00
2024-04-22 13:04:30 +02:00
2023-08-06 14:26:21 +02:00
2024-08-12 15:33:26 +02:00
2023-12-17 18:43:52 +01:00
2023-11-20 21:12:13 +01:00
2024-04-10 14:41:16 +02:00
2024-09-11 09:05:39 +02:00
2024-08-28 20:46:36 +02:00
2024-07-09 09:29:45 +02:00
2023-10-29 14:48:11 +01:00
2023-10-29 14:48:11 +01:00
2023-10-29 14:48:11 +01:00
2023-12-15 08:13:25 +01:00
2023-09-01 06:41:39 +02:00
2023-10-29 14:48:11 +01:00
2024-04-10 14:41:16 +02:00
2020-06-01 19:21:41 +02:00
2024-08-23 20:07:00 +02:00
2024-06-04 09:50:35 +02:00
2023-12-15 08:13:25 +01:00
2023-12-14 16:25:34 +01:00
2024-09-09 14:20:40 +02:00
2023-12-13 10:29:58 +01:00
2024-09-16 07:16:21 +02:00
2023-12-13 10:39:10 +01:00
2023-12-15 08:13:25 +01:00
2024-08-28 20:46:36 +02:00
2023-10-29 14:48:11 +01:00
2024-08-28 20:51:13 +02:00
2023-08-06 14:26:21 +02:00
2024-07-20 05:40:38 +02:00
2024-09-09 09:50:45 +02:00
2023-12-13 10:29:58 +01:00
2021-01-12 09:36:51 +01:00
2023-12-12 16:54:50 +01:00
2024-07-09 09:29:45 +02:00
2024-04-05 08:54:48 +02:00
2024-08-20 21:32:35 +02:00
2024-01-05 08:17:08 +01:00
2024-01-31 21:36:59 +01:00
2024-09-16 20:45:00 +02:00
2024-07-12 15:23:09 +02:00
2023-12-16 07:05:57 +01:00
2023-11-30 14:05:45 +01:00
2024-07-17 18:25:19 +02:00
2023-12-15 08:13:25 +01:00
2023-12-15 08:13:25 +01:00
2024-04-10 14:41:16 +02:00
2023-10-29 14:48:11 +01:00
2023-10-29 14:48:11 +01:00
2023-12-12 16:54:50 +01:00
2023-10-29 14:48:11 +01:00
2024-08-12 15:33:26 +02:00
2023-04-17 20:55:22 +02:00
2024-04-10 14:41:16 +02:00
2024-09-14 11:11:40 +08:00
2023-08-06 14:26:21 +02:00
2023-04-24 06:52:37 +02:00
2024-09-03 09:18:38 +02:00
2024-03-18 20:27:00 +01:00
2022-08-24 09:44:16 +02:00
2023-11-20 21:12:13 +01:00
2023-10-29 14:48:11 +01:00
2023-12-17 18:43:52 +01:00
2024-07-09 09:29:45 +02:00
2023-03-03 07:36:38 +01:00
2023-10-29 14:48:11 +01:00
2018-05-27 19:19:12 +02:00
2024-09-03 09:19:52 +02:00
2023-10-29 14:48:11 +01:00
2024-04-10 14:41:16 +02:00
2024-09-03 09:19:52 +02:00
2023-07-02 22:36:05 +02:00
2024-08-12 15:33:26 +02:00
2023-10-29 14:48:11 +01:00
2024-09-06 11:26:24 +02:00
2023-11-06 18:33:28 +01:00
2023-08-10 14:26:40 +02:00
2020-09-11 01:04:07 +02:00
2023-10-29 14:48:11 +01:00
2024-09-02 18:22:20 +02:00
2024-09-13 11:08:22 +02:00
2024-09-13 11:08:22 +02:00
2024-09-11 11:55:09 +02:00
2023-12-15 08:13:25 +01:00
2024-09-14 10:20:30 +08:00
2024-09-06 11:16:43 +02:00
2024-09-17 06:22:45 +02:00
2024-07-17 23:54:15 +02:00
2024-09-08 22:49:27 +02:00
2024-04-16 12:46:59 +02:00
2023-12-15 08:13:25 +01:00
2024-09-17 14:01:48 +02:00
2024-09-13 11:08:22 +02:00
2022-12-11 16:58:50 +01:00
2024-09-11 09:05:39 +02:00
2024-09-11 09:05:39 +02:00
2024-09-11 11:55:09 +02:00
2024-08-16 06:33:43 +02:00
2024-09-17 06:22:45 +02:00
2023-11-20 21:12:13 +01:00
2024-08-27 09:45:30 +02:00
2024-03-16 08:35:18 +08:00
2024-06-02 11:54:39 +02:00
2024-05-08 09:10:48 -06:00
2024-03-15 18:20:10 +01:00
2024-04-10 14:41:16 +02:00
2023-08-10 14:26:40 +02:00
2024-09-16 07:16:21 +02:00
2024-02-20 07:31:58 +01:00
2023-10-29 14:48:11 +01:00
2024-08-28 20:46:36 +02:00
2024-09-11 16:13:28 +02:00
2023-10-29 14:48:11 +01:00
2024-08-20 11:57:47 +02:00
2024-09-16 20:45:00 +02:00
2023-12-12 16:54:50 +01:00
2023-08-21 20:08:00 +02:00
2024-08-28 20:46:36 +02:00
2024-09-17 06:29:49 +02:00
2023-08-10 14:26:40 +02:00
2024-04-10 14:41:16 +02:00
2024-08-11 16:13:26 +02:00
2023-10-29 14:48:11 +01:00
2023-12-17 18:43:52 +01:00
2023-12-25 07:12:54 +01:00