From abd29bcb0c3931d48eba7e0d8356a47a7dc2d5da Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Sat, 11 May 2019 23:13:14 +0200 Subject: [PATCH] fix #600 - Wrong scope for parameter solving in nested funcs --- dsymbol | 2 +- dub.json | 4 ++-- libdparse | 2 +- tests/tc_erroneous_body_content/expected1.txt | 8 ++++++++ tests/tc_erroneous_body_content/expected2.txt | 8 ++++++++ tests/tc_erroneous_body_content/file.d | 13 +++++++++++++ tests/tc_erroneous_body_content/run.sh | 7 +++++++ 7 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 tests/tc_erroneous_body_content/expected1.txt create mode 100644 tests/tc_erroneous_body_content/expected2.txt create mode 100644 tests/tc_erroneous_body_content/file.d create mode 100755 tests/tc_erroneous_body_content/run.sh diff --git a/dsymbol b/dsymbol index 5825b717..cf6a0e2e 160000 --- a/dsymbol +++ b/dsymbol @@ -1 +1 @@ -Subproject commit 5825b717be321f8e69058848322752f5b9d8e698 +Subproject commit cf6a0e2e4d23750b1023ba64604580226b41ed83 diff --git a/dub.json b/dub.json index d44925db..6baa9964 100644 --- a/dub.json +++ b/dub.json @@ -7,8 +7,8 @@ ], "license": "GPL-3.0", "dependencies": { - "dsymbol": "~>0.7.0", - "libdparse": "~>0.11.4", + "dsymbol": "~>0.8.0", + "libdparse": "~>0.12.0", "msgpack-d": "~>1.0.0-beta.7", "stdx-allocator": "~>2.77.5", "emsi_containers": "~>0.8.0-alpha.15" diff --git a/libdparse b/libdparse index aae37193..ec2089d9 160000 --- a/libdparse +++ b/libdparse @@ -1 +1 @@ -Subproject commit aae371931a99027465952cd6fdaede4eb4743e76 +Subproject commit ec2089d95271a1d7d89d73c94187b01e90631d08 diff --git a/tests/tc_erroneous_body_content/expected1.txt b/tests/tc_erroneous_body_content/expected1.txt new file mode 100644 index 00000000..12a38bbd --- /dev/null +++ b/tests/tc_erroneous_body_content/expected1.txt @@ -0,0 +1,8 @@ +identifiers +alignof k +b v +init k +mangleof k +sizeof k +stringof k +tupleof k diff --git a/tests/tc_erroneous_body_content/expected2.txt b/tests/tc_erroneous_body_content/expected2.txt new file mode 100644 index 00000000..a0343572 --- /dev/null +++ b/tests/tc_erroneous_body_content/expected2.txt @@ -0,0 +1,8 @@ +identifiers +a v +alignof k +init k +mangleof k +sizeof k +stringof k +tupleof k diff --git a/tests/tc_erroneous_body_content/file.d b/tests/tc_erroneous_body_content/file.d new file mode 100644 index 00000000..42395639 --- /dev/null +++ b/tests/tc_erroneous_body_content/file.d @@ -0,0 +1,13 @@ +module runnable; + +struct A { int a; } +struct B { int b; } + +void foo(A node) +{ + void bar(B node) + { + node. + } + node. +} diff --git a/tests/tc_erroneous_body_content/run.sh b/tests/tc_erroneous_body_content/run.sh new file mode 100755 index 00000000..f0ebe6dc --- /dev/null +++ b/tests/tc_erroneous_body_content/run.sh @@ -0,0 +1,7 @@ +set -e +set -u + +../../bin/dcd-client $1 file.d -c 118 > actual1.txt +diff actual1.txt expected1.txt +../../bin/dcd-client $1 file.d -c 134 > actual2.txt +diff actual2.txt expected2.txt