[vala/staging] codegen: CCodeBaseModule.get_type_id_expression () won't return null



commit f32f45c839efc2cffc5aaf8690739fae0241c7ee
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Fri Feb 19 16:29:24 2021 +0100

    codegen: CCodeBaseModule.get_type_id_expression () won't return null

 codegen/valaccodebasemodule.vala | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 2b8132ee5..928be5111 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -5805,13 +5805,9 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                } else {
                        CCodeFunctionCall ccheck;
                        if (type.type_symbol == null || type.type_symbol.external_package) {
-                               var type_id = get_type_id_expression (type);
-                               if (type_id == null) {
-                                       return new CCodeInvalidExpression ();
-                               }
                                ccheck = new CCodeFunctionCall (new CCodeIdentifier 
("G_TYPE_CHECK_INSTANCE_TYPE"));
                                ccheck.add_argument ((CCodeExpression) ccodenode);
-                               ccheck.add_argument (type_id);
+                               ccheck.add_argument (get_type_id_expression (type));
                        } else {
                                ccheck = new CCodeFunctionCall (new CCodeIdentifier 
(get_ccode_type_check_function (type.type_symbol)));
                                ccheck.add_argument ((CCodeExpression) ccodenode);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]