mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-15 18:19:15 +00:00
switch assert to 'no file'
This commit is contained in:
@@ -265,8 +265,12 @@ gb_internal OdinDocPosition odin_doc_token_pos_cast(OdinDocWriter *w, TokenPos c
|
||||
AstFile *file = global_files[pos.file_id];
|
||||
if (file != nullptr) {
|
||||
OdinDocFileIndex *file_index_found = map_get(&w->file_cache, file);
|
||||
GB_ASSERT(file_index_found != nullptr);
|
||||
file_index = *file_index_found;
|
||||
// NOTE: a documented entity may hold a position in a file belonging to an
|
||||
// imported package. Such files are only in file_cache when -all-packages is
|
||||
// used, so fall back to the reserved "no file" index.
|
||||
if (file_index_found != nullptr) {
|
||||
file_index = *file_index_found;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user