Skip to content

Commit 3ae11ff

Browse files
committed
Fix test for method type inference
1 parent 5fc6f92 commit 3ae11ff

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ScriptingEngineTester/src/main/resources/zencode-tests/type-inference/method-return-type-1.zc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
#output: hello
22
#output: void
33

4-
class Foo {
5-
print() {
4+
virtual class Foo {
5+
print(): void {
66
println("hello");
77
}
88
}
99

10+
class Bar : Foo {
11+
override print() {
12+
println("world");
13+
}
14+
}
15+
1016
new Foo().print();
1117

1218
// expressions inside typeof will not be executed, so the print() won't be called

0 commit comments

Comments
 (0)