ringabout
80e6b35721
templates/macros use no expected types when return types are specified ( #24298 )
...
fixes #24296
fixes #24295
Templates use `expectedType` for type inference. It's justified that
when templates don't have an actual return type, i.e., `untyped` etc.
When the return type of templates is specified, we should not infer the
type
```nim
template g(): string = ""
let c: cstring = g()
```
In this example, it is not reasonable to annotate the templates
expression with the `cstring` type before the `fitNode` check with its
specified return type.
2024-10-13 19:54:30 +02:00
..
2023-08-27 11:27:47 +02:00
2018-12-11 21:23:21 +01:00
2018-09-24 16:00:57 +02:00
2020-11-11 17:41:49 +00:00
2024-01-17 11:59:54 +01:00
2024-01-17 11:59:54 +01:00
2022-12-06 13:09:50 +01:00
2023-01-18 11:52:18 +01:00
2018-11-23 13:16:45 +01:00
2023-08-24 06:11:48 +02:00
2018-11-23 11:58:28 +01:00
2015-09-14 20:25:52 +02:00
2020-03-25 21:36:22 +01:00
2023-05-11 20:49:47 +02:00
2020-04-01 19:38:44 +02:00
2023-09-20 08:19:29 +02:00
2022-09-03 09:52:13 +02:00
2015-09-04 23:04:32 +02:00
2015-09-04 23:04:32 +02:00
2017-06-20 11:29:42 +02:00
2018-10-14 00:52:28 +02:00
2020-03-22 20:01:01 +01:00
2020-03-22 19:35:55 +01:00
2019-04-28 10:11:41 +02:00
2019-04-28 10:11:41 +02:00
2019-04-28 10:11:41 +02:00
2019-05-07 08:29:17 +02:00
2022-08-23 20:18:40 +02:00
2018-12-11 21:23:21 +01:00
2015-03-14 22:46:17 +01:00
2024-08-28 20:46:36 +02:00
2017-12-14 14:02:13 +01:00
2023-06-15 09:56:08 +02:00
2024-08-16 08:22:49 +02:00
2024-02-20 08:08:16 +01:00
2021-05-02 00:26:41 +02:00
2022-01-16 11:08:38 +01:00
2022-01-19 12:38:14 +01:00
2022-09-03 09:52:13 +02:00
2022-09-03 09:52:13 +02:00
2018-12-11 21:23:21 +01:00
2018-12-11 21:23:21 +01:00
2017-12-14 14:02:13 +01:00
2018-12-11 21:23:21 +01:00
2018-12-11 21:23:21 +01:00
2024-10-13 19:54:30 +02:00
2020-04-18 16:15:17 +02:00