Main function
This commit is contained in:
@@ -21,7 +21,10 @@ pub fn walk_ast(top_scope: Arc<Scope>, tl: &mut Vec<parser::ast::TopLevel>) {
|
||||
params, body, name, ..
|
||||
} => {
|
||||
let rf = top_scope.get_reference(name).unwrap();
|
||||
|
||||
if name != "main" {
|
||||
*name = rf.name.clone();
|
||||
}
|
||||
|
||||
match &*rf.var_type {
|
||||
hir::TypeRef::Function(f) => walk_param_list(&f.params, params),
|
||||
|
||||
+2
-4
@@ -1,7 +1,5 @@
|
||||
package main;
|
||||
|
||||
export struct MyType {
|
||||
export x: int,
|
||||
function main() {
|
||||
let a = 10;
|
||||
}
|
||||
|
||||
export function test(a: MyType) { }
|
||||
|
||||
Reference in New Issue
Block a user