pragma solidity ^0.4.0;

contract base{
address public _owner=msg.sender;
uint _a;
string internal _b ;
uint private _c;
//uint external _d;ParserError: Expected identifier but got 'external' function base() {
_a =10;
//uint _d public;Expected ';' but got 'public'
string _f;
} function getA() public view returns (uint){
return _a;
} function setA(uint c) internal{
_a=c;
} //modifier OnlyAdmin() private{Expected '{' but got 'private'
modifier OnlyAdmin(){
require(_owner == msg.sender);
_;
} function kill() OnlyAdmin() external{
setA(6);
this.getA();
selfdestruct(msg.sender);
}
}
contract base1 is base{
function getA() public view returns(uint){
//return _c;DeclarationError: Undeclared identifier. Did you mean "_a" or "_b"?
//return _b;Overriding function return types differ:覆盖函数返回类型不同
return _a;
}
function getE(){
this.kill();
this.getA();
//this.setA(20);Member "setA" not found or not visible after argument-dependent lookup in contract base1
}
} contract base2{ uint public _e;
function getE(){
//this.getA();Member "getA" not found or not visible after argument-dependent lookup in contract base2
}
}
//contract base2 is base1,base{ Linearization of inheritance graph impossible:继承图的线性化是不可能的
contract base3 is base,base1{
uint public _e;
}

最新文章

  1. iOS 图片压缩
  2. 获取不变的UDID-b
  3. Unity Skin Shader Optimized
  4. [Angular 2] Using Pipes to Filter Data
  5. Java学习——static关键字
  6. Backbone.js 为复杂Javascript应用程序提供模型(models)、集合(collections)、视图(views)的结构
  7. instanceof 是如何工作的
  8. centos7.2 配置内网ntp服务器进行时间同步
  9. [Arxiv1706] Few-Example Object Detection with Model Communication 论文笔记
  10. Python_lambda
  11. 自己写的C#三层代码生成器
  12. SpringBoot 从application.yml中通过@Value读取不到属性值
  13. faker模块
  14. oracle 11g数据库--创建表空间,创建用户,用户授权并指定表空间。
  15. 立FLAG-书单
  16. 将mongodb设置为windows服务
  17. Gym 101933
  18. Asp.net MVC中Html.Partial, RenderPartial, Action,RenderAction 区别和用法【转发】
  19. activiti自己定义流程之Spring整合activiti-modeler实例(七):任务列表展示
  20. 自己定义滑动删除item的ListView。

热门文章

  1. 【Linux】GDB程序调试
  2. std::string, std::wstring, wchar_t*, Platform::String^ 之间的相互转换
  3. matlab练习程序(广度优先搜索BFS、深度优先搜索DFS)
  4. visual studio code配置项
  5. 源码安装mysql,及主从同步
  6. python实现oracle数据泵导出功能
  7. tensorflow报错 Key Conv/biases not found in checkpoint
  8. UVA - 11488 前缀
  9. c#主窗体以及副窗体弹出
  10. 【洛谷P4342】[IOI1998]Polygon