Skip to content

Commit

Permalink
std::comptime: improve Binded method of comptimeTypeInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Jun 27, 2024
1 parent 1a74ec8 commit 1d9252a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion std/comptime/type.jule
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ impl comptimeTypeInfo {
fn Public(self): bool

// Reports whether type is binded as constant expression.
// Supports only structures.
fn Binded(self): bool

// Reports whether kind supports ordered constrait as constant expression.
Expand Down
10 changes: 1 addition & 9 deletions std/jule/sema/comptime.jule
Original file line number Diff line number Diff line change
Expand Up @@ -465,15 +465,7 @@ impl comptimeType {
}

fn _Binded(mut &self, mut &e: &Eval, mut &fc: &ast::FnCallExpr): &Data {
let mut binded = false
match {
| self.base.Struct() != nil:
binded = self.base.Struct().Decl.CppLinked
|:
e.pushErr(fc.Token, LogMsg.InvalidTypeForFn, self.base.Str(), "Public")
ret nil
}
let mut constant = Const.NewBool(binded)
let mut constant = Const.NewBool(self.base.CppLinked())
ret &Data{
Kind: &TypeKind{
Kind: buildPrimType(PrimKind.Bool),
Expand Down

0 comments on commit 1d9252a

Please sign in to comment.