Questions tagged [non-nullable]

232 questions
-1
votes
1 answer

The type 'GameObject' must be a non-nullable value type

I am trying to serialized some variables with INetworkSerializable in Unity 3D, so I am using a struct that contains the variables and the function to serialize them, here is my code: public struct MyStruct : INetworkSerializable{ public static…
-1
votes
3 answers

The non-nullable local variable 'result' must be assigned before it can be used

I cannot find the solution to this problem. I am creating a sign up screen connected to firebase but it is giving me this error, "The non-nullable local variable 'result' must be assigned before it can be used. Try giving it an initializer…
-1
votes
1 answer

In C is _Nonnull universal, or is it some kind of compiler extension/c99 feature?

const char *const _Nonnull GetString() { ... } Is that cross platform? Or is _Nonnull either a compiler extension or a c99 feature?
user12829349
-1
votes
1 answer

Assign non nullable value in boolean only if its non null

I have a object that has a boolean field called NameIndicator (External contract one). In my code, I made the my boolean "IsIndicated" as nullable. How do I check for null and assign value only if non null? I currently get compile time error with…
Jasmine
  • 5,186
  • 16
  • 62
  • 114
-1
votes
2 answers

why android studio required to Add non null Asserted(!!) call even after safety is added in Kotlin

it denote List of Object in the Image. here checking list is not empty. but showing an error to add (?) safety . but again show an error to add non null Asserted(!!) even add safety. error can fix only after add this. if (it?.isNotEmpty()!!) { …
Muhammed Haris
  • 340
  • 1
  • 5
  • 15
-1
votes
1 answer

How to assign non-null property to button?

I am declaring an action for UIButton in myviewcontroller.h file like this - (IBAction)loginClicked:(id)sender; but I can see warning like Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified). How can I…
Himanth
  • 2,381
  • 3
  • 28
  • 41
-4
votes
2 answers

what are the fundamental problems with having non-nullable reference types in C#?

At this moment there is no such thing as non-nullable types in C#. It is quite obvious that as any other feature it takes time and money to get it developed. No questions here. However I can see a lot of benefits in having it. One of the most…
Trident D'Gao
  • 18,973
  • 19
  • 95
  • 159
1 2 3
15
16