diff options
| author | Daniel Gavin <danielgavin5@hotmail.com> | 2022-10-25 16:32:06 +0200 |
|---|---|---|
| committer | Daniel Gavin <danielgavin5@hotmail.com> | 2022-10-25 16:32:06 +0200 |
| commit | 6ec6afac04b470ff7fa6b668bdab290af56297af (patch) | |
| tree | bd45a96516c27bd0c2311c4a7327b1306d1399d1 /src | |
| parent | ba3eaa84a7e843aadd66bdf336ecae550c43f34a (diff) | |
Fix issue with union having a type from a different package.
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/completion.odin | 6 | ||||
| -rw-r--r-- | src/testing/testing.odin | 15 |
2 files changed, 12 insertions, 9 deletions
diff --git a/src/server/completion.odin b/src/server/completion.odin index 7038cbd..59e762c 100644 --- a/src/server/completion.odin +++ b/src/server/completion.odin @@ -447,9 +447,13 @@ get_selector_completion :: proc( documentation = symbol.doc, } + //Might be a hack... + _, is_selector := type.derived.(^ast.Selector_Expr) + if symbol.pkg == ast_context.document_package || base == "runtime" || - base == "$builtin" { + base == "$builtin" || + is_selector { item.label = fmt.aprintf( "(%v%v)", common.repeat( diff --git a/src/testing/testing.odin b/src/testing/testing.odin index 65694e6..e4ac86d 100644 --- a/src/testing/testing.odin +++ b/src/testing/testing.odin @@ -92,9 +92,9 @@ setup :: proc(src: ^Source) { fullpath := uri.path p := parser.Parser { - //err = parser.default_error_handler, - err = server.log_error_handler, - warn = server.log_warning_handler, + err = parser.default_error_handler, + warn = parser.default_error_handler, + flags = {.Optional_Semicolons}, } dir := filepath.base(filepath.dir(fullpath, context.temp_allocator)) @@ -122,11 +122,10 @@ setup :: proc(src: ^Source) { } if ret := server.collect_symbols( - &server.indexer.index.collection, - file, - uri.uri, - ); - ret != .None { + &server.indexer.index.collection, + file, + uri.uri, + ); ret != .None { return } } |