Skip to content

Double module usage causes strange problems #846

@Frotty

Description

@Frotty

The following

package Test
import LinkedListModule

class A
	use LinkedListModule

class B extends A
	use LinkedListModule

class C extends A

class D extends C
	use LinkedListModule

function doSmth()
	for a in A
		// Compiles, but ??
	for b in B
		// Compiles, but ??

	B b2 = B.first // Error, cannot assign A to B

	var d = D.first
	while d != null
		d = d.next // Works in this example, but not in EBR case

should at least be prevented with a warning or error.
It is unclear whether only Bs only non-B As, or all As are iterated, and it throws weird errors ingame.
In EBR I also encounter a bug with the last case:

Ideally implement #214 I suppose.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions