Re: @DelegatesTo for Closures used in annotations

2021-08-05 Thread Daniil Ovchinnikov
{ os.windows } could be supported class X {} // which should be compiled to @Requires(X$1) class X { static class 1 extends Precondition { boolean checkRequirement() { os.windows } } } ``` And with this approach there is no need for an annotation. — Daniil Ovchinnikov JetBrains

Re: [PROPOSAL]Support conditional return

2020-07-30 Thread Daniil Ovchinnikov
quot;$methodName not found") } ``` -1 from me overall. — Daniil Ovchinnikov JetBrains > On 27 Jul 2020, at 07:00, Jochen Theodorou wrote: > > On 26.07.20 20:23, Daniel Sun wrote: >> Hi mg, >> >>> maybe you can give some real life code where you encounter this

Re: "super" object expression for attribute, property, and method call

2020-06-26 Thread Daniil Ovchinnikov
Anything but annotations, please, especially if they modify resolution algorithm. — Daniil Ovchinnikov JetBrains > On 26 Jun 2020, at 19:18, MG wrote: > > Hmmm - what about an @Java or @JavaCompatible annotation as the switch that > was already proposed. > That way Java

Re: "super" object expression for attribute, property, and method call

2020-06-26 Thread Daniil Ovchinnikov
only properties of the superclass (i.e. ignore supers’ supers) — Daniil Ovchinnikov JetBrains > On 26 Jun 2020, at 17:34, Milles, Eric (TR Tech, Content & Ops) > wrote: > > Sorry for replying to my own... > > class A { > def x = 1 > def getX() { 2 } > def m(

Re: "super" object expression for attribute, property, and method call

2020-06-26 Thread Daniil Ovchinnikov
> when located within "getX()", "isX()" or "setX()" I think the meaning of an expression must not depend on the context. — Daniil Ovchinnikov JetBrains > On 26 Jun 2020, at 18:36, Milles, Eric (TR Tech, Content & Ops) > wrote: > > If we were

Re: STC: Closure shared variable assignment handling

2020-06-04 Thread Daniil Ovchinnikov
typeOf ... *at* this point Sorry. > On 4 Jun 2020, at 22:45, Daniil Ovchinnikov > wrote: > > Hi - > >> Of course if we want to define intuitive as "do it like Java", we make >> def an alias for var, take its semantics and give up on Flow typing in >

Re: STC: Closure shared variable assignment handling

2020-06-04 Thread Daniil Ovchinnikov
inferred to A because LUB(A) = A z = x // typeOf(z) as this point is A z.b() // STC error, no method b in A — Daniil Ovchinnikov JetBrains > On 4 Jun 2020, at 21:47, Jochen Theodorou wrote: > > On 04.06.20 18:55, Milles, Eric (TR Tech, Content & Ops) wrote: >> I am suggesting th

Re: ASM class resolution

2019-01-15 Thread Daniil Ovchinnikov
you. In the meanwhile I’ve added an ability to disable ‘asmResolving’ via optimization options map in IntelliJ. — Daniil Ovchinnikov JetBrains > On 15 Jan 2019, at 11:38, Paul King wrote: > > The tests still pass replacing the try/catch with: > ClassNodeResolver.LookupResult

ASM class resolution

2019-01-14 Thread Daniil Ovchinnikov
this expected? — Daniil Ovchinnikov JetBrains

DGM wildcards

2018-12-07 Thread Daniil Ovchinnikov
Hi all - Any plans to add wildcards into DGM methods? — Daniil Ovchinnikov JetBrains

Re: About the enhanced version of `Properties`, i.e. `GProperties`

2018-11-07 Thread Daniil Ovchinnikov
ass of Properties then is either should provide a way to distinguish gproperties from regular xml properties or throw exception in loadFromXml/storeToXML. — Daniil Ovchinnikov JetBrains > On 7 Nov 2018, at 03:13, Thibault Kruse wrote: > >> I propose to use "gproperties&qu

Re: About the enhanced version of `Properties`, i.e. `GProperties`

2018-11-06 Thread Daniil Ovchinnikov
se its default extension (.java), because why not, otherwise you should change file extension of your existing .java files. — Daniil Ovchinnikov JetBrains > On 3 Nov 2018, at 07:11, Daniel.Sun wrote: > > No. GProperties to Properties is similar with GString to String, GProperties > is

Re: About the enhanced version of `Properties`, i.e. `GProperties`

2018-11-02 Thread Daniil Ovchinnikov
Did you consider using different file extension? — Daniil Ovchinnikov JetBrains > On 2 Nov 2018, at 18:39, Daniel.Sun wrote: > > I've added some doc to show the usage: > > https://github.com/apache/groovy/blob/3775edeabde19eb5229e840ec2ffc1dcf90634db/src/mai

Re: Constructor call short-hand syntax

2018-09-05 Thread Daniil Ovchinnikov
? The last question implies that getAt would work with any arguments, including named ones. — Daniil Ovchinnikov JetBrains > On 5 Sep 2018, at 01:22, Paul King wrote: > > > > On Wed, Sep 5, 2018 at 2:52 AM Jochen Theodorou <mailto:blackd...@gmx.org>> wrote: > Am

Re: Constructor call short-hand syntax

2018-09-04 Thread Daniil Ovchinnikov
Same as someObject?.getAt(x:y) — Daniil Ovchinnikov JetBrains > On 4 Sep 2018, at 20:23, Daniel.Sun wrote: > > OK. I wonder what semantic `somMap?[x:y]` should be @_@ > > Cheers, > Daniel.Sun > > > > > - > Daniel Sun > Apache Groovy c

char <-> Character

2018-07-31 Thread Daniil Ovchinnikov
type java.lang.Character } More here https://issues.apache.org/jira/browse/GROOVY-7557. Any updates on this? — Daniil Ovchinnikov JetBrains

Re: Synthetic GroovyObject methods

2018-03-10 Thread Daniil Ovchinnikov
org/jira/browse/GROOVY-8497> And https://youtrack.jetbrains.com/issue/IDEA-173360 <https://youtrack.jetbrains.com/issue/IDEA-173360> which is basically GROOVY-7362. — Daniil Ovchinnikov Software Developer JetBrains jetbrains.com “Drive to develop” > On 10 Mar 2018, at 16:24, Joche

Re: Synthetic GroovyObject methods

2018-03-10 Thread Daniil Ovchinnikov
of their implementations. — Daniil Ovchinnikov Software Developer JetBrains jetbrains.com “Drive to develop” > On 10 Mar 2018, at 03:48, Paul King wrote: > > > We have recently also started adding @Generated to such methods. Originally > this was to assist with better results

Re: Synthetic GroovyObject methods

2018-03-07 Thread Daniil Ovchinnikov
I’ve created https://issues.apache.org/jira/browse/GROOVY-8495 <https://issues.apache.org/jira/browse/GROOVY-8495> to track this. — Daniil Ovchinnikov Software Developer JetBrains jetbrains.com “Drive to develop” > On 6 Mar 2018, at 18:39, Daniil Ovchinnikov > wrote: >

Synthetic GroovyObject methods

2018-03-06 Thread Daniil Ovchinnikov
: cannot find symbol: method getProperty(String) } } class JavaClass { void usage() { new GroovyClass().getProperty("a”); // error: cannot find symbol: method getProperty(String) } } This happens because javac ignores ACC_SYNTHETIC members as if they don’t even exist. — D

Re: Package specific syntax

2017-12-17 Thread Daniil Ovchinnikov
I’d love `@PackageScope` to be removed (or deprecated) in favor of `package` keyword. In this case I woudn’t have to scan for it. — Daniil Ovchinnikov JetBrains jetbrains.com “Drive to develop” > On 15 Dec 2017, at 16:36, mg wrote: > > Hi Daniil, > > thank you for explainin

Re: Package specific syntax

2017-12-13 Thread Daniil Ovchinnikov
This: > Example: > package void foo() {} — Daniil Ovchinnikov JetBrains jetbrains.com “Drive to develop" > On 14 Dec 2017, at 01:37, Nathan Harvey wrote: > > I meant that the @PackageScope annotation made code look somewhat unreadable, > and that the "packag

Re: Package specific syntax

2017-12-13 Thread Daniil Ovchinnikov
This is the best way from IDE perspective. — Daniil Ovchinnikov JetBrains jetbrains.com “Drive to develop" > On 14 Dec 2017, at 01:03, Nathan Harvey wrote: > > In Java, methods and fields use package scope by default. In Groovy, they > use public. In order to make someth