コンパイラで不正なコードが検出された場合に生成されるコンパイルエラーのリストを次に示します。これらのエラーの一部は、strict モードでコードをコンパイルする場合にのみ検出されます。strict モードには、標準の言語にはない次の 3 つの制約があります。
関連項目
| コード | メッセージ | 説明 | |
|---|---|---|---|
| 1000 | _ への参照があいまいです。 |
A reference might be to more than one item. For example, the following uses the namespaces rss and xml, each of which returns a
different value for the hello() function. The
trace (hello()) statement returns this error because it cannot determine which namespace to use.
Correct an ambiguous reference by making the reference specific. The following example uses the form namespace::function to specify which namespace to use:
|
|
| 1003 | 名前空間の属性にはアクセス指定子を使用できません。 | ||
| 1004 | 名前空間が見つからないか、コンパイル時定数ではありません。 | ||
| 1006 | super 式はクラスインスタンスのメソッド内でのみ使用できます。 | ||
| 1007 | super 式はクラスインスタンスのコンストラクタ内でのみ使用できます。 |
You cannot use the super statement within static members. You can
use the super statement only within class instances.
|
|
| 1008 | 属性が無効です。 | ||
| 1010 | override 属性はクラスプロパティの定義でのみ使用できます。 |
You cannot use the override keyword within a function block.
|
|
| 1011 | virtual 属性はクラスプロパティの定義でのみ使用できます。 |
You cannot use the virtual attribute when you declare a property that does not belong to a class
(for example, when you declare a variable within a function block).
|
|
| 1012 | static 属性はクラス内の定義でのみ使用できます。 | ||
| 1013 | private 属性はクラスプロパティの定義でのみ使用できます。 | ||
| 1014 | intrinsic 属性はサポートされていません。 | ActionScript 3.0 は intrinsic キーワードをサポートしていません。 | |
| 1016 | 基本クラスは final です。 |
The superclass cannot be extended because it is marked
as final.
|
|
| 1017 | 基本クラス _ の定義が見つかりませんでした。 | ||
| 1018 | クラス定義が重複しています :_。 | ||
| 1020 | override としてマークされたメソッドは、別のメソッドをオーバーライドする必要があります。 | ||
| 1021 | 関数の定義が重複しています。 | 同じスコープ内で同じ識別子名を持つ関数を複数宣言することはできません。 | |
| 1022 | final アクセサをオーバーライドすることはできません。 | ||
| 1023 | オーバーライドに対応していません。 | ||
| 1024 | オーバーライドに対応していない関数をオーバーライドしています。 |
If a method in a class overrides a method in a base class, you must explicitly declare it by using the override attribute, as this example shows:
public override function foo():void{};
|
|
| 1025 | 最後のメソッドを再定義することはできません。 |
The method cannot be extended because it is marked
as final in the base class.
|
|
| 1026 | コンストラクタ関数はインスタンスメソッドでなければなりません。 | ||
| 1027 | 関数を同時に static および override として設定することはできません。 | ||
| 1028 | 関数を同時に static および virtual として設定することはできません。 | ||
| 1029 | 関数を同時に final および virtual として設定することはできません。 | ||
| 1030 | 変数の引数配列の名前を指定する必要があります。 |
The ...(rest) parameter definition specifies that all values supplied after ...(rest)
are collected into any array.
You must specify a name for the array, as in the expression
function foo(x,...(rest)).
|
|
| 1033 | 仮想変数はサポートされていません。 | ||
| 1034 | 変数がネイティブであることはできません。 | ||
| 1035 | 変数を同時に final および virtual として設定することはできません。 | ||
| 1036 | static キーワードをクラス定義外で使用することはできません。 | ||
| 1037 | パッケージをネストすることはできません。 | ||
| 1038 | break ステートメントのターゲットが見つかりませんでした。 | ||
| 1039 | continue ステートメントのターゲットが見つかりませんでした。 | ||
| 1040 | ラベルの定義が重複しています。 | ||
| 1041 | 属性は呼び出し可能ではありません。 | ||
| 1042 | this キーワードは静的メソッドで使用できません。このキーワードはインスタンスのメソッド、関数閉包、グローバルコード内でのみ使用できます。 |
You cannot use the this keyword within a static member, because
this would have no context.
|
|
| 1043 | 名前空間が未定義です。 | ||
| 1044 | インターフェイスメソッド _ (名前空間 _) はクラス _ によって実装されません。 | ||
| 1045 | インターフェイス _ が見つかりませんでした。 | ||
| 1046 | 型が見つからないか、コンパイル時定数ではありません : _。 |
The class used as a type declaration cannot be found.
Check that you are importing the correct class, and that its package location
has not changed. Also, check that the package that contains the code (not the
imported class) is defined correctly. (for example, make sure to use proper
ActionScript 3.0 package syntax, and not ActionScript 2.0 syntax.)
The error can also occur if the class being referenced is not defined in a namespace that is in use or is not defined as public:
If you are using FlexBuilder 2.0 and the class is in a library, make sure to set the class path for the project. |
|
| 1047 | パラメータ初期化子が不明か、コンパイル時定数ではありません。 | ||
| 1048 | メソッドをコンストラクタとして使用することはできません。 | ||
| 1049 | 定数として指定した変数への代入が無効です。 | ||
| 1050 | 参照値以外の代入はできません。 | ||
| 1051 | 戻り値は未定義でなければなりません。 |
You are attempting to use the return statement within a method that
has the return type void.
|
|
| 1052 | 定数初期化子が不明か、コンパイル時定数ではありません。 | The value used to initialize the constant is either undefined or could have different values at run time. Check that the initializer is spelled correctly, and that the initializer value isn't an expression that could result in different possible values at run time. | |
| 1053 | アクセサの型が一致している必要があります。 | ||
| 1054 | setter 定義の戻り型は未指定または void でなければなりません。 |
You cannot specify a return value for a setter function. For example, the following is invalid:
public function set gamma(g:Number):Number; The following is valid: public function set gamma(g:Number):void; |
|
| 1058 | プロパティは書き込み専用です。 | ||
| 1059 | プロパティは読み取り専用です。 |
This property is defined through a getter function, which allows you to retrieve that property's value. There is no setter function defined
for this property, however, so it is read-only.
In the following example, line 3 generates an error because there is no setter function defined for class D { function get xx() { return 22; } }
var d:D = new D();
d.xx = 44; // error, property is read-only
|
|
| 1061 | 未定義である可能性のあるメソッド _ を、静的型 _ の参照を使用して呼び出しました。 | You are calling a method that is not defined. | |
| 1063 | ファイルを開けません :_。 | ||
| 1064 | メタデータが無効です。 | This metadata is unrecognized. | |
| 1065 | メタデータ属性が複数のエレメントを持つことはできません。 | ||
| 1067 | 型 _ の値が、関連しない型 _ に暗黙で型変換されています。 | You are attempting to cast an object to a type to which it cannot be converted. This can happen if the class you are casting to is not in the inheritance chain of the object being cast. This error appears only when the compiler is running in strict mode. | |
| 1068 | 付属ファイルを開けません : _。 | ||
| 1069 | シンタックスエラー : 定義またはディレクティブが必要です。 | 行のシンタックスを確認してください。 | |
| 1070 | 属性の後にブロックステートメントが必要です。 | 行のシンタックスを確認してください。 | |
| 1071 | シンタックスエラー : 属性 _ の後には、_ ではなく定義キーワード (関数など) が必要です。 |
This error might occur when the compiler encounters an unexpected character. For example,
the following use of the trace() function is invalid, because of the missing
parentheses (the correct syntax is trace("hello")):
|
|
| 1072 | シンタックスエラー : namespace の前に xml が必要です。 |
The correct statement syntax is default xml namespace = ns. Either the keyword xml (note the lowercase)
is missing or an incorrect keyword was used. For more
information, see the default xml namespace
directive.
|
|
| 1073 | シンタックスエラー : catch 節または finally 節が必要です。 | ||
| 1075 | シンタックスエラー : 'each' キーワードを 'in' 演算子なしで使用することはできません。 | ||
| 1076 | シンタックスエラー : 識別子の前に左括弧が必要です。 | ||
| 1077 | CaseLabel が必要です。 |
The compiler expected a case statement at this point in the switch block. The following switch block correctly includes a case statement:
switch(x)
{
print(2);
case 0: print(0);
break
}
|
|
| 1078 | ラベルは単純な識別子でなければなりません。 | ||
| 1079 | super 式には 1 つのオペランドが必要です。 | ||
| 1080 | インクリメント演算子またはデクリメント演算子が必要です。 | ||
| 1082 | 括弧内に 1 つの式が必要です。 | ||
| 1083 | シンタックスエラー : _ は不要です。 |
The line of code is missing some information. In the following example,
some expression (such as another number) needs to be included after the final plus sign:
var sum:int = 1 + 2 + ; |
|
| 1084 | シンタックスエラー : _ が _ の前に必要です。 |
If the error says "Expecting right brace before end of program," a block of code
is missing a closing brace (}).
If the error says "Expecting left parenthesis before _," you may have omitted a parenthesis from a conditional expression, as shown here in this example which is intentionally incorrect:
|
|
| 1086 | シンタックスエラー : _ の前にセミコロンが必要です。 | ||
| 1087 | シンタックスエラー : プログラムの末尾の後に余分な文字が見つかりました。 | ||
| 1093 | シンタックスエラー。 | ||
| 1094 | シンタックスエラー : ストリングリテラルは改行の前に終了する必要があります。 | ||
| 1095 | シンタックスエラー : ストリングリテラルは改行の前に終了する必要があります。 | ||
| 1096 | ストリングリテラル内ではバックスラッシュ文字を使用できません。 | ||
| 1097 | シンタックスエラー : ストリングリテラルを閉じる引用符に達する前に入力が終了しました。 | ||
| 1098 | 10 進数に 10 進数以外の識別子文字を含めることはできません。 | ||
| 1099 | シンタックスエラー。 | ||
| 1100 | シンタックスエラー : XML の開始タグと終了タグが一致していません。 | ||
| 1101 | ストリングリテラル内にバックスラッシュが見つかりました。 | ||
| 1102 | super の子孫を削除することはできません。 | ||
| 1103 | 名前空間の定義が重複しています。 | You defined the namespace more than once. Delete or modify the duplicate definition. | |
| 1104 | _ | ||
| 1105 | 代入のターゲットは参照値でなければなりません。 | You can assign a value to a variable, but you cannot assign a value to another value. | |
| 1106 | インクリメントのオペランドは参照でなければなりません。 | The operand must be a variable, an element in an array, or a property of an object. | |
| 1107 | インクリメントのオペランドが無効です。 | The operand must be a variable, an element in an array, or a property of an object. | |
| 1108 | デクリメントのオペランドが無効です。 | The operand must be a variable, an element in an array, or a property of an object. | |
| 1109 | 式が必要です。 |
An expression is missing in a part of the code. For example, the following produces this
error (there is a condition missing from the if statement:
|
|
| 1110 | XML タグ名が見つかりません。 | ||
| 1111 | ファイル _ は有効な ABC ファイルではありません。 | ||
| 1112 | このファイルインクルードにより、無限再帰の可能性があります : _。 |
A file that is included in the source being compiled contains other include statements that would cause an infinite loop. For example, the following files. a.as and b.as, generate this error because each file tries to include the other.
File a.as contains the following, which attempts to include the file b.as: import foo.bar.baz; include "b.as" print(2); File b.as contains the following, which attempts to include the file a.as: include "a.as" |
|
| 1113 | _ で循環型参照が検出されました。 |
A class is trying to extend a superclass. For example, class A cannot extend class B if B inherits from A:
|
|
| 1114 | public 属性はパッケージ内でのみ使用できます。 | ||
| 1115 | internal 属性はパッケージ内でのみ使用できます。 | ||
| 1116 | ユーザー定義の名前空間の属性は、クラス定義のトップレベルでのみ使用できます。 | ||
| 1118 | 静的型 _ の値が、関連しない可能性が高い型 _ に暗黙で型変換されています。 | You are using a value that is not of the expected type and no implicit coercion exists to convert it to the expected type.
You are using a supertype where a subtype is expected. For example, the following generates this error because it creates class A and then creates class B, which in turn extends class A:
The last statement generates an error because it attempts to assign an object of type B to a variable of type A. Similarly, the following defines the
Also, the following statement generates an error because the returned value for
|
|
| 1119 | 未定義である可能性が高いプロパティ _ に静的型 _ の参照を使用してアクセスしています。 |
You are attempting to access a property that does not exist for the specified object. For example,
the following code generates this error because an int object does not have a property named
assortment:
This error appears only when the compiler is running in strict mode.
|
|
| 1120 | 未定義のプロパティ _ へのアクセスです。 |
You are attempting to access an undefined variable. For example, if the variable
huh has not been defined, a call to it generates this error:
This error can only appear when the compiler is running in strict mode.
|
|
| 1121 | getter 定義にはパラメータを使用できません。 | ||
| 1122 | setter 定義には 1 つのパラメータが必要です。 | ||
| 1123 | setter 定義には任意指定のパラメータを使用できません。 | ||
| 1124 | getter 定義の戻り型は void 以外でなければなりません。 | A getter function simulates a variable. Because variables cannot be of type void, you cannot declare getter functions to return type void. | |
| 1125 | インターフェイスで定義されたメソッドにボディを含めることはできません。 | ||
| 1126 | 関数にボディを含めることはできません。 | ||
| 1127 | 属性 _ は複数回指定されています。 |
You specified an attribute more than once in the same statement. For example, the statement public static public var x; generates
this error because it specifies that the variable x is public twice. Delete duplicate declarations.
|
|
| 1129 | インターフェイス定義が重複しています : _。 | Change or delete the duplicate definitions. | |
| 1130 | コンストラクタは戻り型を指定できません。 | ||
| 1131 | クラスをネストすることはできません。 | ||
| 1132 | final 属性はクラス内で定義されたメソッドでのみ使用できます。 | ||
| 1133 | native 属性は関数定義でのみ使用できます。 | ||
| 1134 | dynamic 属性はクラス定義でのみ使用できます。 | ||
| 1135 | シンタックスエラー : _ は有効なタイプではありません。 | ||
| 1136 | 引数の数が正しくありません。正しくは _ です。 |
The function expects a different number of arguments than those you provided. For example, the following defines function goo, which has two arguments:
class A { static function goo(x:int,y:int)
{ return(x+y); } }
The following statement would generate an error because it provides three arguments: A.goo(1,2,3); |
|
| 1137 | 引数の数が正しくありません。_ 個以下であることが必要です。 | ||
| 1138 | 必須パラメータを任意パラメータの後に指定することはできません。 | ||
| 1139 | インターフェイスでは変数の宣言が許可されていません。 | ||
| 1140 | ...残りパラメータ定義のキーワードの後に指定したパラメータで使用できるのは、Array データ型のみです。 | ||
| 1141 | クラスが拡張できるのは別のクラスのみです。インターフェイスを拡張することはできません。 | ||
| 1142 | インターフェイスが拡張できるのは別のインターフェイスのみです。_ はクラスです。 | You are attempting to have the interface extend a class. An interface can only extend another interface. | |
| 1143 | override 属性はクラス内で定義されたメソッドでのみ使用できます。 | ||
| 1144 | インターフェイスメソッド _ (名前空間 _) は、対応していないシグネチャでクラス _ に実装されています。 | Method signatures must match exactly. | |
| 1145 | ネイティブなメソッドにボディを含めることはできません。 |
You cannot use native because it is a reserved keyword.
|
|
| 1146 | コンストラクタは getter メソッドまたは setter メソッド以外でなければなりません。 | ||
| 1147 | AS ソースファイルが指定されていません。 | ||
| 1149 | return ステートメントを static 初期化コードで使用することはできません。 | ||
| 1150 | protected 属性はクラスプロパティの定義でのみ使用できます。 | ||
| 1151 | 定義 _ (名前空間 _) にコンフリクトが存在します。 |
You cannot declare more than one variable with the same identifier name within the same scope unless all such variables are declared to be of
the same type. In ActionScript 3.0, different code blocks (such as those used in two for loops in the same function definition) are considered to be in the same scope.
The following code example correctly casts the variable
The following code example generates an error because the type casting in the variable declaration and the
|
|
| 1152 | 継承した定義 _ (名前空間 _) にコンフリクトが存在します。 | ||
| 1153 | コンストラクタは public としてのみ宣言できます。 | ||
| 1154 | 定義には、public、private、protected、または internal のいずれか 1 つのみを指定できます。 | ||
| 1155 | アクセサを他の関数内にネストすることはできません。 | ||
| 1156 | インターフェイスを新しい演算子でインスタンス化することはできません。 | ||
| 1157 | インターフェイスのメンバーを public、private、protected、または internal として宣言することはできません。 | ||
| 1158 | シンタックスエラー : 関数ボディの前に左括弧 ({) がありません。 | ||
| 1159 | return ステートメントを package 初期化コードで使用することはできません。 | ||
| 1160 | native 属性をインターフェイスの定義で使用することはできません。 |
You cannot use native because it is a reserved keyword.
|
|
| 1162 | 1 つの定義に使用できる名前空間の属性は 1 つのみです。 | ||
| 1163 | メソッド _ は、インターフェイス _ から継承した定義とコンフリクトしています。 | ||
| 1165 | インターフェイスの属性 _ が無効です。 | ||
| 1166 | インターフェイスでは名前空間の宣言が許可されていません。 | ||
| 1167 | クラス _ はインターフェイス _ を複数回実装しています。 |
The class implements the same interface more than once. For example, the following generates this error because
class C implements interface A twice:
The correct implementing statement should be |
|
| 1168 | 関数 _ への代入が不正です。 |
You are attempting to redefine a function. For example, the following defines the function topLevel()
to print the word "top". The second statement generates an error because it assigns a different return value to the function:
|
|
| 1169 | インターフェイスのメソッドでは名前空間の属性が許可されていません。 | ||
| 1170 | 関数は値を返しません。 |
Every possible control flow in a function must return a value whenever the return type is something other than void. The following function
f(x) does not generate an error because the if..else statement always returns a value:
However, the function
This checking is enabled only when the function declares a return type other than void. |
|
| 1171 | 名前空間の初期化子は、リテラルストリングまたは別の名前空間でなければなりません。 | ||
| 1172 | 定義 _ が見つかりません。 | ||
| 1173 | ラベルの定義が無効です。 | ||
| 1176 | 静的型 _ の値と、関連しない可能性が高い型 _ の値とを比較しています。 | ||
| 1177 | return ステートメントを global 初期化コードで使用することはできません。 | ||
| 1178 | アクセスできないプロパティ _ へのアクセスを、静的型 _ の参照を使用して試行しました。 | ||
| 1180 | 未定義である可能性が高いメソッド _ の呼び出しです。 | ||
| 1181 | 参照を基本クラス _ に送ります。 | ||
| 1182 | パッケージを値として使用することはできません : _。 | ||
| 1184 | 対応していない型 _ のデフォルト値です。_ が必要です。 | ||
| 1185 | switch には 1 つ以上のデフォルトがありますが、デフォルトは 1 つでなければなりません。 | ||
| 1186 | プロトタイプ変数の定義で許可される変数のバインディングは 1 つのみです。 | ||
| 1187 | プロトタイプの属性は、インスタンス変数の定義でのみ使用できます。 | ||
| 1188 | クラス _ への代入が無効です。 | ||
| 1189 | 固定プロパティ _ を削除しようとしています。削除できるのは、動的に定義されたプロパティだけです。 | ||
| 1190 | 基本クラスが見つからないか、コンパイル時定数ではありません。 | ||
| 1191 | インターフェイスが見つからないか、コンパイル時定数ではありません。 | ||
| 1192 | static 属性を名前空間の定義で使用することはできません。 | ||
| 1193 | インターフェイスの定義をクラスまたは他のインターフェイスの定義内にネストすることはできません。 | ||
| 1194 | プロトタイプの属性が無効です。 | ||
| 1195 | アクセスできないメソッド _ へのアクセスを、静的型 _ の参照を使用して試行しました。 | You are calling a private method from another class. | |
| 1196 | シンタックスエラー : throw の後には式が必要です。 | ||
| 1197 | クラス _ は _ を拡張できません。これらは両方ともライブラリのシンボルまたはメインタイムラインに関連付けられているからです。 | ||
| 1198 | 属性はパッケージ定義で許可されていません。 | ||
| 1199 | 内部エラー :_。 | ||
| 1200 | シンタックスエラー : 無効な for-in イニシャライザです。式は 1 つだけにしてください。 | ||
| 1201 | super ステートメントは、このステートメント、super ステートメント、return ステートメント、または throw ステートメントの後に続けることはできません。 | ||
| 1202 | パッケージ _ 内の未定義のプロパティ _ へのアクセスです。 | ||
| 1203 | 基本クラス _ にデフォルトコンストラクタがありません。 | You must explicitly call the constructor of the baseclass with a super() statement if it has 1 or more required arguments. | |
| 1204 | 対応する */ がない /* が見つかりました。 |