@@ -875,7 +875,7 @@ sema_decl_function_t* MetaCSemantic_doFunctionSemantic(metac_sema_state_t* self,
875875 paramVar->VarIdentifier);
876876 f->Parameters[i].VarIdentifier = semaId;
877877 */
878- f -> Parameters [i ].VarIdentifier = paramVar . VarIdentifier ;
878+ f -> Parameters [i ].VarIdentifier = paramVar -> VarIdentifier ;
879879
880880 f -> Parameters [i ].VarFlags |= variable_is_parameter ;
881881 if (METAC_NODE (paramVar -> VarInitExpr ) != emptyNode )
@@ -888,10 +888,24 @@ sema_decl_function_t* MetaCSemantic_doFunctionSemantic(metac_sema_state_t* self,
888888 {
889889 METAC_NODE (f -> Parameters [i ].VarInitExpr ) = emptyNode ;
890890 }
891- metac_type_index_t idx ;
892- idx = f -> Parameters [i ].TypeIndex =
893- MetaCSemantic_doTypeSemantic (self ,
894- currentParam -> Parameter -> VarType );
891+ for (;;)
892+ {
893+ metac_type_index_t idx ;
894+ idx = f -> Parameters [i ].TypeIndex =
895+ MetaCSemantic_doTypeSemantic (self ,
896+ currentParam -> Parameter -> VarType );
897+ if (idx .v != unresolvedTypeIndex .v )
898+ {
899+ break ;
900+ }
901+ else
902+ {
903+ #ifndef NO_FIBERS
904+ YIELD ("Waiting for type semantic on function parameter" );
905+ #else
906+ #endif
907+ }
908+ }
895909 uint32_t hash = f -> Parameters [i ].TypeIndex .v ;
896910 hash = CRC32C_VALUE (hash , i );
897911 f -> Parameters [i ].Hash = hash ;
@@ -1266,12 +1280,12 @@ metac_sema_decl_t* MetaCSemantic_doDeclSemantic_(metac_sema_state_t* self,
12661280 (* (MetaCSemantic_doDeclSemantic_task_context_t * )declTask .Context ) =
12671281 CtxValue ;
12681282 MetaCSemantic_doDeclSemantic_task_context_t * CtxValuePtr = & CtxValue ;
1269- printf ("We should yield now\n" );
1283+ xprintf ("We should yield now\n" );
12701284 declTask .Continuation = currentTask ;
12711285 TaskQueue_Push (q , & declTask );
12721286 U32 (currentTask -> TaskFlags ) |= Task_Waiting ;
12731287
1274- YIELD (waiting_for_declSemantic );
1288+ YIELD ("waiting for declSemantic" );
12751289
12761290 printf ("We are back\n" );
12771291 result = CtxValuePtr -> Result ;
0 commit comments