Kaya 0.5.3 reference for Builtins::Wrong_Constructor

List of functions and data types in Builtins

Builtins::Wrong_Constructor()

Usage

This exception is thrown when direct projection of a field is used on a value constructed with a different constructor. It can always be avoided by the use of case statements.

data Example = A(Int a) | B(String b);
Void main() {
    val = A(3);
    putStrLn(val.b);
}
kaya@kayalang.org | Last modified 29 November 2011 | Supported by Durham CompSoc | Powered by Kaya