From 56b569e5b450abb2d9867e03156469b6583658d2 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Sun, 30 Dec 2018 22:37:49 +0100 Subject: [PATCH] fix wrong completion for if variable initialized with an array --- dsymbol | 2 +- dub.json | 2 +- tests/tc_if_auto_array/expected.txt | 10 ++++++++++ tests/tc_if_auto_array/file.d | 1 + tests/tc_if_auto_array/run.sh | 5 +++++ 5 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 tests/tc_if_auto_array/expected.txt create mode 100644 tests/tc_if_auto_array/file.d create mode 100755 tests/tc_if_auto_array/run.sh diff --git a/dsymbol b/dsymbol index 913e1f1..4606b16 160000 --- a/dsymbol +++ b/dsymbol @@ -1 +1 @@ -Subproject commit 913e1f1207f2488400e383d9e74219eb706fdb05 +Subproject commit 4606b1608e77af7df58e5d03e18327f623ec25e9 diff --git a/dub.json b/dub.json index 13fd5c3..e9b91d6 100644 --- a/dub.json +++ b/dub.json @@ -7,7 +7,7 @@ ], "license": "GPL-3.0", "dependencies": { - "dsymbol": "~>0.5.6", + "dsymbol": "~>0.5.7", "libdparse": "~>0.10.10", "msgpack-d": "~>1.0.0-beta.7", "stdx-allocator": "~>2.77.5" diff --git a/tests/tc_if_auto_array/expected.txt b/tests/tc_if_auto_array/expected.txt new file mode 100644 index 0000000..849e75f --- /dev/null +++ b/tests/tc_if_auto_array/expected.txt @@ -0,0 +1,10 @@ +identifiers +alignof k +dup k +idup k +init k +length k +mangleof k +ptr k +sizeof k +stringof k diff --git a/tests/tc_if_auto_array/file.d b/tests/tc_if_auto_array/file.d new file mode 100644 index 0000000..f3c9db7 --- /dev/null +++ b/tests/tc_if_auto_array/file.d @@ -0,0 +1 @@ +module m; void foo(){if(const s = "string"){s.}} diff --git a/tests/tc_if_auto_array/run.sh b/tests/tc_if_auto_array/run.sh new file mode 100755 index 0000000..20059ea --- /dev/null +++ b/tests/tc_if_auto_array/run.sh @@ -0,0 +1,5 @@ +set -e +set -u + +../../bin/dcd-client $1 file.d -c46 > actual.txt +diff actual.txt expected.txt