Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacShelton committed Oct 18, 2021
2 parents 6803917 + b3ada78 commit b231aff
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ ifeq ($(OS), Windows_NT)
@del obj\*.* /S /Q 1> nul 2>&1
@del bin\adept.exe /S /Q 1> nul 2>&1
@del bin\adept_debug.exe /S /Q 1> nul 2>&1
@del unittests\obj\*.* /S /Q 1> nul 2>&1
@if exist unittests\obj @del unittests\obj\*.* /S /Q 1> nul 2>&1
else
@find . -name "*.o" -type f -delete 2> /dev/null
@rm -rf 2> /dev/null bin/adept
Expand Down
1 change: 1 addition & 0 deletions include/UTIL/ground.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ extern "C" {
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <stdint.h>

#ifdef _WIN32
#include <io.h>
Expand Down
1 change: 1 addition & 0 deletions src/AST/ast_layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ bool ast_layout_bone_has_polymorph(ast_layout_bone_t *bone){
default:
internalerrorprintf("ast_layout_bone_has_polymorph() got unknown bone kind\n");
}
return false;
}

strong_cstr_t ast_layout_bone_str(ast_layout_bone_t *bone, ast_field_map_t *field_map, ast_layout_endpoint_t endpoint){
Expand Down
8 changes: 0 additions & 8 deletions src/INFER/infer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,6 @@ errorcode_t infer_type(infer_ctx_t *ctx, ast_type_t *type){
switch(elem->id){
case AST_ELEM_BASE: {
weak_cstr_t base = ((ast_elem_base_t*) elem)->base;
ast_composite_t *composite;

if(strcmp(base, "void") == 0 && type->elements_length > 1 && e != 0 && type->elements[e - 1]->id == AST_ELEM_POINTER){
// Substitute '*void' with 'ptr'
Expand Down Expand Up @@ -1132,8 +1131,6 @@ errorcode_t infer_type(infer_ctx_t *ctx, ast_type_t *type){
free(cloned.elements);
continue; // Don't do normal stuff that follows
}

composite = ast_composite_find_exact(ctx->ast, base);
}
break;
case AST_ELEM_FUNC:
Expand All @@ -1143,11 +1140,6 @@ errorcode_t infer_type(infer_ctx_t *ctx, ast_type_t *type){
if(infer_type(ctx, ((ast_elem_func_t*) elem)->return_type)) return FAILURE;
break;
case AST_ELEM_GENERIC_BASE: {
weak_cstr_t base = ((ast_elem_generic_base_t*) elem)->name;
ast_polymorphic_composite_t *poly_composite;

poly_composite = ast_polymorphic_composite_find_exact(ctx->ast, base);

for(length_t a = 0; a != ((ast_elem_generic_base_t*) elem)->generics_length; a++){
if(infer_type(ctx, &((ast_elem_generic_base_t*) elem)->generics[a])) return FAILURE;
}
Expand Down

0 comments on commit b231aff

Please sign in to comment.