class SomeClass {
public function new() {}
}
class MaybeBug12 {
public function bug() : Void {
var a = new SomeClass();
// Safety: Cannot cast nullable value to not nullable type.
// Probably this is not a bug in Safety, and this issue related to Std.instance() signature
var b : Null<SomeClass> = Std.instance(a, SomeClass);
}
}
See https://github.com/restorer/haxe-safety-bugs/blob/master/safetybugs/Main.hx#L163 for working example.