Forum > General

Prevent calling abstract methods

(1/2) > >>

Grahame Grieve:
The compiler emits a warning when it detects an object being constructed that has abstract methods. I'd like to be able to make that an error, like I can in Delphi, but I can't see a way to escalate some warnings and treat them as errors (only turn them off). Or have I missed something?

compile with -Sew which means treat warnings as errors The compiler itself is compiled with that option.
It seems that is the option you are looking for.
--- Code: Bash  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---      -Se<x>     Error options. <x> is a combination of the following:         <n> : Compiler halts after the <n> errors (default is 1)         h : Compiler also halts after hints         n : Compiler also halts after notes         w : Compiler also halts after warnings

Grahame Grieve:
But I have hundreds of other warnings, some that I don't know how to fix because I think they're wrong, and many are in the LCL itself. soo that's not an option for me.

Ha, We don't need any stinking warnings@!   

If memory servers. {%H-} or something like that, I can't remember now..

 but it's an insert you can put on the Declaration where the nefarious warnings are ignored.

That only makes the Lazarus IDE not show the warning in the messages window.
The compiler does nothing with that.



[0] Message Index

[#] Next page

Go to full version