Logo
Explore Mail Help
Register Sign In
Mirror/wren
1
0
Fork 1
You've already forked wren
mirror of https://github.com/wren-lang/wren.git synced 2026-01-16 20:28:04 +01:00
Code Issues Packages Projects Releases Wiki Activity
Files
10f149f359c3bb9c8fbd57e2c19ac520a8da4c69
wren/test/language/module_variable/use_in_method.wren

17 lines
228 B
Plaintext
Raw Normal View History

Remove support for implicit self sends and convert everything to '@'. This fixes the nasty case where "foo(bar)" is context-sensitive, and generally simplifies the compiler a lot since there is a clear distinction between lexical and dynamic scope. Also: - Remove the special handling of capitalized names since all names are lexical now. - Allow methods to close over local variables in enclosing functions. - Allow implicit definition of all lexical names.
2015-11-30 22:46:11 -08:00
var variable = "module"
class Foo {
construct new() {}
method {
System.print(variable)
}
static classMethod {
System.print(variable)
}
}
Foo.new().method // expect: module
Foo.classMethod // expect: module
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.0 Page: 71ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API