aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2019-07-15 21:18:37 +0100
committergingerBill <bill@gingerbill.org>2019-07-15 21:18:37 +0100
commitf25818e9230b77bbe3a3422c75d1544c9b417fcf (patch)
tree41af5cb07e0a83d8385d456f8cbeca4fb08e01fd /src/check_type.cpp
parent3d531be71176cd0b9191119bf373e3a52c3dde91 (diff)
Make procedure parameters just named values rather than copied variables
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index df3c554dd..f4e5b49d0 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -1519,18 +1519,6 @@ Type *check_get_params(CheckerContext *ctx, Scope *scope, Ast *_params, bool *is
}
}
- if (p->flags&FieldFlag_in) {
- if (is_type_param) {
- error(param, "'in' cannot be applied to a type parameter");
- p->flags &= ~FieldFlag_in;
- } else if (is_variadic) {
- error(param, "'in' cannot be applied to a variadic parameter");
- p->flags &= ~FieldFlag_in;
- }
- }
-
- bool is_in = (p->flags&FieldFlag_in) != 0;
-
for_array(j, p->names) {
Ast *name = p->names[j];
@@ -1670,7 +1658,7 @@ Type *check_get_params(CheckerContext *ctx, Scope *scope, Ast *_params, bool *is
param = alloc_entity_const_param(scope, name->Ident.token, type, poly_const, is_type_polymorphic(type));
} else {
- param = alloc_entity_param(scope, name->Ident.token, type, is_using, is_in);
+ param = alloc_entity_param(scope, name->Ident.token, type, is_using, true);
param->Variable.param_value = param_value;
}
}