diff --git a/vlib/v/tests/imported_symbols_test.v b/vlib/v/tests/imported_symbols_test.v new file mode 100644 index 0000000000..85bc43fb6a --- /dev/null +++ b/vlib/v/tests/imported_symbols_test.v @@ -0,0 +1,15 @@ +module main + +import shapes { Point, Line } + +// test that Point & Line work correctly +// with struct init & array's +fn test_imported_symbols() { + p0 := Point {x: 10 y: 10} + p1 := Point {x: 50 y: 10} + + _ := Line { + ps: [p0, p1] + } + +} \ No newline at end of file diff --git a/vlib/v/tests/modules/shapes/shapes.v b/vlib/v/tests/modules/shapes/shapes.v new file mode 100644 index 0000000000..6d260edf0f --- /dev/null +++ b/vlib/v/tests/modules/shapes/shapes.v @@ -0,0 +1,12 @@ +module shapes + +pub struct Point { +pub mut: + x int + y int +} + +pub struct Line { +pub mut: + ps []Point +} \ No newline at end of file