v2: update parse type not to prefix builtin types with module
							parent
							
								
									195f3f465b
								
							
						
					
					
						commit
						1007dd8f23
					
				| 
						 | 
					@ -110,7 +110,7 @@ pub fn (p mut Parser) parse_type() table.Type {
 | 
				
			||||||
		name += '.' + p.tok.lit
 | 
							name += '.' + p.tok.lit
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	// `Foo` in module `mod` means `mod.Foo`
 | 
						// `Foo` in module `mod` means `mod.Foo`
 | 
				
			||||||
	else if p.mod != 'main' {
 | 
						else if p.mod != 'main' && !(name in table.builtin_type_names) {
 | 
				
			||||||
		name = p.mod + '.' + name
 | 
							name = p.mod + '.' + name
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	// p.warn('get type $name')
 | 
						// p.warn('get type $name')
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -574,7 +574,7 @@ pub fn (p mut Parser) name_expr() (ast.Expr,table.Type) {
 | 
				
			||||||
			expr,_ = p.expr(0)
 | 
								expr,_ = p.expr(0)
 | 
				
			||||||
			// TODO, string(b, len)
 | 
								// TODO, string(b, len)
 | 
				
			||||||
			// if table.type_idx(to_typ) == table.string_type_idx && p.tok.kind == .comma {
 | 
								// if table.type_idx(to_typ) == table.string_type_idx && p.tok.kind == .comma {
 | 
				
			||||||
			if p.tok.kind == .comma && name == 'string' {
 | 
								if p.tok.kind == .comma && table.type_idx(to_typ) == table.string_type_idx {
 | 
				
			||||||
				p.check(.comma)
 | 
									p.check(.comma)
 | 
				
			||||||
				p.expr(0) // len
 | 
									p.expr(0) // len
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue