Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // diketahui:
- class X(param1: someType0){
- ...
- }
- object X{
- def apply(param1: someType1, param2: someType2){
- ...
- }
- def apply(param1: someType1){
- ...
- }
- def apply(param2: someType2){
- ...
- }
- }
- // ditanyakan:
- object Y extends X{
- ....
- }
- // gimana caranya, biar constructor Y bisa dibangun dengan parameter bertipe someType1/someType2, tapi bukan someType0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement