So you're writing it like
extends KinematicBody2D class_name Actor
Right? Can you check that:
Have you tried restarting Godot as well?
This generally helps to solve the error.
I had this problem as well, I discovered I had installed godot from the fedora repo's and it wasn't the latest version. Downloading the latest version from godot fixed the problem.