Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0 final - regression with thrown block #1332

Closed
boris-petrov opened this issue May 18, 2021 · 1 comment · Fixed by #1333
Closed

2.0 final - regression with thrown block #1332

boris-petrov opened this issue May 18, 2021 · 1 comment · Fixed by #1333

Comments

@boris-petrov
Copy link

Issue description

This worked in 2.0-M5-groovy-3.0 but broke in 2.0-groovy-3.0.

How to reproduce

package test

import spock.lang.Specification

class SomeSpec extends Specification {
	def 'bar'() {
		when:
		def (a, b) = foo()

		then:
		thrown(Exception)
	}
}

The problem is with the deconstruction of the result of foo(). With it the Spock compiler blows up:

Description	Resource	Path	Location	Type
Groovy:Unexpected error during compilation of spec 'test.SomeSpec'. Maybe you have used invalid Spock syntax? Anyway, please file a bug report at http://issues.spockframework.org.

Additional Environment information

Eclipse IDE. Same result with Gradle.

Java/JDK

openjdk 15.0.2 2021-01-19
OpenJDK Runtime Environment (build 15.0.2+7)
OpenJDK 64-Bit Server VM (build 15.0.2+7, mixed mode)

Groovy version

3.0.7

Build tool version

2.0-groovy-3.0

Gradle

Gradle 7.0.2

Operating System

Linux

IDE

Eclipse

@leonard84
Copy link
Member

This is probably caused by #1314

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants