Report error on local variables with resource binding #6971
Labels
bug
Bug, regression, crash
diagnostic
Issues for diagnostics
incorrect-code
Issues relating to handling of incorrect code
Milestone
Description
DXC should report error on local variable with resource binding.
Steps to Reproduce
For
cs_6_5
this reports an errorlocal resource not guaranteed to map to unique global resource.
https://godbolt.org/z/qhP8dqbed
For
cs_6_6
it does not report an error, generatesannotateHandle
withoutcreateHandle
, and the resource binding is not captured in metadata.https://godbolt.org/z/xcadsEjzr
For lib_6_6 it also does not report an error, produces
annotateHandle
andcreateHandleForLib
, and the resource binding is not captured in metadata.https://godbolt.org/z/MWzdTEb6q
Actual Behavior
Local resources with bindings should not be allowed and the compiler should report an error.
Environment
The text was updated successfully, but these errors were encountered: