diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-07-04 16:06:08 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-07-04 16:06:08 +0100 |
| commit | 240da5c8e047acf14802fe1fc2a9d93fc374ca72 (patch) | |
| tree | a4a1d7e98d92d21ece52ed17b03e03fdd0fbeac0 /src/check_expr.cpp | |
| parent | 689a0c0b4955e5325c5409855632a3d4a154b41e (diff) | |
Allow aliasing of aliases
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index b2dd98fa9..9e34e2412 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -331,6 +331,17 @@ void check_assignment(Checker *c, Operand *operand, Type *type, String context_n if (operand->mode == Addressing_Invalid) { return; } + #if 0 + if (operand->mode == Addressing_Type) { + Type *t = base_type(type); + if (t->kind == Type_Pointer && + t->Pointer.elem == t_type_info) { + add_type_info_type(c, type); + return; + } + } + #endif + if (is_type_untyped(operand->type)) { Type *target_type = type; if (type == NULL || is_type_any(type)) { |