1/* 2 * Copyright (c) 2024 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 16package com.huawei.migrationtool.test.sts; 17 18class A { 19 a: int = 1; 20 b: int = 3; 21 public constructor() { 22 this.a = 2; 23 this.b = 4; 24 this.a = 10; 25 this.b = 20; 26 } 27 28 public constructor(p : int) { 29 this(); 30 this.a = 30; 31 this.b = 40; 32 } 33 34 public constructor(s : String) { 35 this.a = 2; 36 this.b = 4; 37 this.a = 50; 38 this.b = 60; 39 } 40 41} 42 43class B extends A { 44 c: int = 11; 45 d: int = 33; 46 public constructor() { 47 this.c += 22; 48 this.d -= 44; 49 this.c = 100; 50 this.d = 200; 51 } 52 53 public constructor(p : int) { 54 this(); 55 this.c = 300; 56 this.d = 400; 57 } 58 59 public constructor(s : String) { 60 super(0); 61 this.c += 22; 62 this.d -= 44; 63 this.c = 500; 64 this.d = 600; 65 } 66 67} 68