Skip to content

Assert is not compatible with null safety #103

@Gama11

Description

@Gama11

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions