diff --git a/vlib/v/table/atypes.v b/vlib/v/table/atypes.v index 9a526090bd..72a1309982 100644 --- a/vlib/v/table/atypes.v +++ b/vlib/v/table/atypes.v @@ -492,6 +492,7 @@ pub fn (mut t Table) register_builtin_type_symbols() { kind: .any name: 'T' mod: 'builtin' + is_public: true }) t.register_type_symbol({ kind: .any_float @@ -610,7 +611,7 @@ pub mut: pub struct Enum { pub: - vals []string + vals []string is_flag bool } diff --git a/vlib/v/tests/generic_test.v b/vlib/v/tests/generics_test.v similarity index 95% rename from vlib/v/tests/generic_test.v rename to vlib/v/tests/generics_test.v index e8d1f3a366..1e369c6cbe 100644 --- a/vlib/v/tests/generic_test.v +++ b/vlib/v/tests/generics_test.v @@ -38,6 +38,21 @@ fn test_foo() { assert sum(b) == 6 } +fn create() { + a := T{} +} + +struct User { +} + +struct City { +} + +fn test_create() { + create() + create() +} + /* fn map_f(l []T, f fn(T)U) []U { mut r := []U{} diff --git a/vlib/vweb/vweb.v b/vlib/vweb/vweb.v index 60728492e5..e753a77f06 100644 --- a/vlib/vweb/vweb.v +++ b/vlib/vweb/vweb.v @@ -36,14 +36,15 @@ pub const ( ) pub struct Context { +mut: static_files map[string]string static_mime_types map[string]string pub: req http.Request conn net.Socket - form map[string]string // TODO Response pub mut: + form map[string]string headers string // response headers done bool }