Fix bug where you could have same named decls

This commit is contained in:
Krzosa Karol
2022-06-11 10:01:31 +02:00
parent 3b4e14a089
commit ac371b7203
2 changed files with 1 additions and 2 deletions

View File

@@ -456,7 +456,7 @@ compile_files(Array<String> filename){
decl->state = DECL_RESOLVED; decl->state = DECL_RESOLVED;
} }
package->decls.add(decl); insert_into_scope(package, decl);
} }
pctx->currently_parsed_scope = 0; pctx->currently_parsed_scope = 0;

View File

@@ -23,7 +23,6 @@ Boolean: Bool = true
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
array1: [4]S64 = {1,2,3,4} array1: [4]S64 = {1,2,3,4}
imp_array := [5]S64{1,2} imp_array := [5]S64{1,2}
// imp_array := [5]S64{1,2} // @todo this works for some reason
// imp_array_a := [5]S64{1,2,3,4,5,6} // imp_array_a := [5]S64{1,2,3,4,5,6}
// imp_array_b: [5]S64 = {1,2,3,4,5,6} // imp_array_b: [5]S64 = {1,2,3,4,5,6}
imp_array_c: [5]S64 = {[0] = 1, [2] = 2, [1] = 0} // @todo this should be illegal imp_array_c: [5]S64 = {[0] = 1, [2] = 2, [1] = 0} // @todo this should be illegal