Comments (3)
can you pls exlain this ....
i tried this on compiler it will give 0.
i think no error is come..
-
-
-
-
-
-
-
-
-
- starting execution * * * * * * * * * *
-
-
-
-
-
-
-
-
-
-
-
-
- initializing globals - - - - -
-
-
-
[] stack-push: DeclarationAction pos: 0
fn B
(/app/example.carbon:4)
->> step DeclarationAction pos: 0fn B
(/app/example.carbon:4) --->
*** declaration at (/app/example.carbon:4)
fn B [C:! bool, D:! type where true == (C == true)]();
<[] stack-pop: DeclarationAction pos: 0 fn B
(/app/example.carbon:4)
[] stack-push: DeclarationAction pos: 0
fn Main
(/app/example.carbon:5)
->> step DeclarationAction pos: 0fn Main
(/app/example.carbon:5) --->
*** declaration at (/app/example.carbon:5)
fn Main () -> i32
{
return 0;
}
<[] stack-pop: DeclarationAction pos: 0 fn Main
(/app/example.carbon:5)
-
-
-
-
- calling main function - - - - -
-
-
-
[] stack-push: ValueExpressionAction pos: 0
Main()
(<Main()>:0)
->> step ValueExpressionAction pos: 0Main()
(<Main()>:0) --->
[] stack-push: ExpressionAction pos: 0Main()
(<Main()>:0)
->> step ExpressionAction pos: 0Main()
(<Main()>:0) --->
[] stack-push: ValueExpressionAction pos: 0Main
(<Main()>:0)
->> step ValueExpressionAction pos: 0Main
(<Main()>:0) --->
[] stack-push: ExpressionAction pos: 0Main
(<Main()>:0)
->> step ExpressionAction pos: 0Main
(<Main()>:0) --->
<[] stack-pop: ExpressionAction pos: 0Main
(<Main()>:0)
->> step ValueExpressionAction pos: 1Main
results: [fun<Main>
] (<Main()>:0) --->
<[] stack-pop: ValueExpressionAction pos: 1Main
results: [fun<Main>
] (<Main()>:0)
->> step ExpressionAction pos: 1Main()
results: [fun<Main>
] scope: [] (<Main()>:0) --->
-() calling function: fun
=== match pattern()
from value expression with value()
[] stack-push: ScopeAction pos: 0 scope: [] (None)
[] stack-push: StatementAction pos: 0{ ... }
(/app/example.carbon:5)
->> step StatementAction pos: 0{ ... }
(/app/example.carbon:5) --->
*** statement at (/app/example.carbon:5)
{
return 0;
}
[] stack-push: StatementAction pos: 0
return ...;
(/app/example.carbon:5)
->> step StatementAction pos: 0return ...;
(/app/example.carbon:5) --->
*** statement at (/app/example.carbon:5)
return 0;
[] stack-push: ValueExpressionAction pos: 0
0
(/app/example.carbon:5)
->> step ValueExpressionAction pos: 00
(/app/example.carbon:5) --->
[] stack-push: ExpressionAction pos: 00
(/app/example.carbon:5)
->> step ExpressionAction pos: 00
(/app/example.carbon:5) --->
<[] stack-pop: ExpressionAction pos: 00
(/app/example.carbon:5)
->> step ValueExpressionAction pos: 10
results: [0
] (/app/example.carbon:5) --->
<[] stack-pop: ValueExpressionAction pos: 10
results: [0
] (/app/example.carbon:5)
->> step StatementAction pos: 1return ...;
results: [0
] (/app/example.carbon:5) --->
*** statement at (/app/example.carbon:5)
return 0;
<[] stack-pop: StatementAction pos: 1 return ...;
results: [0
] (/app/example.carbon:5)
<[] stack-pop: StatementAction pos: 1 { ... }
scope: [] (/app/example.carbon:5)
<[] stack-pop: ScopeAction pos: 0 scope: [] (None)
[] stack-push: CleanUpAction pos: 0 scope: [] (stack cleanup:1)
[] stack-push: CleanUpAction pos: 0 scope: [] (stack cleanup:1)
->> step CleanUpAction pos: 0 scope: [] (stack cleanup:1) --->
<[] stack-pop: CleanUpAction pos: 0 scope: [] (stack cleanup:1)
->> step CleanUpAction pos: 0 scope: [] (stack cleanup:1) --->
<[] stack-pop: CleanUpAction pos: 0 scope: [] (stack cleanup:1)
->> step ExpressionAction pos: 2Main()
results: [fun<Main>
,0
] scope: [] (<Main()>:0) --->
<[] stack-pop: ExpressionAction pos: 2Main()
results: [fun<Main>
,0
] scope: [] (<Main()>:0)
[] stack-push: CleanUpAction pos: 0 scope: [] (stack cleanup:1)
->> step CleanUpAction pos: 0 scope: [] (stack cleanup:1) --->
<[] stack-pop: CleanUpAction pos: 0 scope: [] (stack cleanup:1)
->> step ValueExpressionAction pos: 1Main()
results: [0
] (<Main()>:0) --->
<[] stack-pop: ValueExpressionAction pos: 1Main()
results: [0
] (<Main()>:0)
==> interpreter result: 0
from carbon-lang.
@officialhemant511 I just tried it at HEAD, and it still crashes for me. I'm not sure why you're seeing something different, but it seems to be something about how you're running the test, so I've marked your comment off-topic to keep the issue uncluttered. If you would like help reproducing the issue, our Discord server is probably the best place to ask (see here).
from carbon-lang.
Related Issues (20)
- Dependent name lookup in base class templates HOT 6
- Exponential blow-up in `impl` matching HOT 2
- Which contexts support implied constraints? HOT 3
- value representation for structs and tuples HOT 1
- Cant compile HOT 3
- Missing `addr` in self pointer pattern causes crash when called
- are `abstract` / `base` specifiers permitted or required on class forward declarations? HOT 2
- Is `.base` permitted as a struct member? Is it the same as `.r#base`? HOT 6
- Bazel installation for Debian Does not work
- Does the return of a template function have template phase? HOT 4
- Notation of type value arguments HOT 5
- Making `#` free HOT 14
- Allow `[]` as a part of control flows HOT 1
- Macros and user-defined control flows HOT 2
- Declaring lambdas with `fn` keyword HOT 2
- Logo is really bad HOT 2
- FATAL failure at explorer/syntax/prelude.cpp:22 HOT 3
- Bazel explorer installation error HOT 1
- Explorer crashes HOT 1
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 carbon-lang.