From f40bcc219faed41864cf68f9bf9fac2c588f6699 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Sat, 22 Aug 2020 17:29:35 +0200 Subject: [PATCH] better errormsg --- compiler/src/prog8/ast/processing/TypecastsAdder.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/src/prog8/ast/processing/TypecastsAdder.kt b/compiler/src/prog8/ast/processing/TypecastsAdder.kt index e19a2be93..de3745f06 100644 --- a/compiler/src/prog8/ast/processing/TypecastsAdder.kt +++ b/compiler/src/prog8/ast/processing/TypecastsAdder.kt @@ -153,7 +153,7 @@ class TypecastsAdder(val program: Program, val errors: ErrorReporter) : AstWalke override fun after(typecast: TypecastExpression, parent: Node): Iterable { // warn about any implicit type casts to Float, because that may not be intended if(typecast.implicit && typecast.type in setOf(DataType.FLOAT, DataType.ARRAY_F)) { - errors.warn("byte or word value implicitly converted to float. Suggestion: use explicit cast as float, a float number, or revert to integer arithmetic", typecast.position) + errors.warn("integer implicitly converted to float. Suggestion: use float literals, add an explicit cast, or revert to integer arithmetic", typecast.position) } return noModifications }