summaryrefslogtreecommitdiff
path: root/graphics/asymptote/tests/types/cast.asy
blob: b1191637554b56ca98b72221d021580390b639c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import TestLib;
StartTest("cast");
struct A {
  public int x;
}
A operator cast(int x) {
  A a=new A;
  a.x=x;
  return a;
}
A a=7;
assert(a.x==7);
EndTest();