Skip to content

Instantly share code, notes, and snippets.

@NeoTeo
Last active August 29, 2015 14:13
Show Gist options
  • Select an option

  • Save NeoTeo/545128f724cd47d84ee1 to your computer and use it in GitHub Desktop.

Select an option

Save NeoTeo/545128f724cd47d84ee1 to your computer and use it in GitHub Desktop.
Crashes compiler with "Global is external, but doesn't have external or weak linkage!"
import Cocoa
class foo {
var baz = false
func test() {
var bar: Int = 1 {
didSet {
if baz == true && bar == 2 {
println("baz")
}
}
}
}
}
@NeoTeo

NeoTeo commented Jan 9, 2015

Copy link
Copy Markdown
Author

The full error text:

Global is external, but doesn't have external or weak linkage!
i8* ()* @_TFFC10reDiscover3foo4testFS0_FT_T_aL_3barSi
invalid linkage type for function declaration
i8* ()* @_TFFC10reDiscover3foo4testFS0_FT_T_aL_3barSi
LLVM ERROR: Broken module found, compilation aborted!

@NeoTeo

NeoTeo commented Jan 9, 2015

Copy link
Copy Markdown
Author

Removing either baz == true && or && bar == 2 makes it all happy again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment