Index: tests/slottest.xotcl =================================================================== diff -u -r5524b83ed5dda30e55f7a02e4c22d26783688954 -red15b5be7e88cbbcdf6121f3869722dbc354d76f --- tests/slottest.xotcl (.../slottest.xotcl) (revision 5524b83ed5dda30e55f7a02e4c22d26783688954) +++ tests/slottest.xotcl (.../slottest.xotcl) (revision ed15b5be7e88cbbcdf6121f3869722dbc354d76f) @@ -384,21 +384,14 @@ $obj set __oldvalue($var) $value } -#todo: (1) temporary solution, (2) name "type" is not optimal -::xotcl::parameterType method type=type {name value arg} { - if {![::xotcl::is $value type $arg]} { - error "Value '$value' of $name of not of type $arg" - } -} - Person slots { - Attribute create projects -default "" -multivalued true -type type -arg ::Project + Attribute create projects -default "" -multivalued true -type ::Project Attribute create salary -type integer } Person p2 -name "Gustaf" p2 projects add ::project1 -? {p2 projects add ::o1} {Value '::o1' of value of not of type ::Project} +? {p2 projects add ::o1} {expected object of type ::Project but got "::o1"} p2 salary 100 ? {catch {p2 salary 100.9}} 1 ? {p2 salary} 100