6

I have this simple script opened with CommaIde:

#!/usr/bin/env perl6

my $str = 'foobar';

say $str;

The IDE is highlighting the word 'say' with the error:

Subroutine say is not defined

But, If I execute the script, it runs OK.

The same happens with other core methods like print, printf, etc.

Why are they not recognized?

Software versions:

  • Rakudo Star 2020.05.
  • Comma IDE 2020.04 Community Edition

Thank you.

Julio
  • 5,208
  • 1
  • 13
  • 42
  • 1
    That's a warning, it's not awesome, but it does not bother much. It would be nice if we could supress it, which you probably can, but I've learned to simply not pay attention to it. – jjmerelo Jul 10 '20 at 15:40
  • 3
    I see this behavior with the IntelliI plugin when I change the SDK `File -> Project Structure -> Project -> SDK` and then edit a file. But a restart does normally fix it. – LuVa Jul 10 '20 at 15:50
  • 2
    @ValleLukas. Wow, that was an easy fix. That worked also for Comma IDE, not just the intelliJ plugin. It seems that the problem just occurs when creating new projects. A restart fixed it. Thanks! You may add your comment as an answer. – Julio Jul 10 '20 at 15:59
  • 2
    Hi. Sadly, this is a legitimate bug which was just fixed and the fix will go into next release (2020.07) both community and complete version. For now simply reopening a project is a working workaround. – Takao Jul 12 '20 at 10:52

1 Answers1

6

I see this behavior with the IntelliJ plugin when I change the SDK File -> Project Structure -> Project -> SDK and then edit a file. But a IntelliJ restart does normally fix it.

LuVa
  • 2,288
  • 2
  • 10
  • 20
  • 1
    Wow, that was an easy fix. That worked also for Comma IDE, not just the intelliJ plugin. It seems that the problem just occurs when creating new projects. A restart fixed it. Thanks! You may add your comment as an answer. – Julio Jul 10 '20 at 16:29