Make it explicit in the function signature that we're just doing an
"Object == null" comparison. Otherwise the user might pass in an undefined, and expect a strict equality test. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4886 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -43,7 +43,7 @@ public class Assert
|
|||||||
public static var dumpStack :Boolean = true;
|
public static var dumpStack :Boolean = true;
|
||||||
|
|
||||||
/** Asserts that the value is equal to null. */
|
/** Asserts that the value is equal to null. */
|
||||||
public static function isNull (value :*, message :String = null) :void
|
public static function isNull (value :Object, message :String = null) :void
|
||||||
{
|
{
|
||||||
if (_debug && ! (value == null)) {
|
if (_debug && ! (value == null)) {
|
||||||
fail(message);
|
fail(message);
|
||||||
@@ -51,7 +51,7 @@ public class Assert
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Asserts that the value is not equal to null. */
|
/** Asserts that the value is not equal to null. */
|
||||||
public static function isNotNull (value :*, message :String = null) :void
|
public static function isNotNull (value :Object, message :String = null) :void
|
||||||
{
|
{
|
||||||
if (_debug && ! (value != null)) {
|
if (_debug && ! (value != null)) {
|
||||||
fail(message);
|
fail(message);
|
||||||
|
|||||||
Reference in New Issue
Block a user