All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.royale.compiler.constants.IASWarningConstants Maven / Gradle / Ivy

The newest version!
/*
 *
 *  Licensed to the Apache Software Foundation (ASF) under one or more
 *  contributor license agreements.  See the NOTICE file distributed with
 *  this work for additional information regarding copyright ownership.
 *  The ASF licenses this file to You under the Apache License, Version 2.0
 *  (the "License"); you may not use this file except in compliance with
 *  the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */

package org.apache.royale.compiler.constants;

/**
 * Constants for ActionScript warnings. The constants are using to 
 * enable and disable the various warnings in the ActionScript
 * compiler.
 */
public interface IASWarningConstants
{
    /**
     * Array.toString() format has changed.
     */
    static final int ARRAY_TO_STRING_CHANGES = 1044;

    /**
     * Assignment within conditional.
     */
    static final int ASSIGNMENT_WITHIN_CONDITIONAL = 1100;

    /**
     * Possibly invalid Array cast operation.
     */
    static final int BAD_ARRAY_CAST = 1112;

    /**
     * Non-Boolean value used where a Boolean value was expected.
     */
    static final int BAD_BOOLEAN_ASSIGNMENT = 3590;

    /**
     * Invalid Date cast operation.
     */
    static final int BAD_DATE_CAST = 3575;

    /**
     * Unknown method.
     */
    static final int BAD_ES3_TYPE_METHOD = 3594;

    /**
     * Unknown property.
     */
    static final int BAD_ES3_TYPE_PROP = 3592;

    /**
     * Illogical comparison with NaN. Any comparison operation involving NaN will evaluate to false because NaN != NaN.
     */
    static final int BAD_NAN_COMPARISON = 1098;

    /**
     * Impossible assignment to null.
     */
    static final int BAD_NULL_ASSIGNMENT = 1102;

    /**
     * Illogical comparison with null.
     */
    static final int BAD_NULL_COMPARISON = 1096;

    /**
     * Illogical comparison with undefined.  Only untyped variables (or variables of type *) can be undefined.
     */
    static final int BAD_UNDEFINED_COMPARISON = 1012;

    /**
     * Boolean() with no arguments returns false in ActionScript 3.0.
     * Boolean() returned undefined in ActionScript 2.0.
     */
    static final int BOOLEAN_CONSTRUCTOR_WITH_NO_ARGS = 1034;

    /**
     * __resolve is deprecated.
     */
    static final int CHANGES_IN_RESOLVE = 1066;

    /**
     * Class is sealed. It cannot have members added to it dynamically.
     */
    static final int CLASS_IS_SEALED = 1072;

    /**
     * Constant not initialized.
     */
    static final int CONST_NOT_INITIALIZED = 1110;

    /**
     * Function used in new expression returns a value.  Result will be what the function returns, rather than a new instance of that function.
     */
    static final int CONSTRUCTOR_RETURNS_VALUE = 1030;

    /**
     * EventHandler was not added as a listener.
     */
    static final int DEPRECATED_EVENT_HANDLER_ERROR = 1090;

    /**
     * Unsupported ActionScript 2.0 function.
     */
    static final int DEPRECATED_FUNCTION_ERROR = 1060;

    /**
     * Unsupported ActionScript 2.0 property.
     */
    static final int DEPRECATED_PROPERTY_ERROR = 1058;

    /**
     * More than one argument by the same name.
     */
    static final int DUPLICATE_ARGUMENT_NAMES = 3583;

    /**
     * Duplicate variable definition
     */
    static final int DUPLICATE_VARIABLE_DEF = 3596;

    /**
     * ActionScript 3.0 iterates over an object's properties within a "for x in target" statement in random order.
     */
    static final int FOR_VAR_IN_CHANGES = 1086;

    /**
     * Importing a package by the same name as the current class will hide that class identifier in this scope.
     */
    static final int IMPORT_HIDES_CLASS = 3581;

    /**
     * Use of the instanceof operator.
     */
    static final int INSTANCEOF_CHANGES = 3555;

    /**
     * Internal error in compiler.
     */
    static final int INTERNAL_ERROR = 1088;

    /**
     * _level is no longer supported. For more information, see the flash.display package.
     */
    static final int LEVEL_NOT_SUPPORTED = 1070;

    /**
     * Missing namespace declaration (e.g. variable is not defined to be public, private, etc.).
     */
    static final int MISSING_NAMESPACE_DECL = 1084;

    /**
     * Negative value will become a large positive value when assigned to a uint data type.
     */
    static final int NEGATIVE_UINT_LITERAL = 1092;

    /**
     * Missing constructor.
     */
    static final int NO_CONSTRUCTOR = 1104;

    /**
     * The super() statement was not called within the constructor.
     */
    static final int NO_EXPLICIT_SUPER_CALL_IN_CONSTRUCTOR = 1114;

    /**
     * Missing type declaration.
     */
    static final int NO_TYPE_DECL = 1008;

    /**
     * In ActionScript 3.0, white space is ignored and '' returns 0.
     * Number() returns NaN in ActionScript 2.0 when the parameter is '' or contains white space.
     */
    static final int NUMBER_FROM_STRING_CHANGES = 1038;

    /**
     * Change in scoping for the this keyword.
     * Class methods extracted from an instance of a class will always resolve this back to that instance.
     * In ActionScript 2.0, this is looked up dynamically based on where the method is invoked from.
     */
    static final int SCOPING_CHANGE_IN_THIS = 1082;

    /**
     * Inefficient use of += on a TextField.
     */
    static final int SLOW_TEXTFIELD_ADDITION = 3551;

    /**
     * Possible missing parentheses.
     */
    static final int UNLIKELY_FUNCTION_VALUE = 3553;

    /**
     * Possible usage of the ActionScript 2.0 XML class.
     */
    static final int XML_CLASS_HAS_CHANGED = 3573;

    /**
     * Keyword this within closure.
     */
    static final int THIS_WITHIN_CLOSURE = 20000;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy