Questions tagged [ambiguous]

An ambiguous call is a situation in which the compiler cannot deduce which version of a function or method to use from the given parameter types. This tag should not be confused with the [ambiguity] tag.

An ambiguous call occurs when the parameters can be converted in many ways such that they fit more than one overload of a function. For example:

void f(float f)
{

}

void f(double d)
{

}

Passing an int value to this function will cause an ambiguous call compiler error, because int can be converted both to float and to double while the compiler is not able to choose the overloaded version of function uniquely.

612 questions
0
votes
0 answers

c++ Does the return type of a function cause ambiguity?

While making a very simple program, I started wondering about whether the return value of a method has any participation in making a method ambiguous? for example (not the case I was wondering about this is just a simple example to support my…
Julian Declercq
  • 1,536
  • 3
  • 17
  • 32
0
votes
1 answer

Distinguish between function calls and indexed arrays using ANTLR4

The syntax of a language is ambiguous in the sense that function names and indexed identifiers are written in an equal way: var = function(5) => function call where 5 is a parameter var = array(5) => element 5 of the array To be able to…
0
votes
1 answer

Resolving ambiguous grammar

I've been at trying to solve this for hours and it's just been an endless loop of trial and error. I need to make this grammar unambiguous: S -> Sa | Sb | aS | bS | aa As I understand this can generate any combination of a's and b's with "aa"…
user3397545
  • 787
  • 1
  • 5
  • 8
0
votes
0 answers

2 classes with same methods and properties (ambiguous references) C#

I have 2 XSD'd that I turned into classes. Company and Person class. The XSD's have several included tags that referenced the same data. Example: When I place both of these classes (Person and…
user1158555
  • 177
  • 1
  • 11
0
votes
2 answers

Error C2782: Template parameter Init is ambigous C++ calling a method

Like the title says I'm having a problem with calling my method in c++. I tried to solve it on my own I'm just stuck so I decided to post the question here. So can someone please tell me what I am doing wrong? Thanks in advance! my code: #include…
kaspertje15
  • 3
  • 1
  • 6
0
votes
1 answer

The method execute(Object[]) is ambiguous for the type WebTask?

i want to upgrade my app to run in android 5.0.1 but i encounter an error (The method execute(Object[]) is ambiguous for the type WebTask) message when i try to compile. My code: private final ArrayBlockingQueue queue = new…
Bjorn
  • 135
  • 5
  • 12
0
votes
1 answer

PostgreSql ERROR: column reference is ambiguous in ADD CONSTRAINT Foreign key

How is it possible to get this error? Situation is this : Table a has columns a,b,c,e,... and pkey is a,b,c. Table b has columns a,b,c, and d and pkey is a,b,c,d ALTER TABLE b ADD CONSTRAINT a_b_fkey FOREIGN KEY (a, b, c) REFERENCES a…
Jocken
  • 160
  • 9
0
votes
2 answers

Why do I get the error: Column part of using cannot have a qualifier

This is the query I am trying to run: select ordervariety, bat.batch, order_date, var.variety, var.the_name, bat.the_name, var.the_price, bat.the_price quantity from test_orders join TEST_ORDERVARIETIES using…
user4227507
0
votes
0 answers

ambiguous reference for foreign key data anotations

i have class like the following public class Privilege { [ForeignKey("User")] // error line public int? UserId { get; set; } .... } everything was fine until i change the target framework of the project. it was .Net 4.0 and i…
brtb
  • 2,201
  • 6
  • 34
  • 53
0
votes
0 answers

class is an ambiguous reference between NameSpace1.Class and NameSpace2.Class

I have web service (wcf c#) that uses entity framework. It worked perfectly, but I updated the model and now I get error: class is an ambiguous reference between NameSpace1.Class and NameSpace2.Class. I work in visualStudio 2012, and it suggests…
Rachel Fishbein
  • 818
  • 2
  • 12
  • 29
0
votes
1 answer

Sqlite ambiguous column name that isn't ambiguous, includes table name

I have the following SELECT statement for sqlite that is coming back with Error: ambiguous column name: msgs.msgcontent1 however that column name is not ambiguous! Can anyone help me figure out what I am missing here? SELECT …
HeatherLeigh
  • 71
  • 2
  • 10
0
votes
1 answer

ambigous call on recursive sudoku_backtracker function.

This is my program to solve a sudoku puzzle by using a backtracking algorithm. The program will recursively call itself until it is either solved or if it is unsolvable. The problem is that when I run it the compiler says that the…
0
votes
3 answers

inheriatance problems "ambiguous request"

I have a problem with inheriatance. Say i have 4 classes: base class A, class B inheriates A, class C inheriates A, class BC inheriates B and C class A { public: void test() { } }; class B :public A { }; class C…
Thalhammer
  • 285
  • 3
  • 7
0
votes
0 answers

MySQL : Ambiguous Column with ifnull rollup

I'm getting this error when i want to run a View, but I don't know why: [23000][1052] Column 'name' in field list is ambiguous Query: create view prefix_group_rating AS SELECT r.rating_date …
elarichi.y
  • 57
  • 8
0
votes
2 answers

How is sql allowing multiple columns with same names

I am confused, how is sql allowing me to select multiple columns with same name. as of my knowledge, it should show column ambiguous. How is it allowing like this, and what is the use of it ???
Learner
  • 1,286
  • 6
  • 34
  • 57