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

Sources/ucode/tests/custom/04_modules/14_circular_imports

  1 Circular imports are not possible and will lead to a compilation error.
  2 
  3 -- Testcase --
  4 import a_val from "./files/a.uc";
  5 -- End --
  6 
  7 -- File a.uc --
  8 import b_val from "./b.uc";
  9 export default "a";
 10 -- End --
 11 
 12 -- File b.uc --
 13 import a_val from "./a.uc";
 14 export default "b";
 15 -- End --
 16 
 17 -- Args --
 18 -R
 19 -- End --
 20 
 21 -- Expect stderr --
 22 Syntax error: Unable to compile module './files/a.uc':
 23 
 24   | Syntax error: Unable to compile module './files/b.uc':
 25   |
 26   |   | Syntax error: Circular dependency
 27   |   | In ./files/b.uc, line 1, byte 19:
 28   |   |
 29   |   |  `import a_val from "./a.uc";`
 30   |   |   Near here --------^
 31   |
 32   | In ./files/a.uc, line 1, byte 27:
 33   |
 34   |  `import b_val from "./b.uc";`
 35   |   Near here ----------------^
 36 
 37 In [stdin], line 1, byte 33:
 38 
 39  `import a_val from "./files/a.uc";`
 40   Near here ----------------------^
 41 
 42 
 43 -- End --

This page was automatically generated by LXR 0.3.1.  •  OpenWrt