You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now KCL types have names taken from Rust. E.g. SketchOrSurface's type is defined in Rust, and its name is the name of the Rust type.
But we should allow KCL types to present different names to KCL users. For example, when KCL gives a type error it shouldn't say "Expected SketchOrSurface". Rather, the error should say "Expected either a Sketch or a Surface".
Possible implementation
Add a new method to trait FromKclValue, something like fn type_name() -> String. Then use that in error messages. It could have a default implementation which calls to tynm::type_name or something, and then for some types we could override it.
The text was updated successfully, but these errors were encountered:
Right now KCL types have names taken from Rust. E.g. SketchOrSurface's type is defined in Rust, and its name is the name of the Rust type.
But we should allow KCL types to present different names to KCL users. For example, when KCL gives a type error it shouldn't say "Expected SketchOrSurface". Rather, the error should say "Expected either a Sketch or a Surface".
Possible implementation
Add a new method to
trait FromKclValue
, something likefn type_name() -> String
. Then use that in error messages. It could have a default implementation which calls totynm::type_name
or something, and then for some types we could override it.The text was updated successfully, but these errors were encountered: