mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- $defined(hashmap.init(mem)) causes compiler segfault #2611.
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
- Unexpected maybe-deref subscript error with out parameter #2600.
|
||||
- Bug on rethrow in return with defer #2603.
|
||||
- Fix bug when converting from vector to distinct type of wider vector. #2604
|
||||
- `$defined(hashmap.init(mem))` causes compiler segfault #2611.
|
||||
|
||||
### Stdlib changes
|
||||
- Add `CGFloat` `CGPoint` `CGSize` `CGRect` types to core_foundation (macOS).
|
||||
|
||||
@@ -3728,7 +3728,6 @@ static inline bool sema_call_analyse_member_get(SemaContext *context, Expr *expr
|
||||
}
|
||||
static inline bool sema_expr_analyse_call(SemaContext *context, Expr *expr, bool *no_match_ref)
|
||||
{
|
||||
if (no_match_ref) *no_match_ref = true;
|
||||
Expr *func_expr = exprptr(expr->call_expr.function);
|
||||
if (!sema_analyse_expr(context, func_expr)) return false;
|
||||
bool optional = func_expr->type && IS_OPTIONAL(func_expr);
|
||||
@@ -11042,7 +11041,7 @@ static inline bool sema_expr_analyse_ct_defined(SemaContext *context, Expr *expr
|
||||
}
|
||||
case EXPR_CALL:
|
||||
{
|
||||
bool no_match;
|
||||
bool no_match = false;
|
||||
if (!sema_expr_analyse_call(active_context, main_expr, &no_match))
|
||||
{
|
||||
if (!no_match) goto FAIL;
|
||||
|
||||
7
test/unit/regression/defined_ct.c3
Normal file
7
test/unit/regression/defined_ct.c3
Normal file
@@ -0,0 +1,7 @@
|
||||
module defined_call;
|
||||
import std;
|
||||
|
||||
HashMap {String, int} val;
|
||||
const bool V = $defined(val.init(mem));
|
||||
|
||||
fn void main() {}
|
||||
Reference in New Issue
Block a user