metagn
8b815cc857
delay resolved procvar check for proc params + acknowledge unresolved statics ( #23188 )
...
fixes #23186
As explained in #23186 , generics can transform `genericProc[int]` into a
call `` `[]`(genericProc, int) `` which causes a problem when
`genericProc` is resemmed, since it is not a resolved generic proc. `[]`
needs unresolved generic procs since `mArrGet` also handles explicit
generic instantiations, so delay the resolved generic proc check to
`semFinishOperands` which is intentionally not called for `mArrGet`.
The root issue for
[t6137](https://github.com/nim-lang/Nim/blob/devel/tests/generics/t6137.nim )
is also fixed (because this change breaks it otherwise), the compiler
doesn't consider the possibility that an assigned generic param can be
an unresolved static value (note the line `if t.kind == tyStatic: s.ast
= t.n` below the change in sigmatch), now it properly errors that it
couldn't instantiate it as it would for a type param. ~~The change in
semtypinst is just for symmetry with the code above it which also gives
a `cannot instantiate` error, it may or may not be necessary/correct.~~
Now removed, I don't think it was correct.
Still possible that this has unintended consequences.
(cherry picked from commit e8092a5470 )
2024-05-02 12:17:23 +02:00
..
2024-05-02 10:02:06 +02:00
2023-04-24 06:52:37 +02:00
2022-11-16 07:36:14 +01:00
2022-09-11 13:52:43 -04:00
2024-05-02 10:02:06 +02:00
2022-12-26 13:20:05 +01:00
2021-08-13 09:35:48 +02:00
2023-02-22 20:34:20 +01:00
2022-03-23 20:34:53 +01:00
2023-05-08 16:25:47 +02:00
2024-04-27 20:00:30 +02:00
2024-04-27 20:00:30 +02:00
2022-09-28 15:05:01 +02:00
2022-11-30 21:51:13 +01:00
2024-01-19 09:18:23 +01:00
2024-04-18 09:00:35 +02:00
2022-09-27 10:57:47 +02:00
2022-09-27 10:57:47 +02:00
2024-04-28 06:57:55 +02:00
2024-03-03 15:42:20 +01:00
2024-04-27 20:00:30 +02:00
2024-04-17 09:34:23 +02:00
2024-04-18 10:30:34 +02:00
2023-07-22 06:37:27 +02:00
2023-06-10 07:09:03 +02:00
2024-04-18 09:00:46 +02:00
2023-06-18 16:06:14 +02:00
2023-07-06 08:18:47 +02:00
2024-04-19 16:35:26 +02:00
2017-01-07 22:35:09 +01:00
2022-06-10 20:40:08 +02:00
2023-07-14 12:40:24 +02:00
2023-06-27 22:42:48 +02:00
2023-07-20 19:56:04 +02:00
2023-08-22 08:28:30 +02:00
2023-04-24 06:52:37 +02:00
2022-03-23 20:34:53 +01:00
2022-12-16 08:01:15 +01:00
2023-06-06 23:31:55 +02:00
2024-04-18 09:00:35 +02:00
2021-09-25 13:22:00 +02:00
2019-11-28 17:13:04 +01:00
2023-05-02 10:49:17 +02:00
2022-10-21 22:46:32 +02:00
2023-09-18 12:12:59 +02:00
2022-03-23 20:34:53 +01:00
2024-03-21 08:03:31 +01:00
2020-06-01 19:21:41 +02:00
2024-04-22 10:22:28 +02:00
2023-06-10 17:32:11 +02:00
2023-02-24 09:02:15 +01:00
2023-05-14 16:58:28 +02:00
2024-04-17 09:34:23 +02:00
2023-02-27 00:56:43 +01:00
2024-04-20 09:44:30 +02:00
2023-05-06 21:27:28 +02:00
2023-05-11 10:10:51 +02:00
2024-04-23 06:57:09 +02:00
2021-03-09 20:19:24 +01:00
2024-04-18 10:34:01 +02:00
2023-05-06 19:10:13 +02:00
2022-03-23 20:34:53 +01:00
2024-04-17 14:06:38 +02:00
2024-04-17 14:00:45 +02:00
2021-01-12 09:36:51 +01:00
2023-05-12 10:05:38 +02:00
2024-02-01 12:30:21 +01:00
2024-02-01 12:30:21 +01:00
2024-04-19 16:39:22 +02:00
2024-02-01 12:30:21 +01:00
2024-04-22 16:18:16 +02:00
2022-03-23 20:34:53 +01:00
2023-04-24 06:52:37 +02:00
2023-06-29 10:51:18 +02:00
2023-05-11 10:23:52 +02:00
2023-05-02 10:49:17 +02:00
2022-03-26 11:50:15 +01:00
2023-06-30 23:03:25 +02:00
2022-03-23 20:34:53 +01:00
2022-09-11 13:52:43 -04:00
2022-03-23 20:34:53 +01:00
2023-03-08 22:34:59 +01:00
2023-04-17 20:55:22 +02:00
2023-05-12 15:24:14 +02:00
2023-11-25 11:50:27 +01:00
2022-05-30 18:52:19 +02:00
2023-04-24 06:52:37 +02:00
2022-10-01 16:46:51 +02:00
2024-04-19 16:35:07 +02:00
2022-08-24 09:44:16 +02:00
2023-05-02 10:49:17 +02:00
2023-03-02 09:16:28 +01:00
2022-10-17 23:48:51 +02:00
2024-02-01 12:30:21 +01:00
2023-03-03 07:36:38 +01:00
2023-02-16 13:47:52 +01:00
2018-05-27 19:19:12 +02:00
2024-04-22 10:22:27 +02:00
2020-11-25 07:48:27 +01:00
2020-09-22 18:24:13 +02:00
2023-07-02 22:36:05 +02:00
2024-04-19 16:37:23 +02:00
2022-08-09 16:32:29 +08:00
2023-01-01 10:25:04 +01:00
2022-08-24 13:38:30 +02:00
2023-05-30 13:41:56 +02:00
2020-09-11 01:04:07 +02:00
2023-07-03 14:15:44 +02:00
2024-04-18 10:33:54 +02:00
2024-04-23 18:01:24 +02:00
2024-04-17 14:06:00 +02:00
2024-05-02 12:17:23 +02:00
2023-04-24 06:52:37 +02:00
2024-04-17 14:06:21 +02:00
2024-05-02 10:02:06 +02:00
2024-05-02 12:17:23 +02:00
2022-10-22 06:37:23 +02:00
2024-04-23 06:57:09 +02:00
2024-04-17 14:04:48 +02:00
2023-04-24 06:52:37 +02:00
2024-04-17 14:03:45 +02:00
2024-04-27 20:00:30 +02:00
2022-12-11 16:58:50 +01:00
2024-04-19 16:42:44 +02:00
2024-04-27 20:00:30 +02:00
2024-04-27 20:00:30 +02:00
2023-05-02 10:49:17 +02:00
2024-05-02 12:17:23 +02:00
2022-12-10 15:42:22 +01:00
2024-04-17 16:02:18 +02:00
2023-02-27 00:57:02 +01:00
2023-05-08 16:25:47 +02:00
2024-01-16 15:36:03 +08:00
2022-04-25 12:00:23 +02:00
2022-08-19 15:40:53 -04:00
2023-07-10 10:31:13 +02:00
2024-04-17 12:40:00 +02:00
2022-03-23 20:34:53 +01:00
2024-04-18 10:33:25 +02:00
2024-04-18 10:30:34 +02:00
2023-04-11 09:23:41 +02:00
2024-04-20 09:44:31 +02:00
2024-04-19 16:37:16 +02:00
2022-12-10 18:57:19 +01:00
2023-09-18 12:12:58 +02:00
2024-04-17 14:06:46 +02:00
2024-04-22 10:22:28 +02:00
2023-06-17 05:42:05 +02:00
2023-04-24 06:52:37 +02:00
2023-06-17 05:42:05 +02:00
2023-05-04 15:44:46 +08:00
2024-04-17 12:40:00 +02:00