Skip to content

Commit

Permalink
jule update: init functions are cannot evaluate
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Mar 14, 2024
1 parent b37139c commit e1c0974
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions std/jule/sema/eval.jule
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use std::jule::ast::{
TernaryExpr,
NamespaceTypeDecl,
}
use std::jule::build::{
use build for std::jule::build::{
LogMsg,
Directive,
PATH_STDLIB,
Expand Down Expand Up @@ -719,15 +719,17 @@ impl Eval {
| &Struct:
ret self.eval_struct((&Struct)(def).instance(), ident)
| &Fn:
ret self.eval_fn((&Fn)(def), ident)
let mut f = (&Fn)(def)
if f.ident != build::INIT_FN {
ret self.eval_fn(f, ident)
}
| &FnIns:
ret self.eval_fn_ins((&FnIns)(def))
| &TypeAlias:
ret self.eval_type_alias((&TypeAlias)(def), ident)
|:
self.push_err(ident, LogMsg.IdentNotExist, ident.kind)
ret nil
}
self.push_err(ident, LogMsg.IdentNotExist, ident.kind)
ret nil
}

fn eval_ident(mut self, ident: &IdentExpr): &Data {
Expand Down

0 comments on commit e1c0974

Please sign in to comment.