OLD | NEW |
1 dart_library.library('notnull', null, /* Imports */[ | 1 dart_library.library('notnull', null, /* Imports */[ |
2 'dart/_runtime', | 2 'dart/_runtime', |
3 'dart/core' | 3 'dart/core' |
4 ], /* Lazy imports */[ | 4 ], /* Lazy imports */[ |
5 ], function(exports, dart, core) { | 5 ], function(exports, dart, core) { |
6 'use strict'; | 6 'use strict'; |
7 let dartx = dart.dartx; | 7 let dartx = dart.dartx; |
8 function intAssignments() { | 8 function intAssignments() { |
9 let i = 0; | 9 let i = 0; |
10 i = i & 1; | 10 i = i & 1; |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 | 217 |
218 try { | 218 try { |
219 dart.dsend(null, 'foo'); | 219 dart.dsend(null, 'foo'); |
220 } catch (e) { | 220 } catch (e) { |
221 let trace = dart.stackTrace(e); | 221 let trace = dart.stackTrace(e); |
222 core.print(`${typeof e == 'string' ? e : dart.toString(e)} at ${trace}`); | 222 core.print(`${typeof e == 'string' ? e : dart.toString(e)} at ${trace}`); |
223 } | 223 } |
224 | 224 |
225 } | 225 } |
226 dart.fn(controlFlow); | 226 dart.fn(controlFlow); |
| 227 function cascadesOnNull() { |
| 228 let x = null; |
| 229 core.print(dart.hashCode(((() => { |
| 230 dart.toString(x); |
| 231 dart.runtimeType(x); |
| 232 return x; |
| 233 })()))); |
| 234 let y = null; |
| 235 core.print(dart.hashCode(((() => { |
| 236 dart.toString(y); |
| 237 dart.runtimeType(y); |
| 238 return y; |
| 239 })()))); |
| 240 } |
| 241 dart.fn(cascadesOnNull); |
227 function main() { | 242 function main() { |
228 intAssignments(); | 243 intAssignments(); |
229 doubleAssignments(); | 244 doubleAssignments(); |
230 boolAssignments(); | 245 boolAssignments(); |
231 nullableLocals(1); | 246 nullableLocals(1); |
232 optParams(1, 2); | 247 optParams(1, 2); |
233 namedParams({x: 1, y: 2}); | 248 namedParams({x: 1, y: 2}); |
234 forLoops(dart.fn(() => 10, core.int, [])); | 249 forLoops(dart.fn(() => 10, core.int, [])); |
235 increments(); | 250 increments(); |
236 conditionals(true); | 251 conditionals(true); |
237 calls(); | 252 calls(); |
238 localEscapes(); | 253 localEscapes(); |
239 controlFlow(); | 254 controlFlow(); |
| 255 cascadesOnNull(); |
240 nullableCycle(); | 256 nullableCycle(); |
241 nonNullableCycle(); | 257 nonNullableCycle(); |
242 } | 258 } |
243 dart.fn(main); | 259 dart.fn(main); |
244 // Exports: | 260 // Exports: |
245 exports.intAssignments = intAssignments; | 261 exports.intAssignments = intAssignments; |
246 exports.doubleAssignments = doubleAssignments; | 262 exports.doubleAssignments = doubleAssignments; |
247 exports.boolAssignments = boolAssignments; | 263 exports.boolAssignments = boolAssignments; |
248 exports.increments = increments; | 264 exports.increments = increments; |
249 exports.conditionals = conditionals; | 265 exports.conditionals = conditionals; |
250 exports.nullAwareOps = nullAwareOps; | 266 exports.nullAwareOps = nullAwareOps; |
251 exports.nullableLocals = nullableLocals; | 267 exports.nullableLocals = nullableLocals; |
252 exports.optParams = optParams; | 268 exports.optParams = optParams; |
253 exports.namedParams = namedParams; | 269 exports.namedParams = namedParams; |
254 exports.forLoops = forLoops; | 270 exports.forLoops = forLoops; |
255 exports.nullableCycle = nullableCycle; | 271 exports.nullableCycle = nullableCycle; |
256 exports.nonNullableCycle = nonNullableCycle; | 272 exports.nonNullableCycle = nonNullableCycle; |
257 exports.Foo = Foo; | 273 exports.Foo = Foo; |
258 exports.calls = calls; | 274 exports.calls = calls; |
259 exports.localEscapes = localEscapes; | 275 exports.localEscapes = localEscapes; |
260 exports.controlFlow = controlFlow; | 276 exports.controlFlow = controlFlow; |
| 277 exports.cascadesOnNull = cascadesOnNull; |
261 exports.main = main; | 278 exports.main = main; |
262 }); | 279 }); |
OLD | NEW |