mys-lang / mys

The Mys programming language - an attempt to create a statically typed Python-like language that produces fast binaries. See https://mys-lang.org for more information.
Other
132 stars 5 forks source link

Globals in default trait method does not work #44

Open eerimoq opened 3 years ago

eerimoq commented 3 years ago

Imported trait with default method using global variable does not work. Must change transpiler to generate default trait methods when generating containing module, not adding to class and generate in class context.

There are some ideas as a todo in tests/files/traits.mys.

Also, default trait methods may only use methods defined in the trait, and not class members and methods.