From 11ca3b44b91e89095deab1af5a1ddc7648b169c9 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Sun, 1 Apr 2018 23:13:47 +0200 Subject: [PATCH] fix #453 - failure in incomplete switch --- dub.json | 4 ++-- libdparse | 2 +- tests/tc_incomplete_switch/expected1.txt | 11 +++++++++++ tests/tc_incomplete_switch/file.d | 1 + tests/tc_incomplete_switch/run.sh | 5 +++++ 5 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 tests/tc_incomplete_switch/expected1.txt create mode 100644 tests/tc_incomplete_switch/file.d create mode 100755 tests/tc_incomplete_switch/run.sh diff --git a/dub.json b/dub.json index 8614b1c..563618a 100644 --- a/dub.json +++ b/dub.json @@ -7,8 +7,8 @@ ], "license": "GPL-3.0", "dependencies": { - "dsymbol": "~>0.3.0-beta.3", - "libdparse": "~>0.8.0-alpha.5", + "dsymbol": "~>0.3.0", + "libdparse": "~>0.8.0", "msgpack-d": "~>1.0.0-beta.3", "stdx-allocator": "~>2.77.0" }, diff --git a/libdparse b/libdparse index ee0fa01..970efe3 160000 --- a/libdparse +++ b/libdparse @@ -1 +1 @@ -Subproject commit ee0fa01ab74b6bf27bed3c7bdb9d6fb789963342 +Subproject commit 970efe34e66fc7b3cb93a6ec59984099908070c5 diff --git a/tests/tc_incomplete_switch/expected1.txt b/tests/tc_incomplete_switch/expected1.txt new file mode 100644 index 0000000..5d30ee5 --- /dev/null +++ b/tests/tc_incomplete_switch/expected1.txt @@ -0,0 +1,11 @@ +identifiers +__monitor v +__vptr v +alignof k +classinfo v +e v +init k +mangleof k +sizeof k +stringof k +tupleof k diff --git a/tests/tc_incomplete_switch/file.d b/tests/tc_incomplete_switch/file.d new file mode 100644 index 0000000..a0a4ec3 --- /dev/null +++ b/tests/tc_incomplete_switch/file.d @@ -0,0 +1 @@ +class Foo{int e;} class Bar{void bar(Foo foo){switch(foo. }} diff --git a/tests/tc_incomplete_switch/run.sh b/tests/tc_incomplete_switch/run.sh new file mode 100755 index 0000000..7d9c401 --- /dev/null +++ b/tests/tc_incomplete_switch/run.sh @@ -0,0 +1,5 @@ +set -e +set -u + +../../bin/dcd-client $1 file.d -c58 > actual1.txt +diff actual1.txt expected1.txt