OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/if_null_assignment_static_test_31_multi', null, /
* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__if_null_assignment_static_test_31_multi(exports, dart_sdk, exp
ect) { |
| 5 'use strict'; |
| 6 const core = dart_sdk.core; |
| 7 const _interceptors = dart_sdk._interceptors; |
| 8 const dart = dart_sdk.dart; |
| 9 const dartx = dart_sdk.dartx; |
| 10 const expect$ = expect.expect; |
| 11 const if_null_assignment_static_test_31_multi = Object.create(null); |
| 12 let JSArrayOfA = () => (JSArrayOfA = dart.constFn(_interceptors.JSArray$(if_nu
ll_assignment_static_test_31_multi.A)))(); |
| 13 let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFun
ctionType(dart.dynamic, [dart.dynamic])))(); |
| 14 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 15 dart.copyProperties(if_null_assignment_static_test_31_multi, { |
| 16 get checkedMode() { |
| 17 let checked = false; |
| 18 dart.assert(checked = true); |
| 19 return checked; |
| 20 } |
| 21 }); |
| 22 if_null_assignment_static_test_31_multi.noMethod = function(e) { |
| 23 return core.NoSuchMethodError.is(e); |
| 24 }; |
| 25 dart.fn(if_null_assignment_static_test_31_multi.noMethod, dynamicTodynamic()); |
| 26 if_null_assignment_static_test_31_multi.bad = function() { |
| 27 expect$.Expect.fail('Should not be executed'); |
| 28 }; |
| 29 dart.fn(if_null_assignment_static_test_31_multi.bad, VoidTodynamic()); |
| 30 if_null_assignment_static_test_31_multi.A = class A extends core.Object { |
| 31 new() { |
| 32 this.a = null; |
| 33 } |
| 34 }; |
| 35 if_null_assignment_static_test_31_multi.B = class B extends if_null_assignment
_static_test_31_multi.A { |
| 36 new() { |
| 37 this.b = null; |
| 38 super.new(); |
| 39 } |
| 40 }; |
| 41 if_null_assignment_static_test_31_multi.C = class C extends if_null_assignment
_static_test_31_multi.A { |
| 42 new() { |
| 43 this.c = null; |
| 44 super.new(); |
| 45 } |
| 46 }; |
| 47 dart.copyProperties(if_null_assignment_static_test_31_multi, { |
| 48 get a() { |
| 49 return null; |
| 50 }, |
| 51 set a(value) {} |
| 52 }); |
| 53 dart.copyProperties(if_null_assignment_static_test_31_multi, { |
| 54 get b() { |
| 55 return null; |
| 56 }, |
| 57 set b(value) {} |
| 58 }); |
| 59 if_null_assignment_static_test_31_multi.ClassWithStaticGetters = class ClassWi
thStaticGetters extends core.Object { |
| 60 static get a() { |
| 61 return null; |
| 62 } |
| 63 static set a(value) {} |
| 64 static get b() { |
| 65 return null; |
| 66 } |
| 67 static set b(value) {} |
| 68 }; |
| 69 if_null_assignment_static_test_31_multi.ClassWithInstanceGetters = class Class
WithInstanceGetters extends core.Object { |
| 70 get a() { |
| 71 return null; |
| 72 } |
| 73 set a(value) {} |
| 74 get b() { |
| 75 return null; |
| 76 } |
| 77 set b(value) {} |
| 78 }; |
| 79 if_null_assignment_static_test_31_multi.DerivedClass = class DerivedClass exte
nds if_null_assignment_static_test_31_multi.ClassWithInstanceGetters { |
| 80 get a() { |
| 81 return if_null_assignment_static_test_31_multi.A._check(if_null_assignment
_static_test_31_multi.bad()); |
| 82 } |
| 83 set a(value) { |
| 84 if_null_assignment_static_test_31_multi.bad(); |
| 85 } |
| 86 get b() { |
| 87 return if_null_assignment_static_test_31_multi.B._check(if_null_assignment
_static_test_31_multi.bad()); |
| 88 } |
| 89 set b(value) { |
| 90 if_null_assignment_static_test_31_multi.bad(); |
| 91 } |
| 92 derivedTest() { |
| 93 if (!dart.test(if_null_assignment_static_test_31_multi.checkedMode)) { |
| 94 } |
| 95 } |
| 96 }; |
| 97 dart.setSignature(if_null_assignment_static_test_31_multi.DerivedClass, { |
| 98 methods: () => ({derivedTest: dart.definiteFunctionType(dart.void, [])}) |
| 99 }); |
| 100 if_null_assignment_static_test_31_multi.main = function() { |
| 101 let _ = null; |
| 102 let t = _; |
| 103 t == null ? _ = null : t; |
| 104 new if_null_assignment_static_test_31_multi.DerivedClass().derivedTest(); |
| 105 if (!dart.test(if_null_assignment_static_test_31_multi.checkedMode)) { |
| 106 } |
| 107 if (!dart.test(if_null_assignment_static_test_31_multi.checkedMode)) { |
| 108 } |
| 109 if (!dart.test(if_null_assignment_static_test_31_multi.checkedMode)) { |
| 110 } |
| 111 (() => { |
| 112 let o = JSArrayOfA().of([null]), i = 0, t = o[dartx.get](i); |
| 113 return t == null ? o[dartx.set](i, new if_null_assignment_static_test_31_m
ulti.B()) : t; |
| 114 })().a; |
| 115 if (!dart.test(if_null_assignment_static_test_31_multi.checkedMode)) { |
| 116 } |
| 117 if (!dart.test(if_null_assignment_static_test_31_multi.checkedMode)) { |
| 118 } |
| 119 }; |
| 120 dart.fn(if_null_assignment_static_test_31_multi.main, VoidTodynamic()); |
| 121 // Exports: |
| 122 exports.if_null_assignment_static_test_31_multi = if_null_assignment_static_te
st_31_multi; |
| 123 }); |
OLD | NEW |