为什么在结构查看器窗格中有错误,但在编译时却没有? [英] Why are there errors in my structure viewer pane but not when I compile?

查看:77
本文介绍了为什么在结构查看器窗格中有错误,但在编译时却没有?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我构建了项目,没有错误:

I build my project, and there are no errors:

这是因为构建成功而没有任何错误:

That's because the build succeeded without any errors:

这是一件好事。该应用程序将运行,一切!

This is a good thing. The application runs and everything!

编译器没有告诉我的是有错误:

What the compiler doesn't tell me is that there are errors:

我只是发生要打开此文件。我只是发生而打开了 Structure 查看器。而我只是发生来看到错误。

I just happened to have this file open. And i just happened to have the Structure viewer open. And i just happened to see the errors.

Delphi是否可以报告在构建期间遇到的所有错误?

Is there a way for Delphi to report all error it encounters during a build?

对于一个简单的单形式测试应用程序来说,没什么大不了,只有一个错误。但是当我有200个表格时, XE6开始看起来像Visual Studio 2012一样糟糕。然后,我必须确保手动打开每个代码文件,并检查其中是否有任何错误。

It's no big deal for a simple one-form test application, with one error. But when i have 200 forms, XE6 starts to look as bad a Visual Studio 2012. I then have to be sure to manually open every code file and check if there are any errors in it.

是否可以通过XE6报告所有错误?

Is there a way to get XE6 to report all errors?

#xe6usability

推荐答案

编译器正确。您的代码不包含错误。您有两个具有相同名称的函数,但使用 overload 指令声明。

The compiler is correct. Your code does not contain an error. You have two functions with the same name, but declared with the overload directive.

IDE的代码见解,或Error Insight或任何称为功能的功能都将其错误报告为错误。这是一个古老的现象。 IDE使用与实际编译器不同的代码解析器。实际上,如果我没记错的话,它会使用多个这样的 fake 解析器。他们不如真正的人好,也很少会出错。这被认为是一个小麻烦,这可能是合理的。我宁愿真正的编译器也能做到正确,而不是相反。

The IDE's Code Insight, or Error Insight, or whatever the feature is called, is mis-reporting this as an error. This is an age old phenomenon. The IDE uses a different code parser from the real compiler. Indeed, if I recall correctly, it uses multiple such fake parsers. They are not as good as the real one, and not infrequently get things like this wrong. It's considered to be a minor inconvenience and that's probably reasonable. I'd much rather the real compiler got it right than the other way around.

这篇关于为什么在结构查看器窗格中有错误,但在编译时却没有?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆