textmate / groovy.tmbundle

TextMate support for Groovy
69 stars 31 forks source link

Death Recursion #3

Closed ldaley closed 13 years ago

ldaley commented 14 years ago

The problem seems to come from writing certain types of groovy syntax in a java style method definition in a groovy file. The example i've included below goes through a specific case where this crashes textmate in more detail

Cheers, i hope this helps sort this problem out soon!

=== Example where this breaks ===

class works implements Runnable{ def run(){ someThing.someFun() // as i add 'def a = ' this does NOT crash textmate def a = someThing.someFun() } }

class crashes implements Runnable{ public void run(){ someThing.someFun() // if you try to add 'def a = ' to the following line this CRASHES textmate // We note that the "def" does not get highlighted in yellow, then when you press space // crash // My Version of textmate is: Version 1.5.9 (1589) // My version of the groovy plugin is the head from http://github.com/alkemist/Groovy-Grails.tmbundle someThing.someFun() } }

lstroud commented 13 years ago

I get something similar with the following: I was editing a groovy file. Had pressed enter a few times to move a method reference down, gone back up to create a variable, and was going to use that variable with the method.

So, this: blah.generateSomething().doSomethingElse{ thing -> println thing }

Became def blah.generateSomething()

.doSomethingElse{ thing -> println thing }

With the intention of becoming def myvar = blah.generateSomething()

myvar.doSomethingElse{ thing -> println thing }

After I type def it freezes and runs up the CPU. I have to kill it at that point.