1/* 2 * Copyright (c) 2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16export function foo<T eStends keyof A,P extends keyof B[T]> 17 18/* @@? 16:17 Error TypeError: Only abstract or native methods can't have body. */ 19/* @@? 16:23 Error SyntaxError: Unexpected token, expected '>'. */ 20/* @@? 16:31 Error SyntaxError: Unexpected token, expected '('. */ 21/* @@? 16:38 Error SyntaxError: Parameter declaration should have an explicit type annotation. */ 22/* @@? 16:41 Error SyntaxError: Parameter declaration should have an explicit type annotation. */ 23/* @@? 16:41 Error SyntaxError: Unexpected token, expected ',' or ')'. */ 24/* @@? 16:41 Error SyntaxError: Unexpected token 'extends'. */ 25/* @@? 16:49 Error SyntaxError: Unexpected token 'keyof'. */ 26/* @@? 16:49 Error TypeError: Unresolved reference keyof */ 27/* @@? 16:55 Error SyntaxError: Unexpected token 'B'. */ 28/* @@? 16:55 Error TypeError: Unresolved reference B */ 29/* @@? 16:55 Error TypeError: Indexed access is not supported for such expression type. */ 30/* @@? 16:57 Error SyntaxError: Unexpected token, expected ']'. */ 31/* @@? 31:69 Error SyntaxError: Unexpected token 'end of stream'. */