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

[cs] >>= not work if without -D erase-generics #8978

Closed
sonygod opened this issue Nov 18, 2019 · 3 comments
Milestone

Comments

@sonygod
Copy link

@sonygod sonygod commented Nov 18, 2019

class Main {
		static function main() {
		   
			
			
			var value:cs.types.Int64= 1;
			value >>= 7;//-D erase-generics will compile ok 
			
			
		}
	}
@RealyUniqueName

This comment has been minimized.

Copy link
Member

@RealyUniqueName RealyUniqueName commented Nov 18, 2019

This is compiled to

long @value = ( (long) (1) );
@value >>= ( (long) (7) );

which is wrong, because 1 and 7 are typed as Int in AST. Removing those (long) fixes native compilation.

@RealyUniqueName RealyUniqueName added this to the Bugs milestone Nov 18, 2019
@RealyUniqueName

This comment has been minimized.

Copy link
Member

@RealyUniqueName RealyUniqueName commented Nov 18, 2019

Works fine in 3.4.7, so it's a regression

RealyUniqueName added a commit that referenced this issue Nov 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.