When include-ing a class, we propagated the scope of the include into the class instead of using the correct scope that existed when the class was defined and instead propagating only the include arguments in. This patch fixes the issue and adds a ton of tests as well. It also propagates the scope into the include args, in case that is needed, and adds a test for that as well. Thanks to Nicolas Charles for the initial bug report.
13 lines
208 B
Plaintext
13 lines
208 B
Plaintext
import "os"
|
|
import "fmt"
|
|
|
|
class xclass {
|
|
#import "os" # this should not be required, top-level should be enough
|
|
|
|
$aaa = if os.is_debian() { "bbb" } else { "ccc" }
|
|
|
|
print "${aaa}" {
|
|
msg => "hello",
|
|
}
|
|
}
|