Methods and variables overriding error

Godot Version

4.2.2

Question

I’m making a card game where I have a superclass

class_name Effect extends Node

var hasFieldEffect: bool

func setHasFieldEffect(hasFieldEff: bool):
   hasFieldEffect = hasFieldEff

...

Then I made a subclass

extends Effect

# I tried writing: hasFieldEffect = true but it gave me an error
# even though the program was still working

func _init():
    super.setHasFieldEffect(true)
# This also gave me an error