ether-camp / ethereum-sandbox

Ethereum Sandbox
GNU Affero General Public License v3.0
7 stars 8 forks source link

Debugger Local Variables are not showing execute state in constructor #42

Closed 3esmit closed 7 years ago

3esmit commented 7 years ago

Use the following contract, place a stop in A constructor second line. Check local variables and will be 0, not 7. Try calling the function t2, the local variables will show correct expected values.

pragma solidity ^0.4.2;

import "lib/std.sol";

contract A { 
 uint public num;
 event aNum(string n, uint x);
  function A(uint x){
    aNum("A(uint)",x);
    num = x;  
  }
  function t2(uint x){
    aNum("t2(uint)",x);
    num = x;  
  }
}

contract B is A{
    function B() A(7){   
    } 
}

image

asinyagin commented 7 years ago

It's a duplicate of #40. Solc generates weird code for constructors.

romanman commented 7 years ago

@asinyagin : can we close the dup?