| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/escompat/ |
| D | JsonParseTest.sts | 21 class Point { 37 return `Point(x=${this.x},y=${this.y})` 42 point: Nullish<Point> 45 this.point = undefined 48 constructor(point: Point) { 49 this.point = point 79 const POINT_TYPE = typeFor([] as Point[]) 82 const point = new Point(1, 2) 84 const parsedPoint: Point = JSON.parse<Point>(JSON.stringify(point), undefined, POINT_TYPE)! 86 Assertions.assertEquals(point.x, parsedPoint.x) [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/algorithms/ |
| D | SampleAppTest.sts | 22 class Point { 39 getOrigin(): Point; 50 start: Point | null; // bottom-left 51 end: Point | null; // top-right 57 constructor(start: Point, end: Point) { 62 override getOrigin(): Point { 63 return this.start ?? new Point(); 66 let s = this.start ?? new Point(); 67 let e = this.end ?? new Point(); 71 let s = this.start ?? new Point(); [all …]
|
| /arkcompiler/ets_frontend/ets2panda/linter/docs/rules/ |
| D | recipe74.md | 17 class Point { 22 function returnZeroPoint(): Point { 23 return new Point() 35 class Point { 40 function returnZeroPoint(): Point { 41 return new Point()
|
| D | recipe38.md | 55 class Point { 60 function id_x_y(o: Point): Point { 64 // Structural typing is used to deduce that p is Point: 68 // A literal can be contextually (i.e., implicitly) typed as Point: 118 class Point { 123 // to create a valid object. Since there is no other Point constructors, 127 function id_x_y(o: Point): Point { 132 let p: Point = {x: 5, y: 10} 135 // id_x_y expects Point explicitly 136 // New instance of Point is initialized with the literal
|
| D | recipe126.md | 17 export = Point 19 class Point { 21 static origin = new Point(0, 0) 37 export class Point { 39 static origin = new Point(0, 0)
|
| D | recipe59.md | 16 class Point { 21 let p = new Point() 34 class Point { 39 let p = new Point()
|
| D | recipe28.md | 15 type Point = {x: number, y: number} 16 type N = Point["x"] // is equal to number 25 class Point {x: number = 0; y: number = 0}
|
| D | recipe29.md | 27 class Point { 31 let p: Point = {x: 1, y: 2} 54 class Point { 58 let p: Point = {x: 1, y: 2}
|
| /arkcompiler/ets_frontend/ets2panda/test/parser/ets/import_tests/relative_import/ |
| D | Line.sts | 16 import { Point } from './Point' 19 start: Point; 20 end: Point; 22 constructor(start: Point, end: Point) {
|
| /arkcompiler/ets_frontend/ets2panda/linter/test/rules/ |
| D | rule74.sts | 16 class Point { 21 function returnZeroPoint(): Point { 22 return new Point() 29 function returnZeroPoint2(): Point { 30 return new Point()
|
| D | rule38.sts | 48 class Point { 52 function id_x_y(o: Point): Point { 56 // Structural typing is used to deduce that p is Point: 60 // A literal can be contextually (i.e., implicitly) typed as Point:
|
| D | rule126.sts | 17 export = Point 19 class Point { 21 static origin = new Point(0, 0)
|
| D | rule59.sts | 16 class Point { 21 let p = new Point() 29 let p2 = new Point()
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/proxies/ets_function_proxy/ |
| D | ets_function_proxy.sts | 19 class Point { 28 function point_create(x: double, y: double): Point { 29 return new Point(x, y) 32 function point_get_x(p: Point): double { 36 function point_get_y(p: Point): double {
|
| /arkcompiler/ets_frontend/ets2panda/test/ast/parser/ets/import_tests/ |
| D | import_name_conflict_6.sts | 16 import {Point} from /* @@ label */"import_tests/relative_import/Point"; 18 class Point {} 21 /* @@@ label Error SyntaxError: Class 'Point' is already defined. */
|
| D | import_name_conflict_9.sts | 16 import {Point} from /* @@ label */"import_tests/relative_import/Point"; 18 let Point: int = 1; 21 /* @@@ label Error SyntaxError: Class 'Point' is already defined with different type. */
|
| D | import_name_conflict_12.sts | 16 import {Point} from /* @@ label */"import_tests/relative_import/Point"; 18 function Point(): int { 23 /* @@@ label Error SyntaxError: Class 'Point' is already defined with different type. */
|
| /arkcompiler/runtime_core/static_core/verification/util/ |
| D | range.h | 115 Range BasedAt(Int point) const in BasedAt() argument 117 return Range {point, point + to_ - from_}; in BasedAt() 119 bool Contains(Int point) const in Contains() argument 121 return point >= from_ && point <= to_; in Contains() 123 Int PutInBounds(Int point) const in PutInBounds() argument 125 if (point < from_) { in PutInBounds() 128 if (point > to_) { in PutInBounds() 131 return point; in PutInBounds()
|
| /arkcompiler/runtime_core/libark_defect_scan_aux/tests/unittest/ |
| D | callee_info_test.js | 54 class Point { class 77 class ColorPoint extends Point { 98 let point = new Point(2, 3); 101 let x = point.getCoordinateX(); 102 point.setCoordinateX(x); 103 let point2 = point;
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/std/core/ |
| D | TypeClassTypeTest.sts | 27 class Point implements Serializable { 44 add(oth: Point): Point { 45 let res = new Point() 52 class Point3D extends Point { 153 let pt = Type.of(new Point()) as ClassType 159 return test(pt.getName() == "Point", "ClassName: Point") + 170 test(addMethod != null, " Point.add method") + 188 … test(pt.getBaseType().getName() == "Point", " base type is Point") + 202 test(addMethod != null, " Point.add method") + 234 let pt = Type.of(new Point()) as ClassType [all …]
|
| D | TypeFieldTest.sts | 29 class Point implements Serializable { 37 add(oth: Point): Point { 38 let res = new Point() 45 class Point3D extends Point { 59 test(xf.getOwnerType().equals(Type.of(new Point())), " OwnerType: Point") +
|
| /arkcompiler/runtime_core/static_core/plugins/ets/doc/cookbook/ |
| D | summary.rst | 112 class Point { 124 all Point objects have the property x: 126 let p1 = new Point(1.0, 1.0) 130 /* Class Point does not define any property 134 let p2 = new Point(2.0, 2.0) 138 /* It is guaranteed that all Point objects 143 let p3 = new Point(3.0, 3.0) 148 /* It is guaranteed that all Point objects 153 let p4 = new Point(4.0, 4.0) 157 // Usage of Point objects which is compliant with the class definition: [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/doc/tutorial/ |
| D | modules.rst | 39 export class Point { 47 export let Origin = new Point(0, 0) 48 export function Distance(p1: Point, p2: Point): number { 105 If a module contains a ``main`` function (program entry point), then 112 Program Entry Point 115 The top-level ``main`` function is an entry point of a program (application).
|
| /arkcompiler/ets_runtime/test/quickfix/ |
| D | BUILD.gn | 67 entry_point = "--entry-point=base" 72 entry_point = "--entry-point=base" 81 entry_point = "--entry-point=base" 88 entry_point = "--entry-point=base:coldpatch"
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/09.classes/01.class_declaration/ |
| D | point.sts | 17 desc: Point class from documentation 21 class Point { 32 static origin = new Point(0, 0);
|