You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
Describe the bug
The following jac code is giving a type error for constructor arguments types
Jac Code
objPerson {
has : protectage: int; # no need ot use `_age`has : pubname: str;
can : privinit(name: str, age: int) ->None {
here.name=name;
here.age=age;
}
can : pubgreet() ->None { # public is default if `pub` is not specifiedprint("Hello, my name is ", self.name, " and I'm ", self.age, " years old.");
}
}
mypy errors
WARNING - /home/mgtm98/jaclang/examples/micro/basic_class.jac, line 19, col 21: Argument 1 to "Person" has incompatible type "str"; expected "int"
WARNING - /home/mgtm98/jaclang/examples/micro/basic_class.jac, line 19, col 29: Argument 2 to "Person" has incompatible type "int"; expected "str"
The text was updated successfully, but these errors were encountered:
Describe the bug
The following jac code is giving a type error for constructor arguments types
Jac Code
mypy errors
The text was updated successfully, but these errors were encountered: