diff options
-rw-r--r-- | locale/en-us/script.lua | 2 | ||||
-rw-r--r-- | locale/zh-cn/script.lua | 12 | ||||
-rw-r--r-- | script/core/diagnostics/assign-type-mismatch.lua | 3 | ||||
-rw-r--r-- | script/core/diagnostics/cast-local-type.lua | 3 | ||||
-rw-r--r-- | script/core/diagnostics/cast-type-mismatch.lua | 3 | ||||
-rw-r--r-- | script/core/diagnostics/param-type-mismatch.lua | 3 | ||||
-rw-r--r-- | script/core/diagnostics/return-type-mismatch.lua | 3 |
7 files changed, 12 insertions, 17 deletions
diff --git a/locale/en-us/script.lua b/locale/en-us/script.lua index 51f1c4eb..9fceac00 100644 --- a/locale/en-us/script.lua +++ b/locale/en-us/script.lua @@ -139,7 +139,7 @@ DIAG_REDUNDANT_RETURN_VALUE_RANGE = DIAG_MISSING_RETURN = 'Return value is required here.' DIAG_RETURN_TYPE_MISMATCH = -'The type of the {index} return value is `{def}`, but the actual return is `{ref}`.\n{err}' +'The type of the {index} return value is `{def}`, but the actual return is `{ref}`.' DIAG_UNKNOWN_OPERATOR = 'Unknown operator `{}`.' DIAG_UNREACHABLE_CODE = diff --git a/locale/zh-cn/script.lua b/locale/zh-cn/script.lua index 9a7a76d8..5e451a51 100644 --- a/locale/zh-cn/script.lua +++ b/locale/zh-cn/script.lua @@ -117,17 +117,17 @@ DIAG_UNDEFINED_DOC_PARAM = DIAG_UNKNOWN_DIAG_CODE = '未知的诊断代号 `{}`。' DIAG_CAST_LOCAL_TYPE = -'已显式定义变量的类型为 `{def}` ,不能再将其类型转换为 `{ref}`。\n{err}' +'已显式定义变量的类型为 `{def}` ,不能再将其类型转换为 `{ref}`。' DIAG_CAST_FIELD_TYPE = -'已显式定义字段的类型为 `{def}` ,不能再将其类型转换为 `{ref}`。\n{err}' +'已显式定义字段的类型为 `{def}` ,不能再将其类型转换为 `{ref}`。' DIAG_ASSIGN_TYPE_MISMATCH = -'不能将 `{ref}` 赋值给 `{def}`。\n{err}' +'不能将 `{ref}` 赋值给 `{def}`。' DIAG_PARAM_TYPE_MISMATCH = -'不能将 `{ref}` 赋给参数 `{def}`。\n{err}' +'不能将 `{ref}` 赋给参数 `{def}`。' DIAG_UNKNOWN_CAST_VARIABLE = '未知的类型转换变量 `{}`。' DIAG_CAST_TYPE_MISMATCH = -'不能将 `{def}` 转换为 `{ref}`。\n{err}' +'不能将 `{def}` 转换为 `{ref}`。' DIAG_MISSING_RETURN_VALUE = '至少需要 {min} 个返回值,但此处只返回 {rmax} 个值。' DIAG_MISSING_RETURN_VALUE_RANGE = @@ -139,7 +139,7 @@ DIAG_REDUNDANT_RETURN_VALUE_RANGE = DIAG_MISSING_RETURN = '此处需要返回值。' DIAG_RETURN_TYPE_MISMATCH = -'第 {index} 个返回值的类型为 `{def}` ,但实际返回的是 `{ref}`。\n{err}' +'第 {index} 个返回值的类型为 `{def}` ,但实际返回的是 `{ref}`。' DIAG_UNKNOWN_OPERATOR = '未知的运算符 `{}`。' DIAG_UNREACHABLE_CODE = diff --git a/script/core/diagnostics/assign-type-mismatch.lua b/script/core/diagnostics/assign-type-mismatch.lua index 6f68a543..566f4a27 100644 --- a/script/core/diagnostics/assign-type-mismatch.lua +++ b/script/core/diagnostics/assign-type-mismatch.lua @@ -114,8 +114,7 @@ return function (uri, callback) message = lang.script('DIAG_ASSIGN_TYPE_MISMATCH', { def = vm.getInfer(varNode):view(uri), ref = vm.getInfer(valueNode):view(uri), - err = vm.viewTypeErrorMessage(uri, errs), - }), + }) .. '\n' .. vm.viewTypeErrorMessage(uri, errs), } end) end diff --git a/script/core/diagnostics/cast-local-type.lua b/script/core/diagnostics/cast-local-type.lua index cde4ac40..1b1c8432 100644 --- a/script/core/diagnostics/cast-local-type.lua +++ b/script/core/diagnostics/cast-local-type.lua @@ -42,8 +42,7 @@ return function (uri, callback) message = lang.script('DIAG_CAST_LOCAL_TYPE', { def = vm.getInfer(locNode):view(uri), ref = vm.getInfer(refNode):view(uri), - err = vm.viewTypeErrorMessage(uri, errs), - }), + }) .. '\n' .. vm.viewTypeErrorMessage(uri, errs), } end end diff --git a/script/core/diagnostics/cast-type-mismatch.lua b/script/core/diagnostics/cast-type-mismatch.lua index c4809338..c0483459 100644 --- a/script/core/diagnostics/cast-type-mismatch.lua +++ b/script/core/diagnostics/cast-type-mismatch.lua @@ -35,8 +35,7 @@ return function (uri, callback) message = lang.script('DIAG_CAST_TYPE_MISMATCH', { def = vm.getInfer(defNode):view(uri), ref = vm.getInfer(refNode):view(uri), - err = vm.viewTypeErrorMessage(uri, errs), - }) + }) .. '\n' .. vm.viewTypeErrorMessage(uri, errs), } end end diff --git a/script/core/diagnostics/param-type-mismatch.lua b/script/core/diagnostics/param-type-mismatch.lua index d3ff350d..1fe5fa94 100644 --- a/script/core/diagnostics/param-type-mismatch.lua +++ b/script/core/diagnostics/param-type-mismatch.lua @@ -110,8 +110,7 @@ return function (uri, callback) message = lang.script('DIAG_PARAM_TYPE_MISMATCH', { def = vm.getInfer(rawDefNode):view(uri), ref = vm.getInfer(refNode):view(uri), - err = vm.viewTypeErrorMessage(uri, errs), - }) + }) .. '\n' .. vm.viewTypeErrorMessage(uri, errs), } end ::CONTINUE:: diff --git a/script/core/diagnostics/return-type-mismatch.lua b/script/core/diagnostics/return-type-mismatch.lua index 092b44fc..9643fb00 100644 --- a/script/core/diagnostics/return-type-mismatch.lua +++ b/script/core/diagnostics/return-type-mismatch.lua @@ -69,9 +69,8 @@ return function (uri, callback) message = lang.script('DIAG_RETURN_TYPE_MISMATCH', { def = vm.getInfer(docRet):view(uri), ref = vm.getInfer(retNode):view(uri), - err = vm.viewTypeErrorMessage(uri, errs), index = i, - }), + }) .. '\n' .. vm.viewTypeErrorMessage(uri, errs), } end end |