mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Deprecate SomeFn.params
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
- Add `math::@ceil()` compile time ceil function. #2134
|
||||
- Improve error message when using keywords as functions/macros/variables #2133.
|
||||
- Deprecate `MyEnum.elements`.
|
||||
- Deprecate `SomeFn.params`.
|
||||
|
||||
### Fixes
|
||||
- Assert triggered when casting from `int[2]` to `uint[2]` #2115
|
||||
|
||||
@@ -5155,6 +5155,7 @@ static bool sema_expr_rewrite_to_type_property(SemaContext *context, Expr *expr,
|
||||
case TYPE_PROPERTY_PARAMSOF:
|
||||
return sema_create_const_paramsof(expr, flat);
|
||||
case TYPE_PROPERTY_PARAMS:
|
||||
SEMA_DEPRECATED(expr, "'params' is deprecated, use 'paramsof' instead.");
|
||||
return sema_create_const_params(expr, flat);
|
||||
case TYPE_PROPERTY_RETURNS:
|
||||
expr_rewrite_const_typeid(expr, type_infoptr(flat->pointer->function.signature->rtype)->type);
|
||||
|
||||
@@ -6,9 +6,9 @@ fn int hell() { return 1; }
|
||||
|
||||
macro print_args($Type)
|
||||
{
|
||||
var $params = $Type.params;
|
||||
var $params = $Type.paramsof;
|
||||
$foreach $param : $params:
|
||||
io::printn($param.nameof);
|
||||
io::printn($param.type.nameof);
|
||||
$endforeach;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user