Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.4.15, 2.5.2
Description
Given properly registered extension class:
public class MyExtensions { public static void foo(Object self, String s) { System.out.println("Object#foo(String)"); } public static void foo(String self, Object o) { System.out.println("String#foo(Object)"); } }
Run
void usageExt() { "".foo("") // prints "Object#foo(String)" which is correct } @groovy.transform.CompileStatic void usageExtStatic() { "".foo("") // prints "String#foo(Object)" which is questionable } usageExt() usageExtStatic()
Attachments
Issue Links
- is related to
-
GROOVY-5700 STC: different behavior w/ map subscript and property access when using elvis
- Closed
-
GROOVY-6504 Type checker select the wrong inject method
- Closed
-
GROOVY-6849 Error in @CompileStatic when method in both Interface and Superclass
- Closed
-
GROOVY-6970 Type checker fails to choose between equivalent interface methods
- Closed
-
GROOVY-8787 Inconsistency in method selection with @CompileStatic
- Closed
-
GROOVY-9069 assignment in map by named index causes casting error
- Closed
-
GROOVY-9420 Incorrect type inference on map[key]
- Closed
- links to