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