Home
last modified time | relevance | path

Searched full:null (Results 1 – 25 of 3749) sorted by relevance

12345678910>>...150

/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/07.expressions/13.chaining_operator/
Dchop0.sts18 If the object to the left of ('?.') is undefined or null, then the evaluation of the entire
28 fldA: string|null = "abc"
29 fldAn: string|null = null
30 metA(p: string): string|null {
31 return p == "null" ? null : p
36 fldB: A|null = new A()
37 fldBn: A|null = null
38 metB(p: string): A|null {
39 return p == "null" ? null : new A()
43 function boo(p: string): B|null {
[all …]
/arkcompiler/ets_frontend/ets2panda/test/runtime/ets/
DnullableType.sts19 type tmp = (A | null) | null | null;
20 type tmp2 = A | null;
22 type NullableA_alias = (A_alias | null) | null;
31 let a : Object | null = null;
32 let b : Object | null = new Object();
33 let c : Object | null | null = b;
34 let d : (((Object) | null) | null) | null = numericNullableType();
35 let f : A | null = null;
36 let g : tmp | null = f;
37 let g2 : tmp2 = null;
[all …]
DSmartCast_04.sts16 function fooAnd(x: String|null, y: String|null): string {
17 if (x != null && y != null) {
19 } else if (x == null && y == null) {
20 return "null";
21 } else if (x != null && y == null) {
23 } else if (x == null && y != null) {
30 function fooOr1(x: String|null, y: String|null): string {
31 if (x != null || y != null) {
33 } else if (x == null && y == null) {
34 return "null";
[all …]
DUnionAsAndInstanceof.sts38 function foo(x: Object | null | undefined) { return x as Object }
43 assert_ccexc(() => { let f = ((x: Object | null | undefined) => x as Object); f(null); });
44 assert_ccexc(() => { let f = ((x: Object | null | undefined) => x as Object); f(undefined); });
45 assert_ccexc(() => { let f = ((x: Object | null) => x as Object); f(null); });
48 …assert_ccexc(() => { let f = ((x: Object | null | undefined) => x as Object | undefined); f(null);…
49 …assert_ccexc(() => { let f = ((x: Object | null | undefined) => x as Object | null); f(undefined);…
50 assert_ccexc(() => { let f = ((x: Object | null) => x as Object | undefined); f(null); });
51 assert_ccexc(() => { let f = ((x: Object | undefined) => x as Object | null); f(undefined); });
53 assert_ccexc(() => { let f = ((x: A | null | undefined) => x as A); f(null); });
54 assert_ccexc(() => { let f = ((x: A | null | undefined) => x as A); f(undefined); });
[all …]
DSmartCast_05.sts23 function foo1(x: C|null|undefined): string {
24 if (x == null || !x.a) {
25 return x != null ? "false1" : "null";
31 function foo2(x: C|null|undefined): string {
32 if (x != null && x.a) {
35 return x != null ? "false" : "null";
39 function bar(x: C|null|undefined, y: boolean, z: boolean): string {
43 return (x != null ? (x.a ? "true2" : "false2") : "null") + y + z;
48 assert(foo1(null) == "null");
49 assert(foo2(null) == "null");
[all …]
DprimitiveEqualityWithNull.sts17 assert(!((1 as byte) == null))
18 assert(!(null == (1 as short)))
19 assert(!(1 == null))
20 assert(!(null == (1 as long)))
21 assert(!(1.2f == null))
22 assert(!(null == 1.2))
23 assert(!(c'a'== null))
24 assert(!(null == true))
25 assert(!(false == null))
26 assert(null == null)
[all …]
/arkcompiler/ets_frontend/ets2panda/test/parser/ets/
Dawait_keyword.sts16 async function asyncFoo(): Promise<Object | null> {
17 …let promise: Promise<Object | null> | null = (): Promise<Object | null> | null => { return null; }…
18 let obj: Object | null = await promise!;
22 let asyncLambda: () => Promise<Object | null> = async (): Promise<Object | null> => {
23 …let promise: Promise<Object | null> | null = (): Promise<Object | null> | null => { return null; }…
24 let obj: Object | null = await promise!;
29 …let promise: Promise<Object | null> | null = (): Promise<Object | null> | null => { return null; }…
30 let obj: Object | null = await promise!;
34 …let promise: Promise<Object | null> | null = (): Promise<Object | null> | null => { return null; }…
35 let obj: Object | null = await promise!;
[all …]
Dnull.sts18 let b : cls | null = null;
21 function foo(arg: cls | null) : void {
28 let e : cls | null = null;
34 foo(null);
37 assert (b == null && c != null)
38 assert (null != c)
39 assert (e == null && f != null)
41 assert (null == null)
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/03.types/08.reference_types/13.nullish_types/
Dreference_nullable_types.params.yaml16 # null
17 - {type: "Byte|null", value: "5"}
18 - {type: "Byte|null", value: "null"}
19 - {type: "Short|null", value: "5"}
20 - {type: "Short|null", value: "null"}
21 - {type: "Int|null", value: "5"}
22 - {type: "Int|null", value: "null"}
23 - {type: "Long|null", value: "5 as long"}
24 - {type: "Long|null", value: "null"}
25 - {type: "Float|null", value: "5.0"}
[all …]
/arkcompiler/ets_runtime/test/jittest/wide_call_range_pref_imm16v8/
Dwide_call_range_pref_imm16v8.ts21 …at_video_info, wx_plugin_middle_page, xj_wechat_canvas_info, serializationConstructorMarker, null);
34 var tmp9_local0 = null;
35 var tmp10_local1 = null;
37 var tmp12_local3 = null;
38 var tmp13_local4 = null;
39 var tmp14_local5 = null;
42 var tmp17_local8 = null;
44 var tmp19_local10 = null;
46 var tmp21_local12 = null;
47 var tmp22_local13 = null;
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/01.assignment-like_contexts/
Dnull_call.params.yaml17 - Boolean|null
18 - Byte|null
19 - Char|null
20 - Double|null
21 - Float|null
22 - Int|null
23 - Long|null
24 - Object|null
25 - Short|null
26 - StringBuilder|null
[all …]
/arkcompiler/ets_frontend/ets2panda/linter/test/main/
Dfunctions.sts93 foo(f(null));
94 foo(null);
97 f(null);
101 f(null);
102 }, null, f(null));
106 f(null);
107 }, null, f(null));
108 }, null, foo(f(null)));
116 f(null)
117 foo(null) {
[all …]
Dnull_check_calls.sts21 function g1(): C1 | null {
25 return null
30 bar(null);
31 bar(null, null);
32 applyToUnknown(null);
33 fooExecute(null);
37 fff(null);
38 ff(null);
39 f(null);
42 ((a: number) => a)(null);
[all …]
Dfunctions.ts.json123 "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.",
124 "rule": "Argument of type 'null' is not assignable to parameter of type 'string'.",
133 "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.",
134 "rule": "Argument of type 'null' is not assignable to parameter of type 'string'.",
143 "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.",
144 "rule": "Argument of type 'null' is not assignable to parameter of type 'string'.",
153 "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.",
154 "rule": "Argument of type 'null' is not assignable to parameter of type 'string'.",
163 "suggest": "Argument of type 'null' is not assignable to parameter of type 'string'.",
164 "rule": "Argument of type 'null' is not assignable to parameter of type 'string'.",
[all …]
Dnull_check_calls.ts.json33 "suggest": "Argument of type 'null' is not assignable to parameter of type 'number[]'.",
34 "rule": "Argument of type 'null' is not assignable to parameter of type 'number[]'.",
43 "suggest": "Argument of type 'null' is not assignable to parameter of type 'number'.",
44 "rule": "Argument of type 'null' is not assignable to parameter of type 'number'.",
53 …"suggest": "Argument of type 'number | null' is not assignable to parameter of type 'number'.\n T…
54 …"rule": "Argument of type 'number | null' is not assignable to parameter of type 'number'.\n Type…
63 …"suggest": "Argument of type 'number | null' is not assignable to parameter of type 'number'.\n T…
64 …"rule": "Argument of type 'number | null' is not assignable to parameter of type 'number'.\n Type…
73 "suggest": "Type 'null' is not assignable to type 'Object'.",
74 "rule": "Type 'null' is not assignable to type 'Object'.",
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/05.generics/02.generic_instantiations/01.type_arguments/type_arguments_of_parameterized_declarations/
Dconstr_args1.params.yaml21 let v: A = new <X|null> A(new X())
24 let v: A = new <X|null> A(null)
31 let v: A = new <X|null> A(new X())
32 bound: ' extends X|null'
35 let v: A = new <X|null> A(null)
36 bound: ' extends Object|null'
43 let v: A = new <I|null> A(new Y())
46 let v: A = new <I|null> A(null)
53 let v: A = new <I|null> A(new Y())
54 bound: ' extends I|null'
[all …]
Dconstr_args2.params.yaml21 let v: A<Int> = new <X|null> A<Int>(new Int(), new X())
24 let v: A<Int|null> = new <X|null> A<Int|null>(null, null)
27 let v: A<X> = new <X|null> A<X>(new X(), new X())
28 bound: ' extends X|null'
31 let v: A<Object> = new <X|null> A<Object>(new X(), null)
32 bound: ' extends Object|null'
39 let v: A<I|null> = new <I|null> A<I|null>(null, new Y())
42 let v: A<Y> = new <I|null> A<Y>(new Y(), new Y())
43 bound: ' extends I|null'
50 let v: A<int[]|null> = new <X[]|null> A<int[]|null>(null, new X[0])
[all …]
Dconstr_args2_neg.params.yaml21 let v: A<Int> = new <X|null> A<Int>(new Int(), new Object()) // Object is not X
24 let v: A<Int|null> = new <X> A<Int|null>(null, null) // null is not X
27 let v: A<X> = new <X|null> A<X>(new X(), new X()) // out of bound
32 let v: A<I> = new <I> A<I>(new X(), null) // null is not I
35 let v: A<I|null> = new <I|null> A<I|null>(null, new Object()) // Object is not I
38 let v: A<Y> = new <Object|null> A<Y>(new Y(), null) // out of bound
39 bound: ' extends I|null'
46 … let v: A<int[]|null> = new <X[]|null> A<int[]|null>(null, new Object[0]) // Object[] is not X[]
54 let v: A<B> = new <B> A<B>(null, new X[0]) // X[] is not X[][]
55 decl: type B = X[][]|null
[all …]
Dinterface_args.params.yaml26 bound: ' extends X|null'
29 let v: J<X|null> = new A<X|null>(new X())
30 bound: ' extends X|null'
33 let v: J<X|null> = new A<X|null>(null)
34 bound: ' extends X|null'
37 let v: J<X|null> = new A<X|null>(null)
47 let v: J<I|null> = new A<I|null>(new X())
48 bound: ' extends I|null'
59 let v: J<X[]|null> = new A<X[]|null>(null)
67 bound: ' extends Color[]|null'
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/07.expressions/25.equality_expressions/08.equality_with_null_or_undefined/
Dnull_and_undefined_equality.params.yaml17 let a: null;
18 assert a == null;
25 let a: undefined|null;
31 let a: A|undefined|null;
37 let a: A|undefined|null;
38 assert a == null;
43 let a: A|undefined|null;
49 let a: A|undefined|null;
50 assert a !== null;
55 let a: A|undefined|null = new A();
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/doc/tutorial/
Dnullsafety.rst13 Null Safety
19 cannot be null. It is similar to the |TS| behavior in strict null checking
26 let x: number = null // Compile-time error
27 let y: string = null // ditto
28 let z: number[] = null // ditto
30 A variable that can have a null value is defined with a union type ``T | null``:
34 let x: number | null = null
36 x = null // ok
37 if (x != null) { /* do something */ }
41 Non-Null Assertion Operator
[all …]
/arkcompiler/ets_runtime/test/moduletest/arrayfrom/
Dexpect_output.txt68 [0,1,2,null,null,null,null,null,null,null]
72 [null,1,null,null,null,null,null,null,null,null]
88 [0,1,2,null,null,null,null,null,null,null]
90 [null,null,null]
/arkcompiler/runtime_core/libabckit/src/include_v2/c/isa/
Disa_static.h140 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if AbckitInst *inst is NULL.
149 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if AbckitInst *inst is NULL.
150 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if AbckitCoreClass *klass is NULL.
158 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if AbckitInst *inst is NULL.
167 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if AbckitInst *inst is NULL.
175 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if AbckitInst *inst is NULL.
185 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if AbckitInst *inst is NULL.
194 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if AbckitInst *inst is NULL.
204 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if AbckitGraph *graph is NULL.
205 * @note Set `ABCKIT_STATUS_BAD_ARGUMENT` error if AbckitInst *input0 is NULL.
[all …]
/arkcompiler/ets_runtime/test/aottest/not_equal/
Dnot_equal.js17 print(a != null);
18 print(null != a);
22 var b = null;
23 print(b != null);
24 print(null != b);
29 print(c != null);
30 print(null != c);
35 print(d !== null);
36 print(null !== d);
40 var e = null;
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/checked/
Dets_string_equals.sts18 //! CHECKER AOT IR Builder, check string-null equality
47 function getnull(): String | null {
48 return null;
51 function equals_str_str(lhs: String | null, rhs: String | null) {
54 function equals_null_str(str: String | null) {
57 function not_equals_null_str(str: String | null) {
60 function equals_str_null(str: String | null) {
63 function not_equals_str_null(str: String | null) {
71 assert!equals_str_str(null, str);
72 assert!equals_str_str(str, null);
[all …]

12345678910>>...150