Skip to content

Commit 3badc3f

Browse files
committed
Add extra tests
1 parent 4f55730 commit 3badc3f

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Any copyright is dedicated to the Public Domain.
2+
// http://creativecommons.org/publicdomain/zero/1.0/
3+
4+
field n: Ref
5+
6+
method foo() returns (x: Ref, y: Ref, z: Int)
7+
method test1() {
8+
//:: ExpectedOutput(typechecker.error)
9+
var a: Int, b: Ref := a
10+
//:: ExpectedOutput(typechecker.error)
11+
var c: Int, d: Int := 10
12+
//:: ExpectedOutput(typechecker.error)
13+
c, d := a
14+
//:: ExpectedOutput(typechecker.error)
15+
var e: Ref, f: Ref, g: Ref := foo()
16+
//:: ExpectedOutput(typechecker.error)
17+
e.n, f.n := foo()
18+
//:: ExpectedOutput(typechecker.error)
19+
e.n, f, a := foo(b)
20+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Any copyright is dedicated to the Public Domain.
2+
// http://creativecommons.org/publicdomain/zero/1.0/
3+
4+
field n: Ref, m: Ref
5+
6+
method foo() returns (x: Ref, y: Ref, z: Int)
7+
method test1() {
8+
var a: Ref, b: Int
9+
//:: ExpectedOutput(typechecker.error)
10+
a.n, a.n, b := foo()
11+
12+
a.n, a.m, b := foo()
13+
}

0 commit comments

Comments
 (0)