Proxies were rather hacky and complicated, and only existed as a workaround for oddities with constructors. This patch replaces them with actual type symbols, a very tiny step to semantically getting rid of tags. This greatly simplifies how we implement constructors, and paves the way for using methodmap symbols in field expressions. Since non-value symbols are new to spcomp1, we place a rather pigeonholed check into primary() to make sure non-value symbols don't escape into expressions.
		
			
				
	
	
		
			18 lines
		
	
	
		
			155 B
		
	
	
	
		
			SourcePawn
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			155 B
		
	
	
	
		
			SourcePawn
		
	
	
	
	
	
| native printnum(x);
 | |
| 
 | |
| enum X {
 | |
| };
 | |
| 
 | |
| methodmap X {
 | |
| 	public X(int y) {
 | |
| 		printnum(y);
 | |
| 		return view_as<X>(0);
 | |
| 	}
 | |
| };
 | |
| 
 | |
| public main()
 | |
| {
 | |
| 	X x = X(5);
 | |
| 	return X;
 | |
| }
 |