| 1 | vlib/v/checker/tests/no_pub_in_main.vv:3:1: error: type alias `Integer` in module main cannot be declared public |
| 2 | 1 | module main |
| 3 | 2 | |
| 4 | 3 | pub type Integer = int |
| 5 | | ~~~~~~~~~~~~~~~~ |
| 6 | 4 | |
| 7 | 5 | pub type Float = f32 | f64 |
| 8 | vlib/v/checker/tests/no_pub_in_main.vv:5:1: error: sum type `Float` in module main cannot be declared public |
| 9 | 3 | pub type Integer = int |
| 10 | 4 | |
| 11 | 5 | pub type Float = f32 | f64 |
| 12 | | ~~~~~~~~~~~~~~ |
| 13 | 6 | |
| 14 | 7 | // Buggy ATM |
| 15 | vlib/v/checker/tests/no_pub_in_main.vv:10:1: error: enum `Color` in module main cannot be declared public |
| 16 | 8 | // pub type Fn = fn () int |
| 17 | 9 | |
| 18 | 10 | pub enum Color { |
| 19 | | ~~~~~~~~~~~~~~ |
| 20 | 11 | red |
| 21 | 12 | green |
| 22 | vlib/v/checker/tests/no_pub_in_main.vv:16:1: error: const in module main cannot be declared public |
| 23 | 14 | } |
| 24 | 15 | |
| 25 | 16 | pub const ( |
| 26 | | ~~~~~~~~~ |
| 27 | 17 | w = 'world' |
| 28 | 18 | ) |
| 29 | vlib/v/checker/tests/no_pub_in_main.vv:20:1: error: function `my_fn` in module main cannot be declared public |
| 30 | 18 | ) |
| 31 | 19 | |
| 32 | 20 | pub fn my_fn() int { |
| 33 | | ~~~~~~~~~~~~~~~~~~ |
| 34 | 21 | return 1 |
| 35 | 22 | } |
| 36 | vlib/v/checker/tests/no_pub_in_main.vv:24:1: error: function `main` cannot be declared public |
| 37 | 22 | } |
| 38 | 23 | |
| 39 | 24 | pub fn main() { |
| 40 | | ~~~~~~~~~~~~~ |
| 41 | 25 | println('main') |
| 42 | 26 | } |
| 43 | vlib/v/checker/tests/no_pub_in_main.vv:28:1: error: struct `MyStruct` in module main cannot be declared public |
| 44 | 26 | } |
| 45 | 27 | |
| 46 | 28 | pub struct MyStruct { |
| 47 | | ~~~~~~~~~~~~~~~~~~~ |
| 48 | 29 | field int |
| 49 | 30 | } |
| 50 | |