Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReadOnlyArray causes a compilation error when a coverage or profiler reporter is defined #1

Closed
Aidan63 opened this issue Jul 27, 2020 · 1 comment

Comments

@Aidan63
Copy link

Aidan63 commented Jul 27, 2020

Hello,
Tried to get some coverage reporting going with my existing project but ran into some issues where haxe.ds.ReadOnlyArray is used, the below sample will not compile with haxe 4.1.3.

Main.hx

package tests;

import haxe.ds.ReadOnlyArray;

class Main {
	static function main() {
		final array = [ 'hello', 'world' ];

		func(array);
	}

	static function func(_array : ReadOnlyArray<String>) {
		trace(_array.length);
	}
}

build.hxml

-cp src
-L instrument
-D coverage-console-summary-reporter
-main tests.Main
--macro instrument.Instrumentation.coverage(['tests'], ['src'], [])
--interp

With the directory structure being src/test/Main.hx. Trying to compile this I get the following error.

Instrumenting .C:\Users\AidanLee\AppData\Roaming/haxe/versions/4.1.3/std/haxe/ds/ReadOnlyArray.hx:34: characters 54-65 : You can only declare from/to with compatible types

Once I remove the the coverage console define everything compiles and runs fine.

@AlexHaxe
Copy link
Owner

thanks for reporting, should be fixed in latest git version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants