When you’re coding in 4D or VS Code, clear and precise feedback from the editor makes all the difference. It helps you understand what’s happening in your code, fix issues faster, and keep your focus on building great features.
Starting with 4D v21 R2, we’ve improved the check syntax of the code editor to make error detection and type inference more accurate and consistent in both 4D and VS Code.
Same Type Inference Everywhere
Type inference is fully aligned between the check syntax of the compiler and the code editor. When an expression’s type is inferred, the result is always the same across all tools. This ensures that auto-completion, error detection in the code, and the compiler work consistently, providing a smoother and more predictable coding experience.
Only the Real Problem Gets Underlined
Errors and warnings are indicated with a small symbol in the left margin of the line containing the issue. For most of them, the editor also highlights the specific part of the expression causing the problem directly in your code. This visual cue makes it much easier to identify and correct issues quickly and accurately.

Multi-line Expressions? No Problem!
If you split a long expression across multiple lines using a backslash (\), the editor now places the error icon right on the line where the problem actually is. So even when your code spans several lines, errors are clearly indicated and easy to locate.

Hover for Instant Feedback
You can now hover over an underlined token to see the error message immediately.

Conclusion
These enhancements make the 4D and VS Code editors more reliable, consistent, and pleasant to use. With clearer feedback and smarter error detection, you can focus on writing great code with confidence.
