mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: 7 errors left
This commit is contained in:
parent
e6a679b019
commit
8077a7534e
@ -1696,10 +1696,14 @@ fn (p mut Parser) match_expr() ast.MatchExpr {
|
||||
else if p.tok.kind == .name && (p.tok.lit[0].is_capital() || p.peek_tok.kind == .dot) {
|
||||
// if sym.kind == .sum_type {
|
||||
// p.warn('is sum')
|
||||
// TODO `exprs << ast.Type{...}`
|
||||
typ := p.parse_type()
|
||||
exprs << ast.Type{
|
||||
x := ast.Type{
|
||||
typ: typ
|
||||
}
|
||||
mut expr := ast.Expr{}
|
||||
expr = x
|
||||
exprs << expr
|
||||
p.scope.register_var(ast.Var{
|
||||
name: 'it'
|
||||
typ: table.type_to_ptr(typ)
|
||||
|
@ -232,7 +232,7 @@ pub fn (t mut Table) register_builtin_type_symbol(typ TypeSymbol) int {
|
||||
if existing_idx > 0 {
|
||||
if existing_idx >= string_type_idx {
|
||||
if existing_idx == string_type_idx {
|
||||
existing_type := &t.types[existing_idx]
|
||||
existing_type := t.types[existing_idx]
|
||||
t.types[existing_idx] = {
|
||||
typ |
|
||||
kind:existing_type.kind
|
||||
|
Loading…
Reference in New Issue
Block a user