I have the following code for a Variant datatype.
    
    
    type
        QLispVM* = ref object
        
        QLispType = enum
            qtInt, qtFloat, qtBool, qtString, qtList
        
        QLispValue* = object
            case datatype*: QLispType
                of qtBool:
                    blVal*: bool
                of qtFloat:
                    flVal*: float
                of qtInt:
                    intVal*: int
                of qtString:
                    strVal*: string
                of qtList:
                    listVal*: QLispList
        
        QLispList* = ref object
            value*: QLispValue
    
    
    Run

My problem is, the variable fields, blVal, flVal etc. are not accessible from 
outside of the module, even though they are marked to be exported. Am I missing 
something here that makes them accessible?

When all of the code is in the same module accessing and setting the typed 
fields work. When I try from another module I get the error:
    
    
    Error: unhandled exception: blVal is not accessible [FieldError]
    
    however this is a run-time error and not a compile-time error.
    
    Thanks,

Reply via email to