[0.4.0] Import as (#775)

* Add import "..." for Variable as OtherName
This commit is contained in:
ruby
2020-12-03 09:34:36 -08:00
committed by GitHub
parent 6bd2f810e2
commit 3e0f71b742
6 changed files with 63 additions and 10 deletions

View File

@ -0,0 +1,11 @@
var Module = "from here"
var ValueC = "value C"
import "./module" for ValueA, Module as Another, ValueB // expect: ran module
import "./module" for ValueC as OtherC
System.print(Module) // expect: from here
System.print(Another) // expect: from module
System.print(ValueA) // expect: module A
System.print(ValueB) // expect: module B
System.print(ValueC) // expect: value C
System.print(OtherC) // expect: module C

View File

@ -0,0 +1,7 @@
// nontest
var Module = "from module"
System.print("ran module")
var ValueA = "module A"
var ValueB = "module B"
var ValueC = "module C"