cgen: update the test
							parent
							
								
									484320ed08
								
							
						
					
					
						commit
						bcaf72eccb
					
				| 
						 | 
				
			
			@ -186,8 +186,10 @@ fn (g mut Gen) stmt(node ast.Stmt) {
 | 
			
		|||
				sym := g.table.get_type_symbol(it.receiver.typ)
 | 
			
		||||
				styp := sym.name.replace('.', '__')
 | 
			
		||||
				g.write('$styp $it.receiver.name')
 | 
			
		||||
				g.definitions.write('$styp $it.receiver.name')
 | 
			
		||||
				if it.args.len > 0 {
 | 
			
		||||
					g.write(', ')
 | 
			
		||||
					g.definitions.write(', ')
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			//
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
void foo(int a);
 | 
			
		||||
void User_inc_age(int n);
 | 
			
		||||
void User_inc_age(User u, int n);
 | 
			
		||||
int get_int(string a);
 | 
			
		||||
bool get_bool();
 | 
			
		||||
int get_int2();
 | 
			
		||||
| 
						 | 
				
			
			@ -75,7 +75,7 @@ i < 10; i++) {
 | 
			
		|||
	int f = TODO_first(nums);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void User_inc_age(int n) {
 | 
			
		||||
void User_inc_age(User u, int n) {
 | 
			
		||||
	u.age += n;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,9 +2,9 @@ multi_return_int_string mr_test();
 | 
			
		|||
int testa();
 | 
			
		||||
string testb(int a);
 | 
			
		||||
int testc(int a);
 | 
			
		||||
int Foo_testa();
 | 
			
		||||
int Foo_testb();
 | 
			
		||||
int Bar_testa();
 | 
			
		||||
int Foo_testa(Foo f);
 | 
			
		||||
int Foo_testb(Foo f);
 | 
			
		||||
int Bar_testa(Bar b);
 | 
			
		||||
 | 
			
		||||
int main() {
 | 
			
		||||
    Bar b = (Bar){
 | 
			
		||||
| 
						 | 
				
			
			@ -55,17 +55,17 @@ int testc(int a) {
 | 
			
		|||
    return a;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int Foo_testa() {
 | 
			
		||||
int Foo_testa(Foo f) {
 | 
			
		||||
    int a = TODO_testb(f);
 | 
			
		||||
    a = 1;
 | 
			
		||||
    return 4;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int Foo_testb() {
 | 
			
		||||
int Foo_testb(Foo f) {
 | 
			
		||||
    return 4;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int Bar_testa() {
 | 
			
		||||
int Bar_testa(Bar b) {
 | 
			
		||||
    return 4;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue