Le 02/03/2012 11:56, Jacob Carlborg a écrit :

False.

-----------------------
import std.stdio;

class Foo
{
final void bar()
{
writeln("I'm null!");
}
}

void main()
{
Foo foo;
foo.bar();
}
-----------------------

% dmd test.d -O -release -inline
% ./test
I'm null!
%

-----------------------

You only get an error if there is a memory access involved (vtable,
member data etc.)


I never thought about that.


This is a common C++ interview question.

Reply via email to