From 78fc9bd12be9e6c7db4445ca404456283ec404f9 Mon Sep 17 00:00:00 2001 From: hazohelet <48541090+hazohelet@users.noreply.github.com> Date: Thu, 9 Apr 2020 01:55:50 +0900 Subject: [PATCH] fmt: short_module for enum values --- vlib/v/fmt/fmt.v | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vlib/v/fmt/fmt.v b/vlib/v/fmt/fmt.v index d2560abfc9..bb63699f84 100644 --- a/vlib/v/fmt/fmt.v +++ b/vlib/v/fmt/fmt.v @@ -473,7 +473,8 @@ fn (f mut Fmt) expr(node ast.Expr) { f.write('`$it.val`') } ast.EnumVal { - f.write(it.enum_name + '.' + it.val) + name := short_module(it.enum_name) + f.write(name + '.' + it.val) } ast.FloatLiteral { f.write(it.val)