google / google/shaderc

ambiguous type coercion

Open
#1,241 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.2k
Forks
445
Avg merge
11h 6m
Merged PRs (30d)
6

Description

I don't know who is the proper audience for this complaint, but if it's not y'all maybe you can point me to the right place.

There is an error "ambiguous best function under implicit type conversion", for your own functions, but the example at the end of this message only gives the error "cannot convert from ' temp double' to ' const (read only) highp float'" which in a project of any appreciable complexity (includes, etc.) is very, very time consuming to locate.

If you ask me, type coercion is a juice very rarely worth the proverbial squeeze. But at least we should get a consistent error message -- especially because this case presents a false negative given that the other error exists.

```
#version 460

double pow(double a, int b) {
return 1.0;
}
void
main(){
float c = 1.0;
const float d = pow(c,1);
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.