The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.15 (Linux)
File Line Function
/showthread.php 906 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
crash when trying to compile a static object
#1
Hi, I found a crash "seg fault"

I report it here before creating one more issue as I don't want to be annoying Big Grin

when you try to use and initialize an object as static, it will crash at compile

Code:
public void extern object::test(){
  bug me();
}


class myClass{void myClass(){}}

class bug{
  static myClass omy=new myClass();
  void bug(){}
}

the only way I found to initialize omy (only 1 times) was to pass a fresh object to the constructor :

Code:
public void extern object::test(){
  myClass again();
  bug me(again);
}

class myClass{void myClass(){}}

class bug{
  static myClass omy;

  void bug(){}
  void bug(myClass omy){
    this.omy=omy
  }
}
Love from la France


Messages In This Thread
crash when trying to compile a static object - by nknk - 12-23-2016, 10:08 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)