Index: tests/parameters.test =================================================================== diff -u -rda6586782390b02ed7660b56417c3db00d63d1c3 -r620972f9a159f83b824f229ab406331e6bd238de --- tests/parameters.test (.../parameters.test) (revision da6586782390b02ed7660b56417c3db00d63d1c3) +++ tests/parameters.test (.../parameters.test) (revision 620972f9a159f83b824f229ab406331e6bd238de) @@ -1566,3 +1566,45 @@ ? {::C::slot::x1 getParameterSpec} {-x1:alias hugo} ? {::C::slot::x2 getParameterSpec} {-x2:alias,substdefault {[self]}} } + +# +# Test potential incfluence on parameters +# +Test case parameter-alias-default { + Class create C { + :attribute a1 + :create c1 { + :attribute a2 + } + } + + Class create M { + :attribute b1:required + } + + c1 mixin M + + ? {c1 info precedence} "::M ::C ::nx::Object" + + ? {C info slots -closure} "::C::slot::a1 ::nx::Object::slot::volatile ::nx::Object::slot::noinit ::nx::Object::slot::mixin ::nx::Object::slot::__initcmd ::nx::Object::slot::class ::nx::Object::slot::filter" + + ? {C eval :objectparameter} "{-superclass:alias,arg=::nsf::methods::class::superclass ::nx::Object} -object-mixin:alias,arg=::nsf::classes::nx::Object::mixin -mixin:alias -object-filter:alias,arg=::nsf::classes::nx::Object::filter -filter:alias -attributes:alias -volatile:alias,noarg -noinit:alias,arg=::nsf::methods::object::noinit,noarg -class:alias,arg=::nsf::methods::object::class __initcmd:initcmd,optional" + + # + # invalidate object parameter and expect that the per-class mixin + # does not harm + # + ::nsf::invalidateobjectparameter C + + c1 configure -a1 x + + ? {c1 info precedence} "::M ::C ::nx::Object" + + ? {C info slots -closure} "::C::slot::a1 ::nx::Object::slot::volatile ::nx::Object::slot::noinit ::nx::Object::slot::mixin ::nx::Object::slot::__initcmd ::nx::Object::slot::class ::nx::Object::slot::filter" + + ? {C eval :objectparameter} "{-superclass:alias,arg=::nsf::methods::class::superclass ::nx::Object} -object-mixin:alias,arg=::nsf::classes::nx::Object::mixin -mixin:alias -object-filter:alias,arg=::nsf::classes::nx::Object::filter -filter:alias -attributes:alias -volatile:alias,noarg -noinit:alias,arg=::nsf::methods::object::noinit,noarg -class:alias,arg=::nsf::methods::object::class __initcmd:initcmd,optional" + + # should not require b1 + ? {C create c2} ::c2 + +} \ No newline at end of file