I'm copying this from the docs
// In null-safe Dart, none of these can ever be null.
var i = 42; // Inferred to be an int.
String name = getFileName();
final b = Foo();
But I'm running the code below in a null-safe dartpad, and it compiles.
void main() {
var x = null;
print(x);
}
Is this a documentation error or am I missing something?