RE: [EXT] Re: Disabling auto inferencing

2022-12-05 Thread Milles, Eric (TR Technology) via dev
] https://issues.apache.org/jira/browse/GROOVY-10120 -Original Message- From: Jochen Theodorou Sent: Monday, December 5, 2022 2:18 AM To: dev@groovy.apache.org Subject: [EXT] Re: Disabling auto inferencing External Email: Use caution with links and attachments. Am 04.12.22 um 16:34

Re: Disabling auto inferencing

2022-12-05 Thread Jochen Theodorou
Am 04.12.22 um 16:34 schrieb Saravanan Palanichamy: Thanks Jochen and Christopher for helping clarify behaviour. So if I wanted to make sure declaration and not flow type is honored, the quickest way is to make sure flow type matches declaration by casting it? Are there other ways inside the

Re: Disabling auto inferencing

2022-12-04 Thread Saravanan Palanichamy
Thanks Jochen and Christopher for helping clarify behaviour. So if I wanted to make sure declaration and not flow type is honored, the quickest way is to make sure flow type matches declaration by casting it? Are there other ways inside the compiler to fix this (some options or some indications in

Re: Disabling auto inferencing

2022-12-03 Thread Jochen Theodorou
On 03.12.22 15:50, Christopher Smith wrote: I believe the feature at play is "flow typing", and it surprises me that it would apply to variables declared with an explicit type. What version of Groovy are you targeting, and is this compiled statically or dynamically? The declaration type is to

Re: Disabling auto inferencing

2022-12-03 Thread Christopher Smith
I believe the feature at play is "flow typing", and it surprises me that it would apply to variables declared with an explicit type. What version of Groovy are you targeting, and is this compiled statically or dynamically? On Sat, Dec 3, 2022, 05:04 Saravanan Palanichamy wrote: > Hello

Disabling auto inferencing

2022-12-03 Thread Saravanan Palanichamy
Hello developers I am developing a DSL and ran into this issue. Groovy auto infers that b is really a derived clazz and allows me to call the derived clazz method. How do I prevent this behavior from happening? Are there some settings in the DeclarationExpression or VariableExpression AST models