mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
don't blink with pure contract on gutter when starting to write a method
This commit is contained in:
+9
@@ -120,6 +120,15 @@ int smthPure() { return 3; }
|
||||
"""
|
||||
}
|
||||
|
||||
public void "test don't analyze methods without returns"() {
|
||||
assertPure false, """
|
||||
Object method() {
|
||||
smthPure();
|
||||
}
|
||||
int smthPure() { return 3; }
|
||||
"""
|
||||
}
|
||||
|
||||
private void assertPure(boolean expected, String classBody) {
|
||||
def clazz = myFixture.addClass("final class Foo { $classBody }")
|
||||
assert expected == PurityInference.inferPurity(clazz.methods[0])
|
||||
|
||||
Reference in New Issue
Block a user