Skip to content

Commit

Permalink
ExpectedToFail "Java style class argument is not yet supported"
Browse files Browse the repository at this point in the history
  • Loading branch information
jevanlingen committed Dec 27, 2024
1 parent 20ded7a commit d91a3c5
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,37 @@ class RewriteSettings extends groovy.lang.Script {
);
}

@Test
void useClassAsArgument() {
rewriteRun(
groovy(
"""
class A {}
def test(Class clazz) {}
test(A)
"""
)
);
}

@Test
@ExpectedToFail("Java style class argument is not yet supported") // https://groovy-lang.org/style-guide.html#_classes_as_first_class_citizens
void useClassAsArgumentJavaStyle() {
rewriteRun(
groovy(
"""
class A {}
def test(Class clazz) {}
test(A.class)
"""
)
);
}

@Test
@ExpectedToFail("Anonymous inner class is not yet supported") // https://groovy-lang.org/objectorientation.html#_anonymous_inner_class
void anonymousInnerClass() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ void apply(Project project) {
project.rootProject.subprojects.each { module ->
module.getPlugins().withType(JavaPlugin.class).all {
module.getPlugins().withType(JavaPlugin).all {
Properties schemas = new Properties();
Expand Down

0 comments on commit d91a3c5

Please sign in to comment.