Özgür
2a3d0b71bb
Reject abstract types in var function parameters ( #6499 )
...
### Description
Fixes an issue where the toolchain accepted abstract types in function
parameters declared with `var`.
### Changes
- Implemented a check for abstract types for function parameters with
`var` binding pattern in `HandleAnyBindingPattern`.
- Added a test case to
`toolchain/check/testdata/class/fail_abstract.carbon`.
**Note:** I did not use `AsConcreteType` like used in `case
FullPatternStack::Kind::NameBindingDecl`. Using it enforces type
completion, thus causing valid signatures such as `fn F[var self: Self]`
to fail.
Also the pre-commit checks fail due to a diagnostic name collision with
`toolchain/check/type_completion.cpp`. Should I add a function that just
checks if the type is abstract to share the diagnostic?
Fixes #6402
2025-12-15 20:17:34 +00:00
..
2025-12-08 15:31:13 +00:00
2025-12-11 23:50:10 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-09-29 16:05:06 +00:00
2025-10-28 17:17:38 +00:00
2025-10-29 16:28:56 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-10-28 17:17:38 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-11-13 20:17:44 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-11-13 20:17:44 +00:00
2025-06-25 21:03:15 +00:00
2025-10-08 18:45:35 +00:00
2025-11-13 20:17:44 +00:00
2025-11-13 20:17:44 +00:00
2025-12-15 20:17:34 +00:00
2025-06-17 21:10:04 +00:00
2025-09-03 21:00:12 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-09-29 16:05:06 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-12-10 18:34:23 +00:00
2025-09-10 23:55:55 +00:00
2025-06-17 21:10:04 +00:00
2025-11-18 19:48:58 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-12-08 15:31:13 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-09-10 23:55:55 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-06-17 21:10:04 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-06-17 21:10:04 +00:00
2025-10-28 17:17:38 +00:00
2025-11-13 20:17:44 +00:00
2025-12-08 15:31:13 +00:00
2025-09-29 16:05:06 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-09-29 16:05:06 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-10-23 01:46:24 +00:00
2025-12-08 15:31:13 +00:00
2025-06-18 20:45:46 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-08-06 23:55:05 +00:00
2025-12-15 20:17:34 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-09-29 16:05:06 +00:00
2025-11-13 20:17:44 +00:00
2025-09-29 16:05:06 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-12-08 15:31:13 +00:00
2025-09-29 16:05:06 +00:00
2025-12-08 15:31:13 +00:00