فهرست منبع

changed description of @:nullSafety meta

Alexander Kuzmenko 6 سال پیش
والد
کامیت
4b336b267d
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      src/core/meta.ml
  2. 1 1
      tests/nullsafety/src/TestSafeFieldInUnsafeClass.hx

+ 1 - 1
src/core/meta.ml

@@ -319,7 +319,7 @@ let get_info = function
 	| NotNull -> ":notNull",("Declares an abstract type as not accepting null values",[UsedOn TAbstract])
 	| NoUsing -> ":noUsing",("Prevents a field from being used with 'using'",[UsedOn TClassField])
 	| Ns -> ":ns",("Internally used by the Swf generator to handle namespaces",[Platform Flash])
-	| NullSafety -> ":nullSafety",("Enables null safety for classes. Disables null safety for classes, fields or expressions if provided with `false` as an argument (e.g. `@:nullSafety(false)`)",[UsedOnEither [TClass;TClassField;TExpr]])
+	| NullSafety -> ":nullSafety",("Enables null safety for classes or fields. Disables null safety for classes, fields or expressions if provided with `false` as an argument (e.g. `@:nullSafety(false)`)",[UsedOnEither [TClass;TClassField;TExpr]])
 	| Objc -> ":objc",("Declares a class or interface that is used to interoperate with Objective-C code",[Platform Cpp;UsedOn TClass])
 	| ObjcProtocol -> ":objcProtocol",("Associates an interface with, or describes a function in, a native Objective-C protocol.",[Platform Cpp;UsedOnEither [TClass;TClassField] ])
 	| Op -> ":op",("Declares an abstract field as being an operator overload",[HasParam "The operation";UsedOn TAbstractField])

+ 1 - 1
tests/nullsafety/src/TestSafeFieldInUnsafeClass.hx

@@ -1,5 +1,5 @@
 @:build(Validator.checkFields())
-class TestUnsafeFieldInSafeClass {
+class TestSafeFieldInUnsafeClass {
 	@:nullSafety
 	static public function shouldFail(?a:String) {
 		Validator.shouldFail(var s:String = a);