builtins.toJSON: fix __toString usage
(cherry picked from commit e583df52800b4baa1564b027fe3b83a21756c2cc)
This commit is contained in:
		
							parent
							
								
									6c90e3b9ac
								
							
						
					
					
						commit
						3130aafd01
					
				
					 5 changed files with 29 additions and 8 deletions
				
			
		|  | @ -9,6 +9,7 @@ | |||
| #include "function-trace.hh" | ||||
| 
 | ||||
| #include <map> | ||||
| #include <optional> | ||||
| #include <unordered_map> | ||||
| 
 | ||||
| 
 | ||||
|  | @ -196,6 +197,9 @@ public: | |||
|        set with attribute `type = "derivation"'). */ | ||||
|     bool isDerivation(Value & v); | ||||
| 
 | ||||
|     std::optional<string> tryAttrsToString(const Pos & pos, Value & v, | ||||
|         PathSet & context, bool coerceMore = false, bool copyToStore = true); | ||||
| 
 | ||||
|     /* String coercion.  Converts strings, paths and derivations to a
 | ||||
|        string.  If `coerceMore' is set, also converts nulls, integers, | ||||
|        booleans and lists to a string.  If `copyToStore' is set, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue