[groovy] delegate hasBlock() check from reflected to original method

This commit is contained in:
Daniil Ovchinnikov
2017-08-16 17:30:33 +03:00
parent 45f148640b
commit 7a4e396b7f
2 changed files with 8 additions and 3 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -329,4 +329,9 @@ public class GrReflectedMethodImpl extends LightMethodBuilder implements GrRefle
public PsiElement getPrototype() {
return getBaseMethod();
}
@Override
public boolean hasBlock() {
return getBaseMethod().hasBlock();
}
}
@@ -288,11 +288,11 @@ class A {
void 'test do not load contents in highlighting'() {
def file = fixture.tempDirFixture.createFile('classes.groovy', '''\
class C {
static void staticVoidMethod() {}
static void staticVoidMethod(a, b = 1) {}
}
''')
((JavaCodeInsightTestFixtureImpl)fixture).virtualFileFilter = { it == file }
fixture.configureByText '_.groovy', 'C.staticVoidMethod()'
fixture.configureByText '_.groovy', 'C.staticVoidMethod(1)'
fixture.checkHighlighting()
}