Skip to content

Commit

Permalink
chore(tests): Rewrite some compile failure tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ymadzhunkov committed Oct 2, 2023
1 parent 7c8c834 commit 8f30eca
Show file tree
Hide file tree
Showing 49 changed files with 1,200 additions and 921 deletions.
1 change: 1 addition & 0 deletions compiler/noirc_frontend/src/hir/def_collector/dc_crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ pub struct DefCollector {
pub(crate) collected_traits_impls: Vec<UnresolvedTraitImpl>,
}

#[derive(Debug, Clone)]
pub enum CompilationError {
ParseError(ParserError),
DefinitionError(DefCollectorErrorKind),
Expand Down
2 changes: 1 addition & 1 deletion compiler/noirc_frontend/src/hir/def_collector/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use thiserror::Error;

use std::fmt;

#[derive(Debug, Clone, Eq, PartialEq)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum DuplicateType {
Function,
Module,
Expand Down
4 changes: 1 addition & 3 deletions compiler/noirc_frontend/src/hir/def_map/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,7 @@ pub struct Contract {
/// Given a FileId, fetch the File, from the FileManager and parse it's content
pub fn parse_file(fm: &FileManager, file_id: FileId) -> (ParsedModule, Vec<ParserError>) {
let file = fm.fetch_file(file_id);
let (program, errors) = parse_program(file.source());

(program, errors)
parse_program(file.source())
}

impl std::ops::Index<LocalModuleId> for CrateDefMap {
Expand Down
Loading

0 comments on commit 8f30eca

Please sign in to comment.