Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assert is not compatible with null safety #103

Open
Gama11 opened this issue Jun 27, 2020 · 0 comments
Open

Assert is not compatible with null safety #103

Gama11 opened this issue Jun 27, 2020 · 0 comments

Comments

@Gama11
Copy link
Contributor

Gama11 commented Jun 27, 2020

Looks like various Assert methods need to be wrapped in Null<T>:

import utest.Assert;

@:nullSafety
function main() {
	Assert.equals(null, null);
}
source/Main.hx:5: characters 16-20 : Null safety: Cannot pass nullable value to not-nullable argument "expected" of function "equals".
source/Main.hx:5: characters 22-26 : Null safety: Cannot pass nullable value to not-nullable argument "value" of function "equals".

Assert.isNull(null); not working is particularly funny... :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant