question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Class uses module, that uses another module

See original GitHub issue

Its a question. When I use LinkedListModule, its OK:

class MyClass
	use LinkedListModule

but when I use another module, that use LinkedListModule without any additional functions, members etc…

class MyClass
	use AnotherModule
	
public module AnotherModule
	use LinkedListModule

I get an error:

2017-07-03 14:46:48 INFO   progress: Translating wurst. Phase 1: to intermediate lang
2017-07-03 14:46:48 INFO   translating program to jass ... 
2017-07-03 14:46:48 INFO   progress: Translating wurst. Phase 2: translate classes
2017-07-03 14:46:48 SEVERE Error
java.lang.IllegalArgumentException: Element func must not be null.
	at de.peeeq.wurstscript.jassIm.ImFunctionCallImpl.<init>(ImFunctionCallImpl.java:10)
	at de.peeeq.wurstscript.jassIm.JassIm.ImFunctionCall(JassIm.java:112)
	at de.peeeq.wurstscript.translation.imtranslation.EliminateClasses.replaceMethodCall(EliminateClasses.java:397)
	at de.peeeq.wurstscript.translation.imtranslation.EliminateClasses.eliminateClassRelatedExprs(EliminateClasses.java:283)
	at de.peeeq.wurstscript.translation.imtranslation.EliminateClasses.eliminateClasses(EliminateClasses.java:39)
	at de.peeeq.wurstio.WurstCompilerJassImpl.transformProgToJass(WurstCompilerJassImpl.java:341)
	at de.peeeq.wurstio.languageserver.requests.RunMap.compileScript(RunMap.java:274)
	at de.peeeq.wurstio.languageserver.requests.RunMap.execute(RunMap.java:93)
	at de.peeeq.wurstio.languageserver.requests.UserRequest.run(UserRequest.java:26)
	at de.peeeq.wurstio.languageserver.LanguageWorker.lambda$getNextWorkItem$30(LanguageWorker.java:176)
	at de.peeeq.wurstio.languageserver.LanguageWorker.run(LanguageWorker.java:151)
	at java.lang.Thread.run(Unknown Source)

I dont understand why. Module cannot pass functionality through another module to my class or what? Can you explain me cause of this behaviour? Thx for help in advance

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
peqcommented, Jul 4, 2017

The problem with constructor-calls should be fixed with commit 8e9dfd4d8689e2a01a5f677a97bc0d69383c2fe7

Can you try if it works now?

1reaction
Frottycommented, Jul 4, 2017

Yea @peq left something in im not sure if debug or just working on this machine.

@vitalexbel I pushed a small hotfix. wait for build and update compiler then it will work again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to import classes from another module? - Stack Overflow
I'm having a multi module Java project. To test specific constraints, I'm using Arch Unit. This works fine for the classes that are...
Read more >
How to allow classes defined in a module to be accessible ...
In typescript by using an import statement, a module can be utilized in another module. any variables, classes, methods, or other objects ...
Read more >
Python. Classes and modules. Referring to the ... - BestProg
1. Referring to the class from another module. Method 1 ... This way of referring to a class is also used in the...
Read more >
• Use classes & functions defined in another file • A Python ...
Use classes & functions defined in another file. • A Python module is a file with the same name. (plus the .py extension)....
Read more >
5. The import system — Python 3.11.1 documentation
Python code in one module gains access to the code in another module by the process of importing it. The import statement is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found