2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 13:02:11 +00:00

property: Fix print in error condition in property.find. (#35)

* property: Add a test to show the issue with property.find.
* property: Fix property.find to print the ambiguous key
This commit is contained in:
tee3
2021-06-01 08:04:35 -04:00
committed by GitHub
parent 91fd728f3e
commit 5c39c4e942

View File

@@ -808,6 +808,7 @@ class property-map
if $(best[2])
{
import errors : error : errors.error ;
properties = [ $(property-set).raw ] ;
errors.error "Ambiguous key $(properties:J= :E=)" ;
}
return $(best) ;
@@ -969,6 +970,10 @@ rule __test__ ( )
$(pm).insert <toolset>gcc <os>NT : obj ;
$(pm).insert <toolset>gcc <os>CYGWIN : obj ;
try ;
$(pm).find [ new property-set <toolset>gcc <os>NT <os>CYGWIN ] ;
catch "Ambiguous key <toolset>gcc <os>NT <os>CYGWIN" ;
assert.equal o : [ $(pm).find-replace <toolset>gcc ] ;
assert.equal obj : [ $(pm).find-replace <toolset>gcc <os>NT ] ;