Questions tagged [name-clash]
62 questions
4
votes
2 answers
Name clash between package and class. Bug in Eclipse or javac?
For this source code ...
... Eclipse reports the following error:
Only a type can be imported. pkg.a resolves to a package
... while Suns javac compiles it fine.
Similar situation if I try to fully qualify the class pkg.a like this:
Eclipse…

aioobe
- 413,195
- 112
- 811
- 826
4
votes
0 answers
How to deal with crates exporting symbols with identical names
I'd like to use both just-argon2 and sodiumoxide which are bindings to Argon2 and libsodium respectively. The first I will use for password hashing, the second for encryption and more.
However, because libsodium itself also includes the Argon2 code,…

SWdV
- 1,715
- 1
- 15
- 36
4
votes
2 answers
Mixing Objective-C and C++ code
I have an Objective-C/C++ application which uses functionality that is provided by a C++ library.
One of the C++ classes includes an enum like this:
class TheClass
{
public:
[...]
enum TheEnum
{
YES,
NO,
};
[...]
};
Including (using…

Volker Voecking
- 5,203
- 2
- 38
- 35
4
votes
1 answer
Cannot override a method because of a name clash
This code doesn't compile:
import java.util.List;
class A {
void foo(List l) { }
}
class B extends A {
void foo(List> l) { }
}
However, the following code compiles (foo in D overrides foo in C). Why?
class C {
void foo(List> l) {…

Gmacar
- 223
- 1
- 4
3
votes
2 answers
How can I avoid clashes with targets "imported" with FetchContent_MakeAvailable?
Suppose I'm writing an app, and managing its build with CMake; and I also want to use a library, mylib, via the FetchContent mechanism.
Now, my own CMakeLists.txt defines a bunch of targets, and so does mylib's CMakeLists.txt. If I were to install…

einpoklum
- 118,144
- 57
- 340
- 684
3
votes
1 answer
Java naming clash between method variable and package names
I have some classes generated from WSDL files by the Axis Framework. In one of these classes, there is a generated method
public com.initechsystems.www.initech7.initechbo.Organization…

simon
- 12,666
- 26
- 78
- 113
3
votes
1 answer
Airflow Packaged Dags (zipped) clash when subfolders have same name
We're setting up an Airflow framework in which multiple data scientist teams can orchestrate their data processing pipelines. We've developed a Python code-base to help them implement the DAGs, which includes functions and classes (Operator…

biertje72
- 95
- 7
3
votes
3 answers
Compiling failure of old library concurrent since Java 8
The math library colt (version 1.2) depends on the library EDU.oswego.cs.dl.util.concurrent (gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html). Compiling concurrent (version 1.3.4) worked on java version 7 or previous…

qwert2003
- 801
- 6
- 9
3
votes
3 answers
C++/VS2005: Defining the same class name in two different .cpp files
Somewhat of an academic question, but I ran into this while writing some unit tests.
My unit test framework (UnitTest++) allows you to create structs to serve as fixtures. Usually these are customized to the tests in the file, so I put them at the…

Joe Schneider
- 9,179
- 7
- 42
- 59
3
votes
1 answer
Avoid namespace conflicts in Java MPI-Bindings
I am using the MPJ-api for my current project. The two implementations I am using are MPJ-express and Fast-MPJ. However, since they both implement the same API, namely the MPJ-API, I cannot simultaneously support both implementations due to…

Felix
- 8,385
- 10
- 40
- 59
3
votes
2 answers
Implementing interface and abstract class with same methode name resulting in generic name clash
public interface Foo {
void setValue(T value);
}
public abstract class Bar extends JFormattedTextField{
@Override
public void setValue(Object value) {
}
}
public class FooBar extends Bar implements Foo{
@Override…

Torsten
- 1,696
- 2
- 21
- 42
2
votes
4 answers
namespace clash with two large libraries
I'm trying to use two very large C++ libraries to write my own library and application set and there are using directives present in the main header classes of both libraries. The conflict lies in a single class, called vector (with the…

tmaric
- 5,347
- 4
- 42
- 75
2
votes
1 answer
Python import name clash
When I have a package test, I'm used to import another file script from it as:
import test.script
and libraries as:
import library
This works as long as I don't need any library that's name corresponds with any of my scripts. When it happens, the…

Fido
- 320
- 1
- 2
- 15
2
votes
2 answers
How can I avoid redefinition of types while including multiple header files?
I'm working on recompiling a C project and I'm not sure how do I fix this problem in a right way.
Here is a situation -
a.h
#ifndef A_H
#define A_H
typedef int INT;
// other variables and function definition
#endif
b.h
#ifndef B_H
#define…

SwapnilShivhare
- 105
- 2
- 5
2
votes
1 answer
Java Generics Name Clash when Extending
I am new to generics and I would appreciate any help I can get with the following problem:
I have this parent class:
public class Parent {
public void f(K key,V value){}
}
And then I have this child class:
public class Child extends…

delmet
- 1,013
- 2
- 9
- 23