diff options
Diffstat (limited to 'src/analysis/scan/exprs')
-rw-r--r-- | src/analysis/scan/exprs/call.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/analysis/scan/exprs/call.c b/src/analysis/scan/exprs/call.c index 2fd1ff1..83aff85 100644 --- a/src/analysis/scan/exprs/call.c +++ b/src/analysis/scan/exprs/call.c @@ -378,18 +378,24 @@ static ScanReductionState g_scan_pending_call_reduce(GScanPendingCall *expr, GSc */ if (!G_IS_REGISTERED_ITEM(final)) { - assert(access->next == NULL); + if (access->next != NULL) + result = SRS_UNRESOLVABLE; - *out = G_SCAN_EXPRESSION(final); + else + { + *out = G_SCAN_EXPRESSION(final); + g_object_ref(G_OBJECT(final)); + + result = SRS_REDUCED; - result = SRS_REDUCED; + } } else { assert(access->next != NULL); - new_next = g_scan_named_access_duplicate(access->next, resolved); + new_next = g_scan_named_access_duplicate(access->next, G_REGISTERED_ITEM(final)); result = g_scan_expression_reduce(new_next, ctx, scope, out); @@ -402,6 +408,8 @@ static ScanReductionState g_scan_pending_call_reduce(GScanPendingCall *expr, GSc else result = SRS_UNRESOLVABLE; + g_clear_object(&final); + } /* Libération locale des arguments reconstruits */ |