clever-lang/clever — Issue #86: Global scope visibility of imported file
Author: felipensp
Created: 2012-01-30 22:19:43+00:00
State: open
Labels: Bug, Compiler

Currently we have a problem with imported files, its declared function aren't accessible in the file that impors it.

```
$ cat /home/felipe/test.clv
Int foo() {	return 123; }

$ ./clever -qr 'import "/home/felipe/test.clv"; println(foo());'
Compile error: Function `foo' does not exists! on line 1
```

This is because the AST tree. It's built like:

`{ { Int foo() { return 123; } } println(foo()); }`

Hence we got a compile error:
`Compile error: Function `foo' does not exists! on line 1`