mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[groovy] delegate hasBlock() check from reflected to original method
This commit is contained in:
+6
-1
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user