Daniel Sun created GROOVY-12807:
-----------------------------------

             Summary: MarkupTemplateEngine: an inlined modelTypes declaration 
throws ClassCastException
                 Key: GROOVY-12807
                 URL: https://issues.apache.org/jira/browse/GROOVY-12807
             Project: Groovy
          Issue Type: Bug
          Components: groovy-templates
            Reporter: Daniel Sun


groovy.text.MarkupTemplateEngineTest#testInlinedModelTypeDeclaration in 
subprojects/groovy-templates/src/test/groovy/groovy/text/MarkupTemplateEngineTest.groovy
 is annotated @Disabled("ClassCastException: java.util.LinkedHashMap cannot be 
cast to groovy.lang.GroovyObject"). The template begins with

  modelTypes = {
      List<groovy.text.MarkupTemplateEngineTest.Person> persons
  }

and then iterates persons. An untyped model (testCollectionInModel) already 
works; a wrong inlined type has a separate failing-path test. No open ticket 
was found for this ClassCastException.

Scanned SHA: ca71425976fd2e3da6db9634955ba0d39550a6d4 (apache/groovy master).

Acceptance criterion: The inlined modelTypes form renders the sample model 
without the ClassCastException, and @Disabled is removed.




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to