Skip to content

Implicit conversion - buitins #2

@cnewman

Description

@cnewman

Currently, srcType can handle some implicit conversions between built-in types and between string literals and string.

However, it could be better at it. Right now, it won't resolve strictly. Example:

Foo(int, double)
Foo(double, double)

are both candidates for a call matching: Foo(1, 2.0) even though the first call is clearly the more appropriate. Need to enable strict matching by scanning the literal beforehand and guessing if it is an int or double or float or long, etc.

Problem is going to be handling things that aren't easy to do heuristically. I.e., an int literal can be converted to a long but still look like an int.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions