ambiguous

ReferenceError: Error #1008 Class is ambiguous

时光毁灭记忆、已成空白 提交于 2020-01-05 13:06:10
问题 I have a As3 file and I get a runtime error: ReferenceError: **Error #1008**: Tooltip is ambiguous; Found more than one matching binding. I have a class named Tooltip and also a symbol in library with linkage class: Tooltip and Base Class fvg.Tooltip (fvg is the name of the package). Why I get this conflict? 回答1: Fixed! I had to import the Tooltip class in my Document class file. 来源: https://stackoverflow.com/questions/2446183/referenceerror-error-1008-class-is-ambiguous

How the code run when exist override ambigous function?

…衆ロ難τιáo~ 提交于 2020-01-02 04:06:28
问题 I can not fully understand the code result when exist override ambigous function. I have a libray libMy , which contains two class A and B . The code shows as follows // A.h #ifndef included_A_h #define included_A_h class A { public: void print(); }; #endif // A.cpp #include "A.h" #include <iostream> void A::print() { std::cout << "A from library" << std::endl; } // B.h #ifndef included_B_h #define included_B_h class A; class B { public: void printA(A &a); }; #endif // B.cpp #include "B.h"

In Java, why is the call foo() not ambigious given 2 varags methods foo(int… ints) and foo(Object… objects)?

那年仲夏 提交于 2020-01-02 01:12:15
问题 If I declare just the 2 varargs methods as follows: public void foo(String... strings) { System.out.println("Foo with Strings"); } and public void foo(int... ints) { System.out.println("Foo with ints"); } and then have the code: foo(); this is a compiler error due to the ambiguity as expected. However if I have just the following 2 versions of foo: public void foo(Object... objects) { System.out.println("Foo with Objects"); } and public void foo(int... ints) { System.out.println("Foo with

Is This Actually Ambiguous?

萝らか妹 提交于 2019-12-23 10:59:33
问题 So I am aware that braces in code can mean more than just an initializer_list : What Is a Curly-Brace Enclosed List If Not an intializer_list? But what should they default to? For example, say that I define an overloaded function: void foo(const initializer_list<int>& row_vector) { cout << size(row_vector) << "x1 - FIRST\n"; } void foo(const initializer_list<initializer_list<int>>& matrix) { cout << size(matrix) << 'x' << size(*begin(matrix)) << " - SECOND\n"; } If I call foo({ 1, 2, 3 }) the

Is This Actually Ambiguous?

北慕城南 提交于 2019-12-23 10:59:29
问题 So I am aware that braces in code can mean more than just an initializer_list : What Is a Curly-Brace Enclosed List If Not an intializer_list? But what should they default to? For example, say that I define an overloaded function: void foo(const initializer_list<int>& row_vector) { cout << size(row_vector) << "x1 - FIRST\n"; } void foo(const initializer_list<initializer_list<int>>& matrix) { cout << size(matrix) << 'x' << size(*begin(matrix)) << " - SECOND\n"; } If I call foo({ 1, 2, 3 }) the

Why does not std::nullptr_t work with std::cout in C++?

早过忘川 提交于 2019-12-23 09:39:28
问题 I learned about std::nullptr_t that is the type of the null pointer literal, nullptr . Then I made small program : #include <iostream> int main() { std::nullptr_t n1; std::cout<<n1<<endl; return 0; } Here, nullptr_t is data type and n1 is variable and I'm trying to print the value of variable. But, Compiler give an error: prog.cpp: In function 'int main()': prog.cpp:6:11: error: ambiguous overload for 'operator<<' (operand types are 'std::ostream {aka std::basic_ostream<char>}' and 'std:

How to disambiguate this construction in a templated conversion operator?

六月ゝ 毕业季﹏ 提交于 2019-12-21 03:58:14
问题 After being confused why my code gave me an ambiguity error on GCC but no errors on Clang, I simplified the code. It can be seen below. struct Foo { // Foo(Foo&&) = delete; // Foo(const Foo&) = delete; Foo(int*) {} }; struct Bar { template<typename T> operator T() { return Foo{nullptr}; } }; int main() { Foo f{Bar{}}; } The errors are as follows. main.cpp:17:18: error: call to constructor of 'Foo' is ambiguous int main() { Foo f{Bar{}}; } ^~~~~~~~ main.cpp:1:8: note: candidate is the implicit

How to disambiguate this construction in a templated conversion operator?

穿精又带淫゛_ 提交于 2019-12-21 03:58:03
问题 After being confused why my code gave me an ambiguity error on GCC but no errors on Clang, I simplified the code. It can be seen below. struct Foo { // Foo(Foo&&) = delete; // Foo(const Foo&) = delete; Foo(int*) {} }; struct Bar { template<typename T> operator T() { return Foo{nullptr}; } }; int main() { Foo f{Bar{}}; } The errors are as follows. main.cpp:17:18: error: call to constructor of 'Foo' is ambiguous int main() { Foo f{Bar{}}; } ^~~~~~~~ main.cpp:1:8: note: candidate is the implicit

The call is ambiguous between single method i.e extension method

折月煮酒 提交于 2019-12-21 03:12:31
问题 I have an extension method like public static class Extension { public static string GetTLD(this string str) { var host = new System.Uri(str).Host; int index = host.LastIndexOf('.'), last = 3; while (index >= last - 3) { last = index; index = host.LastIndexOf('.', last - 1); } var domain = host.Substring(index + 1); return domain; } } And I am calling this like string domain = "." + _url.GetTLD(); I am getting no error at building and clean build. But I am getting compilation error at run

Undefined variable as function argument javascript

☆樱花仙子☆ 提交于 2019-12-20 06:48:37
问题 I've looked a fair bit, so pardon me if this has already been answered. I'm also curious as to what the actual term is called; Is it "Ambiguous" for the type of arguments I am handling? Anyways, the problem is that I want to be able to call a function like this: prompt(_.define(variable, "DEFAULT VALUE")); Basically, so that variables can have default values. However, every time I try to do this, I get this error: Timestamp: 6/11/2012 1:27:38 PM Error: ReferenceError: thisvarisnotset is not