We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ec8ccb commit a1e8ceaCopy full SHA for a1e8cea
1 file changed
src/ast.rs
@@ -521,7 +521,7 @@ impl TreeLike for ExprTree<'_> {
521
/// 2. Resolving type aliases
522
/// 3. Assigning types to each witness expression
523
/// 4. Resolving calls to custom functions
524
-#[derive(Clone, Debug, Eq, PartialEq, Default)]
+#[derive(Clone, Debug, Eq, PartialEq)]
525
struct Scope {
526
resolutions: ProgramResolutions,
527
paths: Arc<[SourceName]>,
@@ -536,6 +536,23 @@ struct Scope {
536
call_tracker: CallTracker,
537
}
538
539
+impl Default for Scope {
540
+ fn default() -> Self {
541
+ Self {
542
+ resolutions: Arc::from([]),
543
+ paths: Arc::from([]),
544
+ file_id: 0,
545
+ variables: Vec::new(),
546
+ aliases: HashMap::new(),
547
+ parameters: HashMap::new(),
548
+ witnesses: HashMap::new(),
549
+ functions: HashMap::new(),
550
+ is_main: false,
551
+ call_tracker: CallTracker::default(),
552
+ }
553
554
+}
555
+
556
impl Scope {
557
pub fn new(resolutions: ProgramResolutions, paths: Arc<[SourceName]>) -> Self {
558
Self {
0 commit comments