From d462dbb5be3967e44bf6301b3d930e095bd67b9e Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 21 Dec 2019 12:11:16 +0000 Subject: Deprecate `using import` --- src/parser.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/parser.cpp') diff --git a/src/parser.cpp b/src/parser.cpp index fa321937e..fbbb9e1cb 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -3771,6 +3771,11 @@ Ast *parse_import_decl(AstFile *f, ImportDeclKind kind) { s = ast_import_decl(f, token, is_using, file_path, import_name, docs, f->line_comment); array_add(&f->imports, s); } + + if (is_using) { + syntax_warning(import_name, "'using import' is deprecated, please use the import name explicitly"); + } + expect_semicolon(f, s); return s; } -- cgit v1.2.3