[ 
https://issues.apache.org/jira/browse/GROOVY-7984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul King closed GROOVY-7984.
-----------------------------

> @SelfType does not allow trait to be added dynamically
> ------------------------------------------------------
>
>                 Key: GROOVY-7984
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7984
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.7
>         Environment: windows 7, java 8, groovy script
>            Reporter: Denis Jouvin
>            Assignee: Eric Milles
>            Priority: Major
>              Labels: trait, traits
>             Fix For: 5.0.0-alpha-6
>
>
> When trying to add dynamically a trait T with a SelfType type restriction on 
> class C, to an instance of that class C, the script throws : 
> org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast 
> object 'C@92dae4' with class 'C' to class 'T'



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to