This is an automated email from the ASF dual-hosted git repository. joshtynjala pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/royale-docs.git
commit 4dd7b2e627c9b78cf33fa20de09d6b320159d1e9 Author: Josh Tynjala <[email protected]> AuthorDate: Thu Aug 21 15:19:57 2025 -0700 required Royale version --- features/as3/abstract-classes.md | 4 +++- features/as3/import-aliases.md | 2 ++ features/as3/null-conditional-operator.md | 4 +++- features/as3/nullish-coalescing-operator.md | 4 +++- features/as3/private-constructors.md | 2 ++ features/as3/type-inference.md | 2 ++ features/as3/verbatim-strings.md | 4 +++- 7 files changed, 18 insertions(+), 4 deletions(-) diff --git a/features/as3/abstract-classes.md b/features/as3/abstract-classes.md index 944be25..4c43d2d 100644 --- a/features/as3/abstract-classes.md +++ b/features/as3/abstract-classes.md @@ -26,6 +26,8 @@ permalink: /features/as3/abstract-classes [Apache Royale](https://royale.apache.org/){:target='_blank'} adds support for declaring `abstract` classes in [ActionScript](features/as3). An abstract class cannot be instantiated using the `new` keyword, meaning that it must be subclassed. Additionally, an abstract class may declare `abstract` methods that do not have a function body. Abstract methods must be implemented by the concrete subclass, similar to how the methods of an interface must also be implemented. +_Requires Apache Royale 0.9.6 or newer._ + ## Compiler option Royale enables abstract classes by default. To disable abstract classes in your application, use the `-allow-abstract-classes` compiler option. @@ -117,4 +119,4 @@ Checking whether a class is abstract happens at compile-time only. However, by u If a SWC library contains abstract classes, applications using that library must also enable abstract classes before the compiler will enforce any restrictions. -Other ActionScript compilers, such as the one in the [Apache Flex SDK](https://flex.apache.org/){:target='_blank'}, may not recognize or enforce abstract classes. Attemping to pass source code or SWC libraries that contain classes with abstract classes to another compiler may result in compile-time errors or unexpected behavior at run-time. In other words, to write 100% portable ActionScript code that works with any compiler, avoid using abstract classes and any of Royale's other [extens [...] +Other ActionScript compilers, such as the one in the [Apache Flex SDK](https://flex.apache.org/){:target='_blank'}, may not recognize or enforce abstract classes. Attemping to pass source code or SWC libraries that contain abstract classes to another compiler may result in compile-time errors or unexpected behavior at run-time. In other words, to write 100% portable ActionScript code that works with any compiler, avoid using abstract classes and any of Royale's other [extensions to the A [...] diff --git a/features/as3/import-aliases.md b/features/as3/import-aliases.md index f915f17..9bc63a1 100644 --- a/features/as3/import-aliases.md +++ b/features/as3/import-aliases.md @@ -26,6 +26,8 @@ permalink: /features/as3/import-aliases [Apache Royale](https://royale.apache.org/){:target='_blank'} adds support for declaring _import aliaes_ in [ActionScript](features/as3). An import alias allows a class to be imported, but referenced in later code using a different base name. It is intended to help differentiate between multiple imported classes that have the same base name, but are in different packages, without having to use the fully-qualified name. +_Requires Apache Royale 0.9.6 or newer._ + ## Compiler option Royale enables import aliases by default. To disable import aliases in your application, use the `-allow-import-aliases` compiler option. diff --git a/features/as3/null-conditional-operator.md b/features/as3/null-conditional-operator.md index f661a8e..b6bc601 100644 --- a/features/as3/null-conditional-operator.md +++ b/features/as3/null-conditional-operator.md @@ -22,9 +22,11 @@ permalink: /features/as3/null-conditional-operator # Null conditional operator in ActionScript +The ?. operator + [Apache Royale](https://royale.apache.org/){:target='\_blank'} adds support for the _null conditional operator_ in [ActionScript](features/as3), which uses the symbol `?.`. The expression `a?.b` works similarly to a member access expression, like `a.b`. The difference when using `?.` is that, if the left operand is _nullish_, it will immediately return `null` instead of trying to access the right operand and throwing an exception. -The null conditional operator is also supported by the compiler included with the Adobe AIR SDK starting with version 50.0. +_Requires Apache Royale 0.9.10 or newer._ ## Code example diff --git a/features/as3/nullish-coalescing-operator.md b/features/as3/nullish-coalescing-operator.md index 8f0fc0c..2cf0b94 100644 --- a/features/as3/nullish-coalescing-operator.md +++ b/features/as3/nullish-coalescing-operator.md @@ -22,11 +22,13 @@ permalink: /features/as3/nullish-coalescing-operator # Nullish coalescing operator in ActionScript +The ?? operator + [Apache Royale](https://royale.apache.org/){:target='\_blank'} adds support for the _nullish coalescing operator_ in [ActionScript](features/as3), which uses the symbol `??`. The `??` operator accepts two operands, one each on its left and right sides. Which operand is returned depends on whether the left operand is _nullish_ or not. Nullish values include `null` and `undefined` only. If the left operand is not nullish, then it is returned immediately, without executing the right operand. If the left operand is nullish, then the right operand is returned instead. -The nullish coalescing operator is also supported by the compiler included with the Adobe AIR SDK starting with version 50.0. +_Requires Apache Royale 0.9.10 or newer._ ## Code example diff --git a/features/as3/private-constructors.md b/features/as3/private-constructors.md index 6c17865..0bb1a86 100644 --- a/features/as3/private-constructors.md +++ b/features/as3/private-constructors.md @@ -26,6 +26,8 @@ permalink: /features/as3/private-constructors [Apache Royale](https://royale.apache.org/){:target='_blank'} adds support for declaring the constructor of a class `private` instead of `public` in [ActionScript](features/as3). When a constructor is private, it cannot be instantiated with the `new` keyword outside of the class where it is defined. Private constructors are commonly used for implementing the *singleton* design pattern, which is when only one instance of a particular class should ever be created. +_Requires Apache Royale 0.9.6 or newer._ + ## Compiler option Royale enables private constructors by default. To disable private constructors in your application, use the `-allow-private-constructors` compiler option. diff --git a/features/as3/type-inference.md b/features/as3/type-inference.md index c8bd720..a44c5c3 100644 --- a/features/as3/type-inference.md +++ b/features/as3/type-inference.md @@ -28,6 +28,8 @@ Using the `-infer-types` compiler option Traditionally, ActionScript has treated the type of a symbol with no explicitly declared type as the _any_ type `*`, and the compiler would emit a warning for the missing type declaration. When type inference is enabled, the compiler will skip the warning if a type other than `*` can be inferred from the initializer or return statements. If the intended type should actually be `*`, an explicit type declaration is encouraged. +_Requires Apache Royale 0.9.12 or newer._ + ## Compiler option Royale does not enable type inference by default, to avoid potential backwards compatibility issues with existing AS3 code. To enable type inference in your application, use the `-infer-types` compiler option. diff --git a/features/as3/verbatim-strings.md b/features/as3/verbatim-strings.md index 3e3738e..c6af604 100644 --- a/features/as3/verbatim-strings.md +++ b/features/as3/verbatim-strings.md @@ -22,9 +22,11 @@ permalink: /features/as3/verbatim-strings # Verbatim strings in ActionScript +Ignore escape sequences with @"" strings + [Apache Royale](https://royale.apache.org/){:target='_blank'} adds support for declaring _verbatim strings_ in [ActionScript](features/as3). Verbatim strings start with a `@` character and don't treat the `\` character as the start of an escape sequence. -Verbatim strings are also supported by the compiler included with the Adobe AIR SDK starting with version 50.0. +_Requires Apache Royale 0.9.10 or newer._ ## Code example
