From 94537c590116a5d5f99d2623f37e5a06c3174b10 Mon Sep 17 00:00:00 2001 From: joe-conigliaro Date: Mon, 10 Feb 2020 01:40:32 +1100 Subject: [PATCH] compiler: scope type alias to module --- vlib/compiler/aparser.v | 6 +++--- vlib/os/os_windows.v | 2 +- vlib/term/term_windows.v | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vlib/compiler/aparser.v b/vlib/compiler/aparser.v index f943f6b62b..bc675591ec 100644 --- a/vlib/compiler/aparser.v +++ b/vlib/compiler/aparser.v @@ -829,12 +829,12 @@ fn (p mut Parser) type_decl() { p.fspace() } mut parent := Type{} + if !p.builtin_mod && p.mod != 'main' { + name = p.prepend_mod(name) + } // Sum type //is_sum := p.tok == .pipe if is_sum { - if !p.builtin_mod && p.mod != 'main' { - name = p.prepend_mod(name) - } // Register the first child (name we already parsed) /* p.table.register_type(Type{ diff --git a/vlib/os/os_windows.v b/vlib/os/os_windows.v index 4ba30cf9d6..13850b037a 100644 --- a/vlib/os/os_windows.v +++ b/vlib/os/os_windows.v @@ -11,7 +11,7 @@ pub const ( // Ref - https://docs.microsoft.com/en-us/windows/desktop/winprog/windows-data-types // A handle to an object. -type HANDLE voidptr +pub type HANDLE voidptr // win: FILETIME // https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime diff --git a/vlib/term/term_windows.v b/vlib/term/term_windows.v index 79be5ca8cb..7ad853222f 100644 --- a/vlib/term/term_windows.v +++ b/vlib/term/term_windows.v @@ -17,7 +17,7 @@ struct C.CONSOLE_SCREEN_BUFFER_INFO { dwMaximumWindowSize C.COORD } -fn C.GetConsoleScreenBufferInfo(handle C.HANDLE, info &CONSOLE_SCREEN_BUFFER_INFO) bool +fn C.GetConsoleScreenBufferInfo(handle os.HANDLE, info &CONSOLE_SCREEN_BUFFER_INFO) bool // get_terminal_size returns a number of colums and rows of terminal window. pub fn get_terminal_size() (int, int) {