# Copyright (c) 2025 Huawei Device Co., Ltd.
# Licensed 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.
isolated_declgen:

- name: DECLARATION_EMIT_FOR_THIS_PARAMETER_REQUIRES_IMPLICITLY_ADD_UNDEFINED_TO_ITS_TYPE_NOT_ALLOWED_IN_ISOLATED_DECL
  id: 5
  message: Declaration emit for this parameter requires implicitly adding undefined to its type, which is not allowed in
    isolated declaration.

- name: DEFAULT_EXPORTS_CANNOT_BE_INFERRED_WITH_ISOLATED_DECL
  id: 6
  message: Cannot use array creation expression with type parameter.

- name: FUNCTION_MUST_HAVE_AN_EXPLICIT_RETURN_TYPE_ANNOTATION_WITH_ISOLATED_DECL
  id: 7
  message: Function must have an explicit return type annotation when using isolated declaration.

- name: METHOD_MUST_HAVE_AN_EXPLICIT_RETURN_TYPE_ANNOTATION_WITH_ISOLATED_DECL
  id: 8
  message: Method must have an explicit return type annotation when using isolated declaration.

- name: ONLY_CONST_ARRAYS_CAN_BE_INFERRED_WITH_ISOLATED_DECL
  id: 4
  message: Only const arrays can be inferred with isolated declaration.

- name: PARAMETER_MUST_HAVE_EXPLICIT_TYPE_ANNOTATION_WITH_ISOLATED_DECL
  id: 2
  message: Parameter must have an explicit type annotation when using isolated declaration.

- name: PROPERTY_MUST_HAVE_EXPLICIT_TYPE_ANNOTATION_WITH_ISOLATED_DECL
  id: 3
  message: Property must have an explicit type annotation when using isolated declaration.

- name: VARABLE_MUST_HAVE_EXPLICIT_TYPE_ANNOTATION_WITH_ISOLATED_DECL
  id: 1
  message: Variable must have an explicit type annotation when using isolated declaration.

graveyard: []
# See ets_frontend/ets2panda/util/diagnostic/README.md before contributing.