diff options
Diffstat (limited to 'src/parsing.h')
-rw-r--r-- | src/parsing.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/parsing.h b/src/parsing.h index 12029d290..15f22040d 100644 --- a/src/parsing.h +++ b/src/parsing.h @@ -251,7 +251,10 @@ struct UniqueNameMapper { Name sourceToUnique(Name sName) { if (labelMappings.find(sName) == labelMappings.end()) { - throw ParseException("label mismatch in sourceToUnique"); + throw ParseException("bad label in sourceToUnique"); + } + if (labelMappings[sName].empty()) { + throw ParseException("use of popped label in sourceToUnique"); } return labelMappings[sName].back(); } |