1Builtins.Wrong_Constructor(3kaKyaay)a module referBeunicletins.Wrong_Constructor(3kaya)
2
3
4
6 Builtins::Wrong_Constructor - Tried to get a field from the wrong con‐
7 structor
8
10 Builtins::Wrong_Constructor(
11
13 This exception is thrown when direct projection of a field is used on a
14 value constructed with a different constructor. It can always be
15 avoided by the use of case statements.
16
17
18 data Example = A(Int a) | B(String b);
19 Void main() {
20 val = A(3);
21 putStrLn(val.b);
22 }
23
25 Kaya standard library by Edwin Brady, Chris Morris and others
26 (kaya@kayalang.org). For further information see http://kayalang.org/
27
29 The Kaya standard library is free software; you can redistribute it
30 and/or modify it under the terms of the GNU Lesser General Public
31 License (version 2.1 or any later version) as published by the Free
32 Software Foundation.
33
34
35
36Kaya December 2010Builtins.Wrong_Constructor(3kaya)