• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/ucode/tests/custom/99_bugs/44_compiler_as_from_identifier

  1 Ensure that `as` and `from` are valid identifiers while their special
  2 meaning in import statements is retained.
  3 
  4 -- Testcase --
  5 import { foo as bar } from 'mod';
  6 import * as mod from 'mod';
  7 
  8 function fn(as, from) {
  9         return as + from;
 10 }
 11 
 12 as = 1;
 13 from = true;
 14 
 15 printf("%.J\n", [
 16         bar,
 17         mod,
 18         fn(1, 2),
 19         as,
 20         from
 21 ]);
 22 -- End --
 23 
 24 -- File mod.uc --
 25 export let foo = false;
 26 export default 'test';
 27 -- End --
 28 
 29 -- Args --
 30 -R -L files/
 31 -- End --
 32 
 33 -- Expect stdout --
 34 [
 35         false,
 36         {
 37                 "foo": false,
 38                 "default": "test"
 39         },
 40         3,
 41         1,
 42         true
 43 ]
 44 -- End --

This page was automatically generated by LXR 0.3.1.  •  OpenWrt