From fdac3a1f2ec7327b367c5e0644d428ffaef9d9d8 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 10 Apr 2020 22:52:12 +0300 Subject: [PATCH] ftp.v: fix compilation --- vlib/net/ftp/ftp.v | 5 +++-- vlib/v/ast/str.v | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/vlib/net/ftp/ftp.v b/vlib/net/ftp/ftp.v index 3c4b34cc47..3706d15d3f 100644 --- a/vlib/net/ftp/ftp.v +++ b/vlib/net/ftp/ftp.v @@ -223,8 +223,9 @@ fn (ftp FTP) pasv() ?DTP { return error('pasive mode not allowed') } - dtp := new_dtp(data) - + dtp := new_dtp(data) or { + return error(err) + } return dtp } diff --git a/vlib/v/ast/str.v b/vlib/v/ast/str.v index d6317f0eb0..6a077ee760 100644 --- a/vlib/v/ast/str.v +++ b/vlib/v/ast/str.v @@ -133,6 +133,9 @@ pub fn (x Expr) str() string { SelectorExpr { return '${it.expr.str()}.${it.field}' } + TypeOf { + return 'typeof(${it.expr.str()})' + } CallExpr { sargs := args2str(it.args) if it.is_method {