019 proto parent field bound twice

✓ Passing Passing: the compiler rejects this program as expected.

Code

input.k

Actual compiler output

error[KORU173]: std/proto(Animal): field 'name' is bound twice — a proto entry takes each field name once
  --> tests/regression/600_STDLIB/665_PROTO/665_019_proto_parent_field_bound_twice/input.k:9:0

error[KORU173]: std/proto(Dog): '<:' names unknown proto 'Animal' — extension composes declared field sets; declare the parent first
  --> tests/regression/600_STDLIB/665_PROTO/665_019_proto_parent_field_bound_twice/input.k:14:0

Compiler must reject:

Compilation must fail with a diagnostic.

Flows

flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Animal, source: name: string name: string)
flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Dog <: Animal, source: bark: i32)
flow ~new click a branch to expand · @labels scroll to their anchor
new (Dog)

Test Configuration

MUST_ERROR