Commit Graph

84 Commits

Author SHA1 Message Date
Lefteris Karapetsas
a063e1c5a1 Check all constructors in inheritance chain get args
- Also add a missing override in a function of EnumValue
2015-04-17 15:27:31 +02:00
Lefteris Karapetsas
f2f0aec91c Allowing abstract contracts constructor to have no args
- If a constructor is part of an abstract contract we can omit its
  arguments

- IF a contract is abstract make sure to not create and/or request
  Assembly code about it since it's not compiled
2015-04-17 15:27:31 +02:00
chriseth
968ebf6dbc Bugfixes concerning variable declarations.
Fixes #1637
2015-04-16 00:09:28 +02:00
Gav Wood
966407f285 Allow Solidity build to be disabled. 2015-04-05 17:46:12 +02:00
Liana Husikyan
9d734e03fd changed checking for external type in VariableDeclaration::checkTypeRequirements()
changed error msg
2015-04-01 15:21:17 +02:00
chriseth
ea98b3b07e Merge pull request #1414 from LefterisJP/sol_notImplementedFuncs
Interface contracts
2015-03-30 19:33:30 +02:00
Lefteris Karapetsas
de09be29ba Fix some styling issues and remove comments 2015-03-30 17:18:38 +02:00
Lefteris Karapetsas
621215918d Abstract contract and inheritance
- Checking the linearized base contracts for abstract functions and
  handle their existence appropriately

- If a contract is abstract it can't be created with new

- An abstract contract is not compiled (no backend code is generated)

- Of course tests
2015-03-27 15:15:34 +01:00
Liana Husikyan
a427053d99 added externalTypes function to functionType
removed flag for externalSigniture
2015-03-27 13:28:32 +01:00
Liana Husikyan
25e4cf071a two more tests
style fixes
2015-03-26 14:11:24 +01:00
Lefteris Karapetsas
fc0b32f683 Parsing of not fully implemented functions
- Adding the possibility of omitting a function body by simply ending a
  function definition with a semicolon

- Such a function is marked as not fully implemented and any contract
  that contains such a function is considered a not fully implemented contract
2015-03-25 14:26:05 +01:00
Liana Husikyan
ae0fa99123 tests for external types 2015-03-25 14:20:13 +01:00
Liana Husikyan
54bb1abcfa renamed externalTypes to externalSignature 2015-03-25 13:59:46 +01:00
Liana Husikyan
7e73fd3f45 renamed getCanonicalSignature
added externalTypes instead of types for interface functions
added simple test

todo
testing
2015-03-25 13:59:46 +01:00
chriseth
0816a59b7e Disallowed special case of bytes0 arrays. 2015-03-17 18:34:57 +01:00
Liana Husikyan
1d2e579eff - added more tests to check constant specifier implementation
- deny use of const for local variables
- deny unitialized const variables
- only int, fixed strings, and enums can be declaired as const
2015-03-16 10:46:46 +01:00
Liana Husikyan
8e6b2c10c3 - added isPartOfExternalInterface to Declaration
- changed position for the constant specifier. now it goes after type: <type> <constant> <name> = <value>
- removed tests for constant functions, checkings for constant function doesn't belong to this story
2015-03-16 10:46:46 +01:00
Liana Husikyan
2ca23b2247 added parsing for constant variables 2015-03-16 10:46:46 +01:00
Lefteris Karapetsas
1bb7f3cbc3 Small FixedBytes type fixes
- Integer Constant is explicitly convertible to FixedBytes, so using
  that in the tests
2015-03-12 17:31:39 +01:00
Lefteris Karapetsas
f3fc870e03 byte is now an alias for byte1 2015-03-12 12:53:00 +01:00
Lefteris Karapetsas
5abf18c27f Most EndToEndTests are now compliant with the Bytes renaming 2015-03-12 12:53:00 +01:00
Lefteris Karapetsas
c72197a453 Bytes Tokens properly named and NameAndTypeResolution tests work 2015-03-12 12:53:00 +01:00
Lefteris Karapetsas
4cd659c51d NameAndtypeResolution tests use ETH_TEST macros 2015-03-06 14:37:20 +01:00
chriseth
1234526c93 Fix type checks for storage variable initializer. 2015-03-06 13:47:32 +01:00
chriseth
d0e535d014 Merge pull request #1146 from LefterisJP/sol_fixBaseClassAccessors
Sol fix accessing public variable of base class
2015-03-02 12:59:12 +01:00
Lefteris Karapetsas
447320a91d getInheritableMembers() does not look at BaseContracts
- Also adding tests for improper accessing members of other contracts.
2015-03-02 11:51:13 +01:00
Lefteris Karapetsas
03bc87031e VisibleInDerivedContracts() is now virtual()
- Plus an extra test for internal visibility in a base class variable
2015-03-02 11:51:13 +01:00
Lefteris Karapetsas
285a376248 Add structs to inheritable members 2015-03-02 11:51:13 +01:00
Lefteris Karapetsas
41f9399a32 Adding test for base class statevar accessors 2015-03-02 11:51:13 +01:00
Christian
e42183f2ff Type checks for array assignment. 2015-02-27 22:52:19 +01:00
Gav Wood
55cb6e31f5 Merge pull request #1100 from chriseth/sol_arrays
Parsing support for arrays.
2015-02-23 15:19:07 +01:00
Christian
c8d4ab1ca0 Replaced "inheritable" by "internal". 2015-02-22 19:37:54 +01:00
Christian
c8cec8d0b3 Parsing of array types and basic implementation. 2015-02-21 15:10:01 +01:00
Lefteris Karapetsas
0398ef109c Bugfix for functions override
- Functions with byte array type parameters can now be safely
  overriden. Parameter location is now set at the right place.

- Also made a test for the fix
2015-02-19 17:43:53 +01:00
Christian
a26d72472d Rename "protected" to "inheritable". 2015-02-18 13:35:12 +01:00
Christian
8290b6305b No write access to parameters of external functions. 2015-02-16 19:25:24 +01:00
Christian
7dd200d140 "external" visibility specifier. 2015-02-16 19:24:07 +01:00
Christian
31425a1fc0 Some changes to enums. 2015-02-14 13:35:57 +01:00
Lefteris Karapetsas
9836d58df8 Removing ';' from the end of EnumDefinition 2015-02-13 23:48:50 +01:00
Lefteris Karapetsas
8e9a9ad5e9 Explicit conversion from int to Enum 2015-02-13 23:16:15 +01:00
Lefteris Karapetsas
9dedbb4154 Addressing issues with Enums in Solidity 2015-02-13 23:16:14 +01:00
Lefteris Karapetsas
afc328210e Indentation fixes 2015-02-13 23:16:14 +01:00
Lefteris Karapetsas
3dd00cbdd8 Enum Value member access should now work properly
- Also detection of duplicate enum values and tests for them have been
  added
2015-02-13 23:16:14 +01:00
Lefteris Karapetsas
fe725fbb49 Enum type conversion and member value access.
- Added tests for the type conversion part.

- Enum member value access still needs some work
2015-02-13 23:16:14 +01:00
Lefteris Karapetsas
d8535eb4ea Correcting and testing enum member access 2015-02-13 23:16:14 +01:00
Lefteris Karapetsas
60e839954e Enums NameAndTypeResolution - WIP
- Also adding an EndToEnd enum test
2015-02-13 23:16:14 +01:00
Christian
48f6bda44b Copying structs. 2015-02-12 20:19:49 +01:00
Lu Guanqun
466f0e0100 small fixes per chris's comments 2015-02-10 23:39:13 +08:00
Lu Guanqun
2f15494f83 add two more exp tests 2015-02-10 23:39:13 +08:00
Liana Husikyan
12505a5b76 - implemented Empty parameter name story. Now the name of input/return parameters of function can be not specified.
- added appropriate tests

Conflicts:
	test/SolidityEndToEndTest.cpp
	test/SolidityNameAndTypeResolution.cpp
2015-02-09 02:06:30 +01:00