Tiny changes.
This commit is contained in:
parent
06fafb825a
commit
0df1252053
@ -13,9 +13,9 @@ use crate::error_codes::{FIELD_MULTIPLE_INIT, FIELD_UNINIT};
|
||||
use crate::ir::ir_class::{IrClass, IrField};
|
||||
use crate::ir::ir_function::IrFunction;
|
||||
use crate::source_range::SourceRange;
|
||||
use crate::symbol::Symbol;
|
||||
use crate::symbol::class_symbol::ClassSymbol;
|
||||
use crate::symbol::constructor_symbol::ConstructorSymbol;
|
||||
use crate::symbol::Symbol;
|
||||
use crate::symbol_table::SymbolTable;
|
||||
use crate::type_info::TypeInfo;
|
||||
use crate::types_table::TypesTable;
|
||||
@ -147,7 +147,7 @@ impl Class {
|
||||
all_symbols
|
||||
}
|
||||
|
||||
pub fn check_names(&self, symbol_table: &mut SymbolTable) -> Vec<Diagnostic> {
|
||||
pub fn check_names(&self, symbol_table: &SymbolTable) -> Vec<Diagnostic> {
|
||||
let mut diagnostics: Vec<Diagnostic> = Vec::new();
|
||||
|
||||
for generic_parameter in &self.generic_parameters {
|
||||
|
||||
@ -57,7 +57,7 @@ impl CompilationUnit {
|
||||
symbol_table.pop_scope();
|
||||
}
|
||||
|
||||
pub fn gather_symbols(&self) -> Vec<Symbol> {
|
||||
pub fn gather_unordered_symbols(&self) -> Vec<Symbol> {
|
||||
let fqn_context = FqnContext::new();
|
||||
[
|
||||
self.classes
|
||||
|
||||
@ -40,10 +40,10 @@ pub fn compile_compilation_units(inputs: &HashMap<Filename, &str>) -> Result<(),
|
||||
compilation_unit.init_scopes(&mut symbol_table);
|
||||
}
|
||||
|
||||
// gather symbols
|
||||
// gather unordered symbols
|
||||
let all_symbols = compilation_units
|
||||
.values()
|
||||
.flat_map(|compilation_unit| compilation_unit.gather_symbols())
|
||||
.flat_map(|compilation_unit| compilation_unit.gather_unordered_symbols())
|
||||
.collect::<Vec<_>>();
|
||||
try_insert_symbols_into(all_symbols, &mut symbol_table)?;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user