Comments (1)
Harry: type = {
operator(): (this, i: int) -> int = 123 + i;
}
Spiderman: type = {
operator*: (this) -> Harry = Harry();
operator*: (this, i: int) -> int = 456 + i;
}
main: () -> int = {
a: Spiderman = ();
b := (a*)(1 + 1);
c := a*(1 + 1);
std::cout << c << std::endl;
std::cout << b << std::endl;
}
I don't think in this case there is a way to disambiguate without parenthesis.
EDIT: ah, i guess this is basically the same as #1068
from cppfront.
Related Issues (20)
- [SUGGESTION] Add the equivalent of C++23 "deducing this" HOT 10
- [SUGGESTION] Only include `cpp2regex.h` when `@regex` is used to improve compile time HOT 5
- [BUG] raw string literals are not respected when lowered
- [SUGGESTION] clean up extra whitespace at the end of line for generated code
- [BUG] ICE when putting a ; after a type definition when there is a newline in the type body HOT 6
- [DOCS] Improve documentation on syntax for function return types
- [SUGGESTION] Allow `swap` to be a hidden friend
- [SUGGESTION] allow `: ==` for anonymous alias declarations (instead of `using`) HOT 7
- [BUG] using the using keyword inside a namespace with global functions results in code that does not compile
- [BUG] using using for operators fails
- [SUGGESTION] Documenting `==` as `constexpr` and using unified declaration syntax for aliases HOT 8
- [SUGGESTION] Creating an enum instance from a raw integer HOT 6
- [SUGGESTION] add special cases for [unique.]new and shared.new when using custom deleters
- [BUG] Constant static members not initialized inside class definition
- [BUG] New clone of repo shows modification to `pure2-regex_10_escapes.cpp.execution` HOT 5
- [BUG] Regression output dpends on temporary directory HOT 1
- [BUG]
- [BUG] Error when i try to build cppfront HOT 2
- [BUG] Definite last use and lvalue reference constructor generates wrong code? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cppfront.