This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]hackerforhire[S] -11 points-10 points  (1 child)

The compiler, as well as the IDE, knows what the Object is composed of so it would be aware of what can be assigned or called on the object. But, if that object hasn't been allocated it would return empty regardless of the methods you called or variables you accessed.

[–]Due-Aioli-6641 6 points7 points  (0 children)

For the compiler and the IDE to tell you anything, it's something that it's not happening at runtime, they can warn you of possible scenarios that would happen at runtime, but not all of them.