src/test/06-Errors/error-public-class-func.ck
raw| 1 | // error verification |
| 2 | // external var access from public class pre-constructor |
| 3 | |
| 4 | // file-level variable |
| 5 | fun void foo() |
| 6 | { |
| 7 | <<< "local function" >>>; |
| 8 | } |
| 9 | |
| 10 | // public classes can be instantiated from any file |
| 11 | public class X |
| 12 | { |
| 13 | // calling a local function from within a public class |
| 14 | // things gets weird if X is instantiated from another file |
| 15 | foo(); |
| 16 | } |